|
Neo
0.5.0
Developer Documentation
|
Represents a single tree node. More...
#include <Tree.h>
Public Member Functions | |
| TreeNode< T > * | getChild (int idx) |
| Returns the child that has the given index. More... | |
| TreeNode< T > * | addChild (T data) |
| Adds a child to the node. More... | |
| size_t | getNumChildren () |
| Returns the number of children this node has. More... | |
| void | clearChildren () |
| Clears the list of children. Attention: Does not delete any child data! More... | |
| T | getData () |
| Returns the data of this node. More... | |
| void | setOpen (bool v) |
| Configures if this node is considered to be opened up. Important for the tree view to decide whether or not tho show the children. More... | |
| bool | isOpen () |
| Checks if this node is open. More... | |
| TreeNode (T d) | |
| TreeNode () | |
| ~TreeNode () | |
Protected Attributes | |
| T | m_data |
| bool | m_opened |
| std::vector< TreeNode< T > * > | m_children |
Represents a single tree node.
|
inline |
|
inline |
|
inline |
|
inline |
Adds a child to the node.
| data | The data of the new child node. |
|
inline |
Clears the list of children. Attention: Does not delete any child data!
|
inline |
Returns the child that has the given index.
| idx | The index. |
|
inline |
Returns the data of this node.
|
inline |
Returns the number of children this node has.
|
inline |
Checks if this node is open.
|
inline |
Configures if this node is considered to be opened up. Important for the tree view to decide whether or not tho show the children.
| v | The boolean value. |
|
protected |
|
protected |
|
protected |