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

Ternany node is specialisation of Anyary node to three children. More...

#include <tree_base.hpp>

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

Public Member Functions

 TernaryNode (const Data &f, const Data &s, const Data &t)
 Constructor of the class accepting the three child nodes. More...
 
 TernaryNode (Data &&f, Data &&s, Data &&t)
 Constructor of the class accepting the three child nodes. More...
 
Data & getFirst ()
 Getter of the first child of the node. More...
 
const Data & getFirst () const
 Getter of the first child of the node. More...
 
void setFirst (const Data &f)
 Setter of the first child of the node. More...
 
void setFirst (Data &&f)
 Setter of the first child of the node. More...
 
Data & getSecond ()
 Getter of the second child of the node. More...
 
const Data & getSecond () const
 Getter of the second child of the node. More...
 
void setSecond (const Data &s)
 Setter of the second child of the node. More...
 
void setSecond (Data &&s)
 Setter of the second child of the node. More...
 
Data & getThird ()
 Getter of the third child of the node. More...
 
const Data & getThird () const
 Getter of the third child of the node. More...
 
void setThird (const Data &t)
 Setter of the third child of the node. More...
 
void setThird (Data &&t)
 Setter of the third child of the node. More...
 
- Public Member Functions inherited from ext::AnyaryNode< Data, 3, Data >
 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...
 
AnyaryNodeoperator= (const AnyaryNode &other)
 Copy operator of assignment. More...
 
AnyaryNodeoperator= (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...
 

Detailed Description

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

Ternany node is specialisation of Anyary node to three 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

◆ TernaryNode() [1/2]

template<class Data , class Base = Data>
ext::TernaryNode< Data, Base >::TernaryNode ( const Data &  f,
const Data &  s,
const Data &  t 
)
inline

Constructor of the class accepting the three child nodes.

Parameters
fthe first child node of the new node
sthe second child node of the new node
tthe third child node of the new node

◆ TernaryNode() [2/2]

template<class Data , class Base = Data>
ext::TernaryNode< Data, Base >::TernaryNode ( Data &&  f,
Data &&  s,
Data &&  t 
)
inline

Constructor of the class accepting the three child nodes.

Parameters
fthe first child node of the new node
sthe second child node of the new node
tthe third child node of the new node

Member Function Documentation

◆ getFirst() [1/2]

template<class Data , class Base = Data>
Data & ext::TernaryNode< Data, Base >::getFirst ( )
inline

Getter of the first child of the node.

Returns
the first child of the node

◆ getFirst() [2/2]

template<class Data , class Base = Data>
const Data & ext::TernaryNode< Data, Base >::getFirst ( ) const
inline

Getter of the first child of the node.

Returns
the first child of the node

◆ getSecond() [1/2]

template<class Data , class Base = Data>
Data & ext::TernaryNode< Data, Base >::getSecond ( )
inline

Getter of the second child of the node.

Returns
the second child of the node

◆ getSecond() [2/2]

template<class Data , class Base = Data>
const Data & ext::TernaryNode< Data, Base >::getSecond ( ) const
inline

Getter of the second child of the node.

Returns
the second child of the node

◆ getThird() [1/2]

template<class Data , class Base = Data>
Data & ext::TernaryNode< Data, Base >::getThird ( )
inline

Getter of the third child of the node.

Returns
the third child of the node

◆ getThird() [2/2]

template<class Data , class Base = Data>
const Data & ext::TernaryNode< Data, Base >::getThird ( ) const
inline

Getter of the third child of the node.

Returns
the third child of the node

◆ setFirst() [1/2]

template<class Data , class Base = Data>
void ext::TernaryNode< Data, Base >::setFirst ( const Data &  f)
inline

Setter of the first child of the node.

Parameters
fthe first child of the node

◆ setFirst() [2/2]

template<class Data , class Base = Data>
void ext::TernaryNode< Data, Base >::setFirst ( Data &&  f)
inline

Setter of the first child of the node.

Parameters
fthe first child of the node

◆ setSecond() [1/2]

template<class Data , class Base = Data>
void ext::TernaryNode< Data, Base >::setSecond ( const Data &  s)
inline

Setter of the second child of the node.

Parameters
sthe child of the node

◆ setSecond() [2/2]

template<class Data , class Base = Data>
void ext::TernaryNode< Data, Base >::setSecond ( Data &&  s)
inline

Setter of the second child of the node.

Parameters
sthe child of the node

◆ setThird() [1/2]

template<class Data , class Base = Data>
void ext::TernaryNode< Data, Base >::setThird ( const Data &  t)
inline

Setter of the third child of the node.

Parameters
tthe third child of the node

◆ setThird() [2/2]

template<class Data , class Base = Data>
void ext::TernaryNode< Data, Base >::setThird ( Data &&  t)
inline

Setter of the third child of the node.

Parameters
tthe third child of the node

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