Google

Main Page   Class Hierarchy   Compound List   File List   Compound Members  

csTreeNode Class Reference

A generic tree class. More...

#include <cstreend.h>

List of all members.

Public Methods

bool IsLeaf ()
void RemoveChild (csTreeNode *child)
void AddChild (csTreeNode *child)
 csTreeNode (csTreeNode *theParent=NULL)
virtual ~csTreeNode ()
csTreeNode* DSF (bool(*TreeFunc)(csTreeNode *node, csSome param, bool stopOnSuccess), bool(*SelBranch)(csTreeNode *node), csSome param, bool stopOnSuccess)
 Execute a function on this node and its children. More...

csTreeNode* BSF (bool(*TreeFunc)(csTreeNode *node, csSome param, bool stopOnSuccess), bool(*SelBranch)(csTreeNode *node), csSome param, bool stopOnSuccess)
 Execute a function on this node and its children. More...


Public Attributes

csTreeNode* parent
csVector children


Detailed Description

A generic tree class.


Member Function Documentation

csTreeNode * csTreeNode::BSF ( bool(* TreeFunc)(csTreeNode *node, csSome param, bool stopOnSuccess),
bool(* SelBranch)(csTreeNode *node),
csSome param,
bool stopOnSuccess ) [inline]
 

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. NULL means all children.

csTreeNode * csTreeNode::DSF ( bool(* TreeFunc)(csTreeNode *node, csSome param, bool stopOnSuccess),
bool(* SelBranch)(csTreeNode *node),
csSome param,
bool stopOnSuccess ) [inline]
 

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 investugation. NULL means all children.


The documentation for this class was generated from the following file:
Generated for Crystal Space by doxygen 1.2.5 written by Dimitri van Heesch, ©1997-2000