![]() |
Public API Reference |
#include <tree.h>
Public Methods | |
bool | IsLeaf () |
Returns true if this node has no children. More... | |
void | RemoveChild (csTreeNode *child) |
Remove a child node. More... | |
void | AddChild (csTreeNode *child) |
Add a child node. More... | |
csTreeNode (csTreeNode *theParent=0) | |
Create node, optionally as a child of theParent . More... | |
csTreeNode * | DSF (bool(*TreeFunc)(csTreeNode *node, void *param, bool stopOnSuccess), bool(*SelBranch)(csTreeNode *node), void *param, bool stopOnSuccess) |
Execute a function on this node and its children. More... | |
csTreeNode * | BSF (bool(*TreeFunc)(csTreeNode *node, void *param, bool stopOnSuccess), bool(*SelBranch)(csTreeNode *node), void *param, bool stopOnSuccess) |
Execute a function on this node and its children. More... |
Definition at line 27 of file tree.h.
|
Create node, optionally as a child of
Definition at line 46 of file tree.h. References children, and csArray< csTreeNode * >::Push. |
|
Add a child node.
Definition at line 42 of file tree.h. References parent, and csArray< csTreeNode * >::Push. |
|
Execute a function on this node and its children. Do this in "BreadthSearchFirst" order, that is check first all direct children before diving into subchildren. Returns the last node where TreeFunc resulted in TRUE. If stopOnSuccess is true, then execution is stoped after first successful execution of TreeFunc. SelBranch lets you decide which children to select for further investugation. 0 means all children. Definition at line 99 of file tree.h. References children, csArray::DeleteAll, csArray::DeleteIndex, IsLeaf, csArray< csTreeNode * >::Length, csArray::Length, and csArray::Push. |
|
Execute a function on this node and its children. Do this in "DepthSearchFirst" order, that is check a childs children before testing the next direct child. Returns the last node where TreeFunc resulted in TRUE. If stopOnSuccess is true, then execution is stoped after first successful execution of TreeFunc. SelBranch lets you decide which children to select for further investigation. 0 means all children. Definition at line 68 of file tree.h. References csArray< csTreeNode * >::Length. |
|
Returns true if this node has no children.
Definition at line 31 of file tree.h. References csArray< csTreeNode * >::Length. Referenced by BSF. |
|
Remove a child node.
Definition at line 35 of file tree.h. References csArray< csTreeNode * >::DeleteIndex, and csArray< csTreeNode * >::Find. |