![]() |
Belle II Software
release-08-02-06
|
Class for a node in the tree. More...
#include <DynTree.h>
Public Types | |
using | Tree = This |
Type of the tree containing this node. | |
using | Properties = AProperties |
Type of the Properties. | |
using | Children = std::vector< Node > |
Type of the container of the children of the node. | |
Public Member Functions | |
Children * | getChildren () |
Getter for the children. More... | |
const Children * | getChildren () const |
Const getter for the children. More... | |
void | createChildren () |
Creates the children of the node. | |
template<class AWalker > | |
void | walk (AWalker &walker) |
Calls the walker with each node starting with the top node and continues depth first The walker can signal to skip the children if false is returned. | |
template<class AWalker , class APriorityMeasure > | |
void | walk (AWalker &walker, APriorityMeasure &priority) |
Calls the walker with each node starting with the top node and continues depth first The walker can signal to skip the children if false is returned. More... | |
int | getLevel () const |
Get the level of the node. | |
Node * | getParent () |
Getter of the node one up the hierarchy. More... | |
const Node * | getParent () const |
Const getter of the node one up the hierarchy. More... | |
Tree * | getTree () const |
Getter for the tree containing this node. | |
Public Attributes | |
friend | Tree |
Allow the tree access to the node constructor to create the top node. | |
Private Member Functions | |
void | unlink () |
Remove to node from the tree hierachy. | |
Private Attributes | |
Tree * | m_tree = nullptr |
Reference to the tree that contains this node. | |
Children * | m_children = nullptr |
Children that are created only if needed. | |
int | m_level = 0 |
Level of the node within the tree. | |
Node * | m_parent = nullptr |
Parent in the tree hierachy of this node. | |
Class for a node in the tree.
|
inline |
Getter for the children.
Get the dynamically created children. Returns nullptr if they have not yet been created
Definition at line 78 of file DynTree.h.
|
inline |
|
inline |
|
inline |
|
inline |