Algorithms Library Toolkit
A toolkit for algorithms, especially for algorithms on formal languages
Public Member Functions
ext::FixedaryNode< Data, Base > Class Template Reference

Fixedary node is tree node that when initialized does not permit change of the number of its children. More...

#include <tree_base.hpp>

Inheritance diagram for ext::FixedaryNode< Data, Base >:
[legend]
Collaboration diagram for ext::FixedaryNode< Data, Base >:
[legend]

Public Member Functions

 FixedaryNode (ext::ptr_vector< Data > c)
 Constructor of the node from vector of children. More...
 
template<typename ... Types>
 FixedaryNode (Types &&... data)
 Constructor of the node from pack of children. More...
 
 ~FixedaryNode () noexcept override=default
 Destructor of the class. More...
 
 FixedaryNode (const FixedaryNode &other)
 Copy constructor of the class. More...
 
 FixedaryNode (FixedaryNode &&other) noexcept
 Move constructor of the class. More...
 
FixedaryNodeoperator= (const FixedaryNode &other)
 Copy operator of assignment. More...
 
FixedaryNodeoperator= (FixedaryNode &&other) noexcept
 Move operator of assignment. More...
 
const ext::ptr_vector< Data > & getChildren () &
 Getter of the vector of children. More...
 
const ext::ptr_vector< Data > & getChildren () const &
 Getter of the vector of children. More...
 
ext::ptr_vector< Data > && getChildren () &&
 Getter of the child nodes. More...
 
void setChildren (ext::ptr_vector< Data > c)
 Setter of the vector of children. More...
 
Data & getChild (size_t index)
 Getter of the child at given index. More...
 
const Data & getChild (size_t index) const
 Getter of the child at given index. More...
 
template<class PositionIterator >
void setChild (Data &&d, PositionIterator it)
 Setter of the single child of the node. More...
 
template<class PositionIterator >
void setChild (const Data &d, PositionIterator it)
 Setter of the single child of the node. More...
 
void setChild (const Data &d, size_t index)
 Setter of the single child of the node. More...
 
void setChild (Data &&d, size_t index)
 Setter of the single child of the node. More...
 
ext::ptr_vector< Data >::iterator begin ()
 Getter of an iterator to the begining of children vector. More...
 
ext::ptr_vector< Data >::const_iterator begin () const
 Getter of an iterator to the begining of children vector. More...
 
ext::ptr_vector< Data >::iterator end ()
 Getter of an iterator to the end of children vector. More...
 
ext::ptr_vector< Data >::const_iterator end () const
 Getter of an iterator to the end of children vector. More...
 

Detailed Description

template<class Data, class Base = Data>
class ext::FixedaryNode< Data, Base >

Fixedary node is tree node that when initialized does not permit change of the number of its children.

Template Parameters
Datathe base class of the actual tree nodes hierarchy on top of this one
Basethe actual class from the actual tree nodes hierarchy

Constructor & Destructor Documentation

◆ FixedaryNode() [1/4]

template<class Data , class Base = Data>
ext::FixedaryNode< Data, Base >::FixedaryNode ( ext::ptr_vector< Data >  c)
inline

Constructor of the node from vector of children.

Parameters
cthe child nodes

◆ FixedaryNode() [2/4]

template<class Data , class Base = Data>
template<typename ... Types>
ext::FixedaryNode< Data, Base >::FixedaryNode ( Types &&...  data)
inline

Constructor of the node from pack of children.

Template Parameters
Types... the types of children
Parameters
data... the actual children

◆ ~FixedaryNode()

template<class Data , class Base = Data>
ext::FixedaryNode< Data, Base >::~FixedaryNode ( )
overridedefaultnoexcept

Destructor of the class.

◆ FixedaryNode() [3/4]

template<class Data , class Base = Data>
ext::FixedaryNode< Data, Base >::FixedaryNode ( const FixedaryNode< Data, Base > &  other)
inline

Copy constructor of the class.

Parameters
otherthe other instance

◆ FixedaryNode() [4/4]

template<class Data , class Base = Data>
ext::FixedaryNode< Data, Base >::FixedaryNode ( FixedaryNode< Data, Base > &&  other)
inlinenoexcept

Move constructor of the class.

Parameters
otherthe other instance

Member Function Documentation

◆ begin() [1/2]

template<class Data , class Base = Data>
ext::ptr_vector< Data >::iterator ext::FixedaryNode< Data, Base >::begin ( )
inline

