word NameArrayFind(
optr array, /* optr to name array */
const char * nameToFind, /* Find element with this name */
word nameLength, /* Pass zero if name string is
* null-terminated */
void * returnData); /* Copy data section into this * buffer */
This routine locates the element with the specified name. It returns the token of the element and copies its data section into the passed buffer. If there is no element with the specified name, the routine will return CA_NULL_ELEMENT. The routine takes the following arguments:
array
nameToAdd
nameLength
NameArrayFind()
will assume the string is null-terminated.
returnData
Include: chunkarr.h
Warnings: You must make sure the
returnData
buffer is large enough to hold an element's data portion; otherwise, data after the buffer will be overwritten.
word NameArrayFindHandles(
MemHandle mh, /* Handle of LMem heap */
ChunkHandle array, /* Handle of name array */
const char * nameToFind, /* Find element with this name */
word nameLength, /* Pass zero if name string is
* null-terminated */
void * returnData); /* Copy data section into this * buffer */
This routine is exactly like
NameArrayFind()
above, except that the name array is specified by its global and chunk handles (instead of with an optr).
Include: chunkarr.h
NEC(line)
This macro defines a line of code that will only be compiled into the
non
-error-checking version of the geode. The
line
parameter of the macro is the actual line of code. When the non-EC version of the program is compiled, the line will be treated as a normal line of code; when the EC version is compiled, the line will be ignored.
See Also: EC().
Include: ec.h
optr ObjBlockGetOutput(
MemHandle mh); /* handle of the subject object block */
This routine returns the optr of the output destination object set for the specified object block. The output object is stored in the object block's header in the
OLMBH_output
field. If the block has no output set, NullOptr will be returned.
Include: object.h
See Also: ObjLMemBlockHeader.
void ObjBlockSetOutput(
MemHandle mh, /* handle of the subject object block */
optr o); /* optr of the new output object */
This routine sets the
OLMBH_output
field in the specified object block's header. The optr passed in
o
will be set as the block's output.
Include: object.h
See Also: ObjLMemBlockHeader.
void ObjCompAddChild(
optr obj, /* optr of parent composite */
optr objToAdd, /* optr of new child */
word flags, /* CompChildFlags */
word masterOffset, /* offset to master part */
word compOffset, /* offset to comp field in master part */
word linkOffset); /* offset to link field in master part */
This routine adds the given object to an object tree as the child of another specified object. It returns nothing. You will not likely want to use this routine; instead, you will probably use the messages listed below under "See Also." The parameters of this routine are
obj
objToAdd
@link
).
flags
CompChildFlags
. These flags indicate whether the object should initially be marked dirty as well as where in the parent's child list the new child should be placed (first, second, last, etc.).
masterOffset
Class_masterOffset
field in its
ClassStruct
structure.)
compOffset
linkOffset
Warnings: This routine may resize and move LMem and Object blocks on the heap, thereby invalidating all segment addresses and pointers.
Include: metaC.goh
See Also: MSG_VIS_ADD_CHILD,
MSG_GEN_ADD_CHILD.
optr ObjCompFindChildByNumber(
optr obj, /* parent's optr */
word childToFind, /* zero-based child number */
word masterOffset, /* offset to master part */
word compOffset, /* offset to comp field in master part */
word linkOffset); /* offset to link field in master part */
This routine returns the optr of the passed object's child; the child is specified based on its position in the object's child list. You will not often use this routine, but you will probably use the messages listed under "See Also" instead. The routine's parameters are listed below:
obj
childToFind
masterOffset
Class_masterOffset
field in its
ClassStruct
structure.)
compOffset
linkOffset
Include: metaC.goh
See Also: MSG_GEN_FIND_CHILD,
MSG_VIS_FIND_CHILD.
GEOS SDK TechDocs
|
|
NameArrayAdd() ...
|
ObjCompFindChildByOptr() ...