Algorithms Library Toolkit
A toolkit for algorithms, especially for algorithms on formal languages
|
Unary node is specialisation of Anyary node to one child. More...
#include <tree_base.hpp>
Public Member Functions | |
UnaryNode (const Data &c) | |
Constructor of the class accepting the child node. More... | |
UnaryNode (Data &&c) | |
Constructor of the class accepting the child node. More... | |
Data & | getChild () |
Getter of the child of the node. More... | |
const Data & | getChild () const |
Getter of the child of the node. More... | |
void | setChild (const Data &c) |
Setter of the child of the node. More... | |
void | setChild (Data &&c) |
Setter of the child of the node. More... | |
![]() | |
AnyaryNode (ext::ptr_array< Data, arity > c) | |
Constructor based on array of child nodes. More... | |
AnyaryNode (const AnyaryNode &other) | |
Copy constructor. More... | |
AnyaryNode (AnyaryNode &&other) noexcept | |
Move constructor. More... | |
~AnyaryNode () noexcept override=default | |
Destructor of the class. More... | |
AnyaryNode & | operator= (const AnyaryNode &other) |
Copy operator of assignment. More... | |
AnyaryNode & | operator= (AnyaryNode &&other) noexcept |
move operator of assignment. More... | |
const ext::ptr_array< Data, arity > & | getChildren () & |
Getter of the child nodes. More... | |
const ext::ptr_array< Data, arity > & | getChildren () const & |
Getter of the child nodes. More... | |
ext::ptr_array< Data, arity > && | getChildren () && |
Getter of the child nodes. More... | |
const Data & | getChild () const |
Getter of the child node based on compile time index. More... | |
Data & | getChild () |
Getter of the child node based on compile time index. More... | |
void | setChildren (ext::ptr_array< Data, arity > c) |
Setter of the child nodes. More... | |
void | setChild (const Data &d) |
Setter of the child node based on compile time index. More... | |
void | setChild (Data &&d) |
Setter of the child node based on compile time index. More... | |
ext::ptr_array< Data, arity >::iterator | begin () |
Getter of an iterator to the begining of children array. More... | |
ext::ptr_array< Data, arity >::const_iterator | begin () const |
Getter of an iterator to the begining of children array. More... | |
ext::ptr_array< Data, arity >::iterator | end () |
Getter of an iterator to the end of children array. More... | |
ext::ptr_array< Data, arity >::const_iterator | end () const |
Getter of an iterator to the end of children array. More... | |
Unary node is specialisation of Anyary node to one child.
Data | the base class of the actual tree nodes hierarchy on top of this one |
Base | the actual class from the actual tree nodes hierarchy |
|
inline |
Constructor of the class accepting the child node.
c | the to be child node of the new node |
|
inline |
Constructor of the class accepting the child node.
c | the to be child node of the new node |
|
inline |
Getter of the child of the node.
|
inline |
Getter of the child of the node.
|
inline |
Setter of the child of the node.
c | the child of the node |
|
inline |
Setter of the child of the node.
c | the child of the node |