MODULE	'exec/libraries',
			'exec/nodes',
			'intuition/classusr',
			'utility/hooks'

OBJECT IClass
	Dispatcher:Hook,
	Reserved:LONG,
	Super:PTR TO IClass,
	ID:LONG,
	InstOffset:UWORD,
	InstSize:UWORD,
	UserData:LONG,
	SubClassCount:LONG,
	ObjectCount:LONG,
	Flags:LONG

CONST	CLB_INLIST=0,
		CLF_INLIST=1

#define INST_DATA(cl,o) ((o)+(cl::IClass.InstOffset AND $FFFF))
#define SIZEOF_INSTANCE(cl) ((cl::IClass.InstOffset AND $FFFF)+(cl::IClass.InstSize AND $FFFF)+SIZEOF__Object)

CONST	OJ_CLASS=8

OBJECT _Object
	Node:MLN,
	Class:PTR TO IClass

#define _OBJ(o) (o)
#define BASEOBJECT(_obj) ((_obj)+SIZEOF__Object)
#define _OBJECT(o) ((o)-SIZEOF__Object)
#define OCLASS(o) (Long(_OBJECT(o)+OJ_CLASS))

OBJECT ClassLibrary
	Lib:Lib,
	Pad:INT,
	Class:PTR TO IClass
