Synopsis
int OMget_num_subobjs (
OMobj_id object_id,
int *num, );
Description
OMget_num_subobjs returns the number of subobjects in the specified object.
Arguments
object_id
The id of an object.
num
An output argument, set to the number of subobjects.
Returned value
The status code (see Return Status ).
Example
Given the following V code
group grp1 {
int a;
int b;
int c;
};
the following C statements return the ids of the subobjects. Assume grp1_id is set to the id of object grp1:
OMobj_id grp1_id, subobjs[10];
int i;
int num;
int status;
...
status = OMget_num_subobjs (grp1_id, &num);
for (i=0; i < num; i++)
status = OMget_array_subobj(grp1_id, i, &subobjs[i],
OM_OBJ_RD);
See also