KaMPIng 0.1.1
Flexible and (near) zero-overhead C++ bindings for MPI
|
Object representing a node in a tree. The class is not meant to be used on its own but to encapsulate the basic "tree-node behaviour" (e.g. management of children nodes etc.) for other specialised node classes like TimerTreeNode via CRTP paradigm. More...
#include <measurement_utils.hpp>
Public Member Functions | |
TreeNode () | |
Constructs node without pointer to parent and empty name. | |
TreeNode (std::string const &name) | |
Constructs node without pointer to parent. | |
TreeNode (std::string const &name, DerivedNode *parent) | |
Constructs node pointer to parent. | |
auto & | find_or_insert (std::string const &name) |
Searches the node's children for a node with the given name. If there is no such child a new node is inserted. | |
auto & | parent_ptr () |
Access to the parent pointer. | |
auto const & | children () const |
Access to the node's children. | |
auto const & | name () const |
Access to the node's children. | |
Object representing a node in a tree. The class is not meant to be used on its own but to encapsulate the basic "tree-node behaviour" (e.g. management of children nodes etc.) for other specialised node classes like TimerTreeNode via CRTP paradigm.
DerivedNode | Specialised node type for which the basisc "tree node behaviour" is encapsulated. |
|
inline |
Constructs node without pointer to parent.
name | Name associated with this node. |
|
inline |
Constructs node pointer to parent.
name | Name associated with this node. |
parent | Pointer to this node's parent pointer. |
|
inline |
Access to the node's children.
|
inline |
Searches the node's children for a node with the given name. If there is no such child a new node is inserted.
name | Name of the child which is searched. |
|
inline |
Access to the node's children.
|
inline |
Access to the parent pointer.