Getter of an iterator to the begining of children vector.

Returns
begin iterator
Here is the call graph for this function:

◆ begin() [2/2]

template<class Data , class Base = Data>
ext::ptr_vector< Data >::const_iterator ext::FixedaryNode< Data, Base >::begin ( ) const
inline

Getter of an iterator to the begining of children vector.

Returns
begin iterator
Here is the call graph for this function:

◆ end() [1/2]

template<class Data , class Base = Data>
ext::ptr_vector< Data >::iterator ext::FixedaryNode< Data, Base >::end ( )
inline

Getter of an iterator to the end of children vector.

Returns
end iterator
Here is the call graph for this function:

◆ end() [2/2]

template<class Data , class Base = Data>
ext::ptr_vector< Data >::const_iterator ext::FixedaryNode< Data, Base >::end ( ) const
inline

Getter of an iterator to the end of children vector.

Returns
end iterator
Here is the call graph for this function:

◆ getChild() [1/2]

template<class Data , class Base = Data>
Data & ext::FixedaryNode< Data, Base >::getChild ( size_t  index)
inline

Getter of the child at given index.

Parameters
indexthe index to retrieve
Returns
reference to the child at given index

◆ getChild() [2/2]

template<class Data , class Base = Data>
const Data & ext::FixedaryNode< Data, Base >::getChild ( size_t  index) const
inline

Getter of the child at given index.

Parameters
indexthe index to retrieve
Returns
reference to the child at given index

◆ getChildren() [1/3]

template<class Data , class Base = Data>
const ext::ptr_vector< Data > & ext::FixedaryNode< Data, Base >::getChildren ( ) &
inline

Getter of the vector of children.

Returns
the child nodes

◆ getChildren() [2/3]

template<class Data , class Base = Data>
ext::ptr_vector< Data > && ext::FixedaryNode< Data, Base >::getChildren ( ) &&
inline

Getter of the child nodes.

Returns
child nodes

◆ getChildren() [3/3]

template<class Data , class Base = Data>
const ext::ptr_vector< Data > & ext::FixedaryNode< Data, Base >::getChildren ( ) const &
inline

Getter of the vector of children.

Returns
the child nodes

◆ operator=() [1/2]

template<class Data , class Base = Data>
FixedaryNode & ext::FixedaryNode< Data, Base >::operator= ( const FixedaryNode< Data, Base > &  other)
inline

Copy operator of assignment.

Parameters
otherthe other instance

◆ operator=() [2/2]

template<class Data , class Base = Data>
FixedaryNode & ext::FixedaryNode< Data, Base >::operator= ( FixedaryNode< Data, Base > &&  other)
inlinenoexcept

Move operator of assignment.

Parameters
otherthe other instance
Here is the call graph for this function:

◆ setChild() [1/4]

template<class Data , class Base = Data>
template<class PositionIterator >
void ext::FixedaryNode< Data, Base >::setChild ( const Data &  d,
PositionIterator  it 
)
inline

Setter of the single child of the node.

Parameters
dthe new child node
itthe position where to change the child
Here is the call graph for this function:

◆ setChild() [2/4]

template<class Data , class Base = Data>
void ext::FixedaryNode< Data, Base >::setChild ( const Data &  d,
size_t  index 
)
inline

Setter of the single child of the node.

Parameters
dthe new child node
indexthe position where to change the child
Here is the call graph for this function:

◆ setChild() [3/4]

template<class Data , class Base = Data>
template<class PositionIterator >
void ext::FixedaryNode< Data, Base >::setChild ( Data &&  d,
PositionIterator  it 
)
inline

Setter of the single child of the node.

Parameters
dthe new child node
itthe position where to change the child
Here is the call graph for this function:

◆ setChild() [4/4]

template<class Data , class Base = Data>
void ext::FixedaryNode< Data, Base >::setChild ( Data &&  d,
size_t  index 
)
inline

Setter of the single child of the node.

Parameters
dthe new child node
indexthe position where to change the child
Here is the call graph for this function:

◆ setChildren()

template<class Data , class Base = Data>
void ext::FixedaryNode< Data, Base >::setChildren ( ext::ptr_vector< Data >  c)
inline

Setter of the vector of children.

Parameters
cthe new child nodes in for of a vector
Here is the call graph for this function:

The documentation for this class was generated from the following file: