The Nebula Device 3: Util::SimpleTree< VALUETYPE >::Node Class Reference

The Nebula Device 3

Util::SimpleTree< VALUETYPE >::Node Class Reference

#include <simpletree.h>


Detailed Description

template<class VALUETYPE>
class Util::SimpleTree< VALUETYPE >::Node

public node class


Public Member Functions

 Node ()
 default constructor
 Node (const Node &parent, const VALUETYPE &val)
 constructor with parent and value
 ~Node ()
 destructor
void AddRef ()
 increment refcount
void Release ()
 decrement refcount
const Nodeoperator[] (IndexT i) const
 get read-only child by index
Nodeoperator[] (IndexT i)
 get read/write child by index
const NodeChild (IndexT i) const
 get read-only child element at index
NodeChild (IndexT i)
 get read/write child element at index
bool HasParent () const
 return true if the node has a parent
NodeParent ()
 read/write access to parent
const NodeParent () const
 read-only access to parent
void Clear ()
 clear children
SizeT Size () const
 number of children
bool IsEmpty () const
 return true if empty
NodeFront () const
 return first element
NodeBack () const
 return last element
void Append (const VALUETYPE &val)
 add element at back of array
void Erase (IndexT i)
 erase at index
void Insert (IndexT index, const VALUETYPE &val)
 insert element before element at index
IndexT Find (const VALUETYPE &val) const
 find identical element (slow);
VALUETYPE & Value ()
 read/write access to value
const VALUETYPE & Value () const
 read-only access to value