a simple tree representation
#include <ctree.h>
|
|
typedef SMARTP< T > | treePtr |
| | the node sub elements type
|
| |
|
typedef std::vector< treePtr > | branchs |
| | the node sub elements container type
|
| |
|
typedef branchs::iterator | literator |
| | the current level iterator type
|
| |
|
typedef treeIterator< treePtr > | iterator |
| | the top -> bottom iterator type
|
| |
|
|
branchs & | elements () |
| |
|
const branchs & | elements () const |
| |
|
virtual void | push (const treePtr &t) |
| |
|
virtual int | size () const |
| |
|
virtual bool | empty () const |
| |
|
iterator | begin () |
| |
|
iterator | end () |
| |
|
iterator | erase (iterator i) |
| |
|
iterator | insert (iterator before, const treePtr &value) |
| |
|
literator | lbegin () |
| |
|
literator | lend () |
| |
|
unsigned | refs () const |
| | gives the reference count of the object
|
| |
|
void | addReference () |
| | addReference increments the ref count and checks for refCount overflow
|
| |
|
void | removeReference () |
| | removeReference delete the object when refCount is zero
|
| |