40 for(
size_t i = 0; i <
mChildren.size(); ++i ) {
49 vl::Log::error(
"ActorTreeAbstract::addChild(node): 'node' already has a parent.\n");
65 std::vector< ref<ActorTreeAbstract> >::iterator it = std::find(
mChildren.begin(),
mChildren.end(), node );
87 vl::Log::error(
"ActorTreeAbstract::setChild(int,node): 'node' already has a parent.\n");
97 for(
int j = i; j < i + count; ++j ) {
void addChildOnce(ActorTreeAbstract *node)
Adds a child node to the current node if not already present.
const ActorTreeAbstract * parent() const
Returns the parent of a node.
int findChild(ActorTreeAbstract *node)
Returns the index of the given node or -1 if not found.
static void error(const String &message)
Use this function to provide information about run-time errors: file not found, out of memory...
std::vector< ref< ActorTreeAbstract > > mChildren
Visualization Library main namespace.
void addChild(ActorTreeAbstract *node)
Adds a child node to the current node.
The ActorTreeAbstract class implements the interface of a generic tree containing Actors in its nodes...
void setParent(ActorTreeAbstract *p)
For internal use only.
void setChild(int i, ActorTreeAbstract *node)
Sets the i-th child node to be node
bool eraseChild(ActorTreeAbstract *node)
Removes the given node.
void eraseAllChildren()
Removes all the child nodes.