#include <TreeItem.h>
Public Member Functions | |
SortedTreeItem (PAYLOAD val, SortedTreeItem< PAYLOAD > *parentItem=0) | |
virtual | ~SortedTreeItem () |
void | insertChildSorted (SortedTreeItem< PAYLOAD > *newChild) |
SortedTreeItem< PAYLOAD > * | parent () const |
SortedTreeItem< PAYLOAD > * | next () const |
SortedTreeItem< PAYLOAD > * | firstChild () const |
![]() | |
TreeItem (const PAYLOAD &val, TreeItem< PAYLOAD > *parent=0) | |
virtual | ~TreeItem () |
const PAYLOAD & | value () const |
void | setValue (PAYLOAD newValue) |
TreeItem< PAYLOAD > * | parent () const |
TreeItem< PAYLOAD > * | next () const |
TreeItem< PAYLOAD > * | firstChild () const |
void | setParent (TreeItem< PAYLOAD > *newParent) |
void | setNext (TreeItem< PAYLOAD > *newNext) |
void | setFirstChild (TreeItem< PAYLOAD > *newFirstChild) |
void | addChild (TreeItem< PAYLOAD > *newChild) |
Additional Inherited Members | |
![]() | |
TreeItem (PAYLOAD val, bool autoAddChild, TreeItem< PAYLOAD > *parent=0) | |
![]() | |
PAYLOAD | _value |
TreeItem< PAYLOAD > * | _parent |
TreeItem< PAYLOAD > * | _next |
TreeItem< PAYLOAD > * | _firstChild |
Template class for tree items that maintain sort order.
Class 'PAYLOAD' to provide operator<() in addition to what template 'TreeItem' requires.
|
inline |
Constructor. Creates a new tree item with value "val" and inserts it in ascending sort order into the children list of "parent".
|
inlinevirtual |
Destructor.
|
inline |
Returns this item's first child or 0 if there is none.
|
inline |
Insert a child into the internal children list in ascending sort order. Called from the new child's constructor, thus 'public'.
|
inline |
Returns this item's next sibling or 0 if there is none.
|
inline |
Returns this item's parent or 0 if there is none.