#include <genesis/tree/tree/node.hpp>
Definition at line 58 of file node.hpp.
◆ TreeNode() [1/4]
◆ TreeNode() [2/4]
◆ ~TreeNode()
◆ TreeNode() [3/4]
◆ TreeNode() [4/4]
◆ data() [1/2]
◆ data() [2/2]
NodeDataType const& data |
( |
| ) |
const |
|
inline |
◆ data_cast() [1/2]
NodeDataType* data_cast |
( |
| ) |
|
|
inline |
◆ data_cast() [2/2]
NodeDataType const* data_cast |
( |
| ) |
const |
|
inline |
◆ data_is()
bool data_is |
( |
bool |
allow_null = false | ) |
const |
|
inline |
Return true
iff the TreeNode has a data object assigned to it that is of a particular given data type.
Definition at line 178 of file node.hpp.
◆ data_is_derived_from()
bool data_is_derived_from |
( |
bool |
allow_null = false | ) |
const |
|
inline |
Return true
iff the TreeNode has a data object assigned to it that is derived from a particular given data type.
Definition at line 193 of file node.hpp.
◆ data_ptr() [1/2]
Return a pointer to the data.
In most cases, using data<>() is more convenient. However, in some cases, this function might be necessary.
Definition at line 232 of file node.hpp.
◆ data_ptr() [2/2]
Return a const pointer to the data.
In most cases, using data<>() is more convenient. However, in some cases, this function might be necessary.
Definition at line 243 of file node.hpp.
◆ has_data()
Return true
if the TreeNode has a data object assigned to it.
Definition at line 168 of file node.hpp.
◆ index()
Return the index of this Node.
Definition at line 102 of file node.hpp.
◆ link() [1/2]
Return the TreeLink that points towards the root.
This is just an alias for primary_link(), that is shorter to use when needed frequently in an algorithm.
Definition at line 129 of file node.hpp.
◆ link() [2/2]
Return the TreeLink that points towards the root.
This is just an alias for primary_link(), that is shorter to use when needed frequently in an algorithm.
Definition at line 140 of file node.hpp.
◆ operator=() [1/2]
◆ operator=() [2/2]
◆ primary_edge() [1/2]
◆ primary_edge() [2/2]
◆ primary_link() [1/2]
◆ primary_link() [2/2]
◆ reset_data()
Reset the data pointer of this TreeNode.
Using this function, a TreeNode can be assigend new data. It is also possible to change the data type completely (as long as it derives from BaseNodeData). Be however aware that many functions that work with trees expcet a certain data type. Thus, changing it might break those functions and lead to exceptions and other errors.
Definition at line 290 of file node.hpp.
◆ reset_index()
Reset the internal index of this TreeNode.
This is a helper function that needs to be used with care and only in cases where appropriate. The index is an invariant that needs to be kept, as it needs to match the index in the Tree container.
This function exists to allow building and modifying a Tree without the need for many friend declarations. However, the function should rarely be needed outside of this context.
Definition at line 262 of file node.hpp.
◆ reset_primary_link()
Reset the internal pointer to the TreeLink of this TreeNode.
This is a helper function that needs to be used with care and only in cases where appropriate.
This function exists to allow building and modifying a Tree without the need for many friend declarations. However, the function should rarely be needed outside of this context.
Definition at line 276 of file node.hpp.
◆ Tree
The documentation for this class was generated from the following file: