perm filename RECORD.DEF[NEW,AIL] blob sn#408223 filedate 1979-01-08 generic text, type T, neo UTF8
EXTERNAL RECORD!CLASS $CLASS(INTEGER RECRNG,HNDLER,RECSIZ;
				INTEGER ARRAY TYPARR;
				STRING ARRAY TXTARR);

COMMENT SYSTEM DEFAULT HANDLER PROCEDURE;
EXTERNAL RECORD!POINTER(ANY!CLASS) PROCEDURE $REC$(INTEGER OP;
					RECORD!POINTER(ANY!CLASS) R);

COMMENT PROCEDURE TO CALL A RECORD'S HANDLER PROCEDURE;
EXTERNAL RECORD!POINTER(ANY!CLASS) PROCEDURE $RECFN(INTEGER OP;
					RECORD!POINTER(ANY!CLASS) R);


COMMENT OP VALUES FOR $REC$;
DEFINE ALLOCATE!RECORD = 1;
DEFINE MARK!SUBFIELDS = 4;
DEFINE DELETE!RECORD = 5;

COMMENT BITS FOR TYPARR[0];

DEFINE	NODELC = 1;	COMMENT DO NOT DELETE RECORDS OF THIS CLASS (VIA GC);
DEFINE	CMPLDC = 2;	COMMENT THIS RECORD CLASS IS COMPILED-IN;
DEFINE	HASRPS = 4;	COMMENT HAS RPTR / RPTR ARRAY;
DEFINE	HASSTR = 10;	COMMENT HAS STRING / STRING ARRAY SUBFIELDS;
			COMMENT IF HAVE REFERENCE SUBFIELDS, THEN
				BETTER HAVE TYPARR[0] WITH HASSTR & HASRPS ON;

EXTERNAL PROCEDURE $RECGC;

DEFINE MIN$SB = 3;
DEFINE MAX$SB = 16;
EXTERNAL INTEGER ARRAY $SPCAR[MIN$SB:MAX$SB];

DEFINE $SB!BLKSIZ=0;	COMMENT SIZE OF BLOCKS;
DEFINE $SB!TRIGGER=1;	COMMENT  COUNT DOWN FOR RECGC;
DEFINE $SB!TGRMIN=2;	COMMENT  MINIMUM NUMBER PERMITTED FOR TRIGGER SETTING;
DEFINE $SB!TINUSE=3;	COMMENT TOTAL NUMBER OF RECORDS IN USE;
DEFINE $SB!TUNUSED=4;	COMMENT TOTAL UNUSED BUFFERS;
DEFINE $SB!FBLIST=5;	COMMENT  FREE BUFFER LIST;
DEFINE $SB!FULLS=6;	COMMENT  FULL BUFFER LIST;
DEFINE $SB!CULPRT=7;	COMMENT COUNTED UP EACH TIME GC IS TRIGGERED BY THIS SPACE;

COMMENT GET AT FIELDS USING MEMORY.  E.G., MEMORY[$SPCAR[4]+$SB!TRIGGER] ;