Nebula
|
#include <simpletree.h>
public node class
Public Member Functions | |
Node () | |
default constructor | |
Node (const Node &parent, const VALUETYPE &val) | |
constructor with parent and value | |
~Node () | |
destructor | |
const Node & | operator[] (IndexT i) const |
get read-only child by index | |
Node & | operator[] (IndexT i) |
get read/write child by index | |
const Node & | Child (IndexT i) const |
get read-only child element at index | |
Node & | Child (IndexT i) |
get read/write child element at index | |
bool | HasParent () const |
return true if the node has a parent | |
Node & | Parent () |
read/write access to parent | |
const Node & | Parent () const |
read-only access to parent | |
void | Clear () |
clear children | |
SizeT | Size () const |
number of children | |
bool | IsEmpty () const |
return true if empty | |
Node & | Front () const |
return first element | |
Node & | Back () 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 | |
Private Attributes | |
Node * | parent |
VALUETYPE | value |
Array< Node * > | children |
Util::SimpleTree< VALUETYPE >::Node::Node | ( | ) |
default constructor
Util::SimpleTree< VALUETYPE >::Node::Node | ( | const Node & | parent, |
const VALUETYPE & | val ) |
constructor with parent and value
Util::SimpleTree< VALUETYPE >::Node::~Node | ( | ) |
destructor
void Util::SimpleTree< VALUETYPE >::Node::Append | ( | const VALUETYPE & | val | ) |
add element at back of array
SimpleTree< VALUETYPE >::Node & Util::SimpleTree< VALUETYPE >::Node::Back | ( | ) | const |
return last element
SimpleTree< VALUETYPE >::Node & Util::SimpleTree< VALUETYPE >::Node::Child | ( | IndexT | i | ) |
get read/write child element at index
const SimpleTree< VALUETYPE >::Node & Util::SimpleTree< VALUETYPE >::Node::Child | ( | IndexT | i | ) | const |
get read-only child element at index
void Util::SimpleTree< VALUETYPE >::Node::Clear | ( | ) |
clear children
void Util::SimpleTree< VALUETYPE >::Node::Erase | ( | IndexT | i | ) |
erase at index
IndexT Util::SimpleTree< VALUETYPE >::Node::Find | ( | const VALUETYPE & | val | ) | const |
find identical element (slow);
SimpleTree< VALUETYPE >::Node & Util::SimpleTree< VALUETYPE >::Node::Front | ( | ) | const |
return first element
bool Util::SimpleTree< VALUETYPE >::Node::HasParent | ( | ) | const |
return true if the node has a parent
void Util::SimpleTree< VALUETYPE >::Node::Insert | ( | IndexT | index, |
const VALUETYPE & | val ) |
insert element before element at index
bool Util::SimpleTree< VALUETYPE >::Node::IsEmpty | ( | ) | const |
return true if empty
SimpleTree< VALUETYPE >::Node & Util::SimpleTree< VALUETYPE >::Node::operator[] | ( | IndexT | i | ) |
get read/write child by index
const SimpleTree< VALUETYPE >::Node & Util::SimpleTree< VALUETYPE >::Node::operator[] | ( | IndexT | i | ) | const |
get read-only child by index
SimpleTree< VALUETYPE >::Node & Util::SimpleTree< VALUETYPE >::Node::Parent | ( | ) |
read/write access to parent
const SimpleTree< VALUETYPE >::Node & Util::SimpleTree< VALUETYPE >::Node::Parent | ( | ) | const |
read-only access to parent
SizeT Util::SimpleTree< VALUETYPE >::Node::Size | ( | ) | const |
number of children
VALUETYPE & Util::SimpleTree< VALUETYPE >::Node::Value | ( | ) |
read/write access to value
const VALUETYPE & Util::SimpleTree< VALUETYPE >::Node::Value | ( | ) | const |
read-only access to value
|
private |
|
private |
|
private |