Boolean ObjIsClassADescendant(
ClassStruct * class1, /* proposed ancestor */
ClassStruct * class2); /* proposed descendant */
This routine checks if
class2
is a descendand of
class1
and returns
true
if it is.
Include: object.h
Boolean ObjIsObjectInClass(
optr obj, /* object to check */
ClassStruct * class); /* proposed class */
This routine checks to see if the passed object is a member of the specified class. It checks superclasses as well, but if an unresolved variant class is encountered, the variant will
not
be resolved. If you want to search past variant class links, you should sent
MSG_META_DUMMY
to the object first. The two parameters for this routine are
obj
class
ClassStruct
definition.
ObjIsObjectInClass()
returns
true
if the object is in the class,
false
(zero) if it is not.
Include: object.h
Boolean ObjIsObjectInClassHandles(
MemHandle mh, /* handle portion of optr */
ChunkHandle ch, /* chunk portion of optr */
ClassStruct * class); /* proposed class */
This routine is just like
ObjIsObjectInClass()
except the object is specified via its handles rather than its optr.
Include: object.h
optr ObjLinkFindParent(
optr obj, /* child's optr */
word masterOffset, /* offset to master part with link field */
word linkOffset); /* offset in master part to link field */
This routine returns the optr of the specified object's parent. It must be passed the following:
masterOffset
Class_masterOffset
field in its
ClassStruct
structure).
linkOffset
Include: metaC.goh
See Also: MSG_VIS_FIND_PARENT,
MSG_GEN_FIND_PARENT.
void * ObjLockObjBlock(
MemHandle mh); /* handle of object block */
This routine locks an object block, loading in the block if necessary. It must be passed the handle of the block, and it returns the locked block's segment address. When the caller is done using the block, it should unlock it with
MemUnlock()
.
Be Sure To: Always unlock the block when you are done with it, with
MemUnlock()
.
Include: object.h
See Also: MemLock(),
MemUnlock().
VMBlockHandle ObjMapSavedToState(
MemHandle mh); /* handle of object block */
This routine returns the VM block handle of the state file block corresponding to the passed object block. If the specified object block has no state file equivalent, a null handle is returned.
Include: object.h
MemHandle ObjMapStateToSaved(
VMBlockHandle vmbh, /* VM block handle of state block */
GeodeHandle gh); /* handle of geode owning block */
This routine takes a VM block handle and a geode handle and returns the memory block corresponding to the VM block, if any. The two parameters are
vmbh
gh
If the block is found,
ObjMapStateToSaved()
returns its handle. If the block is not found, it returns a null handle.
Include: object.h
void ObjMarkDirty(
optr o); /* object to be marked dirty */
This routine marks an object dirty, indicating that changes to it should be saved when its object block is saved. If you want changes to objects saved, you should mark the object dirty.
Tips and Tricks: Often you do not need this routine because parameters or flags to other routines will set the object dirty automatically. If there is any doubt, however, you should use this routine.
Include: object.h
See Also: ObjChunkFlags,
ObjSetFlags().
void ObjMarkDirtyHandles(
MemHandle mh, /* handle portion of optr */
ChunkHandle ch); /* chunk portion of optr */
This routine is the same as
ObjMarkDirty()
except that it specifies the object via handles rather than an optr.
void ObjProcBroadcastMessage(
EventHandle event); /* the event to be broadcast */
This routine broadcasts the given event to all threads which have message queues. It must be passed an encapsulated event (usually recorded with
@record
) and returns nothing. This is typically used for notification purposes.
Include: metaC.goh
void ObjRelocOrUnRelocSuper(
optr oself,
ClassStruct *class,
word frame);
Call this routine to relocate an object's superclass.
Include: object.h
GEOS SDK TechDocs
|
|
ObjInitDetach() ...
|
ObjResizeMaster() ...