csTreeNode Class Reference
A generic tree class. More...
#include <tree.h>
Public Methods | |
bool | IsLeaf () |
Returns true if this node has no children. | |
void | RemoveChild (csTreeNode *child) |
Remove a child node. | |
void | AddChild (csTreeNode *child) |
Add a child node. | |
csTreeNode (csTreeNode *theParent=0) | |
Create node, optionally as a child of theParent . | |
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. | |
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. |
Detailed Description
A generic tree class.
Definition at line 28 of file tree.h.
Constructor & Destructor Documentation
|
Create node, optionally as a child of
Definition at line 47 of file tree.h. References children. |
Member Function Documentation
|
Add a child node.
Definition at line 43 of file tree.h. References parent. |
|
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 100 of file tree.h. References children, IsLeaf(), csArray< csTreeNode * >::Length(), and csArray< T, ElementHandler, MemoryAllocator >::Length(). |
|
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 69 of file tree.h. References csArray< csTreeNode * >::Length(). |
|
Returns true if this node has no children.
Definition at line 32 of file tree.h. References csArray< csTreeNode * >::Length(). Referenced by BSF(). |
|
Remove a child node.
|
The documentation for this class was generated from the following file:
- csutil/tree.h
Generated for Crystal Space by doxygen 1.2.18