GDget_obj_seq
Synopsis
get an object's sequence number
int _ GDget_obj_seq (
OMobj_id _ parent_id ,
char _* object_name ,
int _* seq ,
int _ mode _);
Description
GDget_obj_seq gets an object's sequence number given parent id and the name of the object.
Parameters
parent_id
The id of the target object's parent.
object_name
The name of the target object.
seq
An output argument set to the target object's sequence number.
mode
How to obtain the sequence number:
Mode
|
Meaning
|
0
|
Returns the sequence number of the target object.
|
OM_SEQ_SUBELEMS
|
Useful when object_name has subobjects, returns the largest sequence number of object_name and any of its subobjects, both immediate and lower level.
|
OM_SEQ_PTRS
|
Useful when object_name is a pointer (by-pointer or by-reference mode), returns the largest sequence number of object_name and any of the objects in the chain of references.
|
OM_SEQ_VAL
|
Combination of OM_SEQ_SUBELEMS and OM_SEQ_PTRS. Returns the largest sequence number of object_name and its subobjects. If object_name or any subobject is a pointer, determines that object's largest sequence number in the chain of references.
|
Return Value
1 if successful; 0 if OMget_obj_seq failed.
Example
/* Get the sequence number of a camera object's "from"
___subobject. */
OMobj_id _mycamera_id; /* Assume this has been set. */
int status;
int seq;
...
status = GDget_obj_seq(mycamera_id, "from", &seq, OM_SEQ_VAL);
if (status == 0)
printf("Error getting the camera's sequence number\n");