template <class T>
class Tree : protected Array<T>
a template class that can be used in the same manner as Link<T>, to see how to use it, check out the manual
T *GetPtr()
returns a pointer to self. caution on using it on Tree<T> elements only, which are not T themselves.
T *GetParent()
GetParent reference if any
T *GetRoot()
GetRoot reference, if NULL, element is root itself
void SetAsRoot()
a VERY important function. To be called for the root element to set up the root reference which is forwarded to each child later. call only once on root element only.
void Link(T & t)
provides a shallow linking of t.only, this means that it does *NOT* change pertenance of object, but simply links the root and parent reference.
void Unlink(T & t)
does the opposite of Link to object t.
void Relink()
'repairs' linkage of a tree recursively
|