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

Base class for hierarchy of tree node types. The tree node types can be used to construct tree structures of different types of nodes. More...

#include <tree_base.hpp>

Inheritance diagram for ext::BaseNode< Data >:
[legend]

Public Member Functions

 BaseNode ()
 Constructor of the tree hierarchy base class. More...
 
virtual ~BaseNode () noexcept=default
 Destructor of the tree hierarchy base class. More...
 
 BaseNode (const BaseNode &)
 Copy construction does not copy the parent pointer. More...
 
 BaseNode (BaseNode &&) noexcept
 Move construction does not copy the parent pointer. More...
 
BaseNodeoperator= (const BaseNode &)
 Copy assignment does not change the parent pointer. More...
 
BaseNodeoperator= (BaseNode &&) noexcept
 Move assignment does not change the parent pointer. More...
 
Data * getParent ()
 Getter of the parent of the node. More...
 
const Data * getParent () const
 Getter of the parent of the node. More...
 

Friends

template<class D , class C >
class NullaryNode
 
template<class D , class C >
class UnaryNode
 
template<class D , class C >
class BinaryNode
 
template<class D , class C >
class TernaryNode
 
template<class D , std::size_t I, class C >
class AnyaryNode
 
template<class D , class C >
class FixedaryNode
 
template<class D , class C >
class VararyNode
 

Detailed Description

template<class Data>
class ext::BaseNode< Data >

Base class for hierarchy of tree node types. The tree node types can be used to construct tree structures of different types of nodes.

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

Constructor & Destructor Documentation

◆ BaseNode() [1/3]

template<class Data >
ext::BaseNode< Data >::BaseNode ( )
inline

Constructor of the tree hierarchy base class.

◆ ~BaseNode()

template<class Data >
virtual ext::BaseNode< Data >::~BaseNode ( )
virtualdefaultnoexcept

Destructor of the tree hierarchy base class.

◆ BaseNode() [2/3]

template<class Data >
ext::BaseNode< Data >::BaseNode ( const BaseNode< Data > &  )
inline

Copy construction does not copy the parent pointer.

◆ BaseNode() [3/3]

template<class Data >
ext::BaseNode< Data >::BaseNode ( BaseNode< Data > &&  )
inlinenoexcept

Move construction does not copy the parent pointer.

Member Function Documentation

◆ getParent() [1/2]

template<class Data >
Data * ext::BaseNode< Data >::getParent ( )
inline

Getter of the parent of the node.

Returns
parent of the node

◆ getParent() [2/2]

template<class Data >
const Data * ext::BaseNode< Data >::getParent ( ) const
inline

Getter of the parent of the node.

Returns
parent of the node

◆ operator=() [1/2]

template<class Data >
BaseNode & ext::BaseNode< Data >::operator= ( BaseNode< Data > &&  )
inlinenoexcept

Move assignment does not change the parent pointer.

◆ operator=() [2/2]

template<class Data >
BaseNode & ext::BaseNode< Data >::operator= ( const BaseNode< Data > &  )
inline

Copy assignment does not change the parent pointer.

Friends And Related Function Documentation

◆ AnyaryNode

template<class Data >
template<class D , std::size_t I, class C >
friend class AnyaryNode
friend

◆ BinaryNode

template<class Data >
template<class D , class C >
friend class BinaryNode
friend

◆ FixedaryNode

template<class Data >
template<class D , class C >
friend class FixedaryNode
friend

◆ NullaryNode

template<class Data >
template<class D , class C >
friend class NullaryNode
friend

◆ TernaryNode

template<class Data >
template<class D , class C >
friend class TernaryNode
friend

◆ UnaryNode

template<class Data >
template<class D , class C >
friend class UnaryNode
friend

◆ VararyNode

template<class Data >
template<class D , class C >
friend class VararyNode
friend

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