Up: GEOS SDK TechDocs | Up | Prev: ObjCompProcessChildren() ... | Next: ObjDoRelocation() ...

ObjDeref()

void	* ObjDeref(
        optr	obj			/* optr to dereference */
        word	masterLevel);			/* specific master level to dereference */

This routine dereferences the given optr and master level to reset the message parameter pself . Because many routines and messages may cause the calling object's instance chunk to move, the pself parameter may become invalid. The two parameters to ObjDeref() are

obj
The optr of the object to be dereferenced; nearly always you will want to pass oself .
masterLevel
The master level of the part to be dereferenced. This is the offset into the instance chunk where the offset to the master part is stored. Since pself points to the first byte of a master part, you must specify which master part you are dereferencing.

For example, a visible object dereferencing its VisClass instance data would call this routine as follows:

pself = ObjDeref(oself, 4);

Note, however, the ObjDeref1() and ObjDerefVis() exist to dereference the Vis master part, and ObjDeref2() and ObjDerefGen() exist to dereference the Gen master part.

Include: object.h

See Also: ObjDeref1(), ObjDeref2().

ObjDerefHandles()

void	* ObjDerefHandles(
        MemHandle		mh,					/* handle portion of optr */
        ChunkHandle		ch,					/* chunk portion of optr */
        word		masterLevel);					/* master level to dereference */

This routine is exactly the same as ObjDeref() , above, except that the optr is specified as its separate handles.

Include: object.h

ObjDeref1()

void	* ObjDeref1(
        optr obj);			/* optr of object to be dereferenced */

This routine is a special version of ObjDeref() which dereferences the first master part of an object. Visible objects should use this routine or ObjDerefVis() instead of ObjDeref() .

Include: object.h

See Also: ObjDeref(), ObjDeref2().

ObjDeref1Handles()

void	*ObjDeref1Handles(
        MemHandle		mh,			/* handle portion of optr */
        ChunkHandle		ch,);			/* chunk handle portion of optr */

This routine is exactly like ObjDeref1() , above, except that the optr is specified as its separate handles.

Include: object.h

ObjDeref2()

void	* ObjDeref2(
        optr	obj);		/* optr of object to be dereferenced */

This routine is a specialized version of ObjDeref() which dereferences the second master part of an object. Generic objects should use this routine or ObjDerefGen() instead of ObjDeref() .

Include: object.h

See Also: ObjDeref(), ObjDeref1().

ObjDeref2Handles()

void	* ObjDeref2Handles(
        MemHandle		mh,/			/* handle portion of optr */
        ChunkHandle		ch);			/* chunk portion of optr */

This routine is exactly like ObjDeref2() , above, except that the optr is specified as its separate handles.

Include: object.h

ObjDerefGen()

void	* ObjDerefGen(
        optr	obj);			/* generic object to be dereferenced */

This routine is exactly the same as ObjDeref2() and dereferences the Gen master part of a generic object.

Include: object.h

See Also: ObjDeref(), ObjDeref2().

ObjDerefVis()

void	* ObjDerefVis(
        optr	obj);			/* visible object to be dereferenced */

This routine is exactly the same as ObjDeref1() and dereferences the Vis master part of a visible object or a visibly-realized generic object.

Include: object.h

See Also: ObjDeref(), ObjDeref1().


Up: GEOS SDK TechDocs | Up | Prev: ObjCompProcessChildren() ... | Next: ObjDoRelocation() ...