Ovis_Group_Child_Group_Nth()
摘要
返回一个组所拥有的第 n 个子组。
语法
Ovis_Group_Child_Group_Nth (group_ptr, child_index)
| 参数 | 类型 | 说明 |
|---|---|---|
group_ptr |
OvisT_Group * |
目标组 |
child_index |
unsigned int |
要获取的子组的索引 |
返回类型
OvisT_Group *
子组
头文件
ovis_entity.h
详情
该函数返回一个组所拥有的第 n 个组。
示例
OvisT_Group * parent, * child;
unsigned int count, i;
/* …parent group created elsewhere */
count = Ovis_Group_Child_Group_Count (parent);
for (i = 0; i < count; i++)
{
child = Ovis_Group_Child_Group_Nth (parent, i);
/* … do something with child group */
}
错误
- 组为 NIL。
参考
- 使用函数 Ovis_Entity_Parent_Group_Count() 获取组的子组数量。