Open Inventor Reference
|
This class maintains a list of child nodes for any node. More...
#include <Inventor/misc/SoChildList.h>
Public Member Functions | |
SoChildList (SoNode *parentNode) | |
Constructors and destructor. | |
SoChildList (SoNode *parentNode, int size) | |
SoChildList (SoNode *parentNode, const SoChildList &l) | |
~SoChildList () | |
void | append (SoNode *child) |
All of these override the standard SoBaseList methods so they can maintain auditors correctly. | |
void | insert (SoNode *child, int addBefore) |
void | remove (int which) |
Removes pointer with given index. | |
void | truncate (int start) |
Removes all pointers after one with given index, inclusive. | |
void | copy (const SoChildList &l) |
void | set (int i, SoNode *child) |
void | traverse (SoAction *action) |
Traverses all children to apply action. | |
void | traverse (SoAction *action, int childIndex) |
Traverses just one child. | |
void | traverse (SoAction *action, int firstChild, int lastChild) |
Traverses all children between two indices, inclusive. | |
void | addPathAuditor (SoPath *p) |
SoPath calls these to be notified of changes in scene graph topology: | |
void | removePathAuditor (SoPath *p) |
It allows children to be added, removed, replaced, and accessed. The SoGroup class has an instance of this class and provides public methods for dealing with children. Other classes can also have an instance of this class and may choose to publicize whatever methods they wish for dealing with them. The SoNode::getChildren() method returns the child list for any node class.
SoChildList automatically maintains the auditor list for parent nodes. That is, when a child is added to the list, the parent node is automatically added as a parent auditor of the child. To make this possible, the parent node must be passed in to the constructors of the SoChildList class.
Definition at line 83 of file SoChildList.h.
SoChildList::SoChildList | ( | SoNode * | parentNode | ) |
SoChildList::SoChildList | ( | SoNode * | parentNode, |
int | size | ||
) |
SoChildList::SoChildList | ( | SoNode * | parentNode, |
const SoChildList & | l | ||
) |
SoChildList::~SoChildList | ( | ) |
void SoChildList::addPathAuditor | ( | SoPath * | p | ) | [inline] |
Definition at line 118 of file SoChildList.h.
void SoChildList::append | ( | SoNode * | child | ) |
Reimplemented from SoNodeList.
void SoChildList::copy | ( | const SoChildList & | l | ) |
void SoChildList::insert | ( | SoNode * | child, |
int | addBefore | ||
) |
void SoChildList::remove | ( | int | which | ) |
Reimplemented from SoBaseList.
void SoChildList::removePathAuditor | ( | SoPath * | p | ) | [inline] |
Definition at line 119 of file SoChildList.h.
void SoChildList::set | ( | int | i, |
SoNode * | child | ||
) |
void SoChildList::traverse | ( | SoAction * | action, |
int | firstChild, | ||
int | lastChild | ||
) |
Stops if action's termination condition is reached.
void SoChildList::traverse | ( | SoAction * | action, |
int | childIndex | ||
) | [inline] |
void SoChildList::traverse | ( | SoAction * | action | ) | [inline] |
Stops if action's termination condition is reached
Definition at line 103 of file SoChildList.h.
References SbPList::getLength(), and traverse().
Referenced by traverse().
void SoChildList::truncate | ( | int | start | ) |
Reimplemented from SoBaseList.