aimstil  5.0.5
til::NaryTree< T, N >::Node Class Reference

Internal class used inside binary tree. More...

#include <cathier/binary_tree.h>

Public Types

typedef T value_type
 

Public Member Functions

 Node ()
 Default constructor, set everything to zero. More...
 
 Node (const T &value)
 Constructor with a single value: collect value and set branches to zero. More...
 
const T & operator() () const
 
T & operator() ()
 
const T & get () const
 
T & get ()
 
Nodechild (std::size_t i) const
 Returns a pointer on the n-th child. More...
 
Node *& child (std::size_t i)
 Returns a pointer on the n-th child. More...
 
void operator= (const T &value)
 

Detailed Description

template<typename T, std::size_t N>
class til::NaryTree< T, N >::Node

Internal class used inside binary tree.

This class is a private class, theoretically you should not have to know anything about it to use trees, the same way you probably haven't heard of _List_node even though you have been using a GNU implementation of std::list.

Definition at line 116 of file binary_tree.h.

Member Typedef Documentation

◆ value_type

template<typename T, std::size_t N>
typedef T til::NaryTree< T, N >::Node::value_type

Definition at line 120 of file binary_tree.h.

Constructor & Destructor Documentation

◆ Node() [1/2]

template<typename T, std::size_t N>
til::NaryTree< T, N >::Node::Node ( )
inline

Default constructor, set everything to zero.

Definition at line 125 of file binary_tree.h.

◆ Node() [2/2]

template<typename T, std::size_t N>
til::NaryTree< T, N >::Node::Node ( const T &  value)
inlineexplicit

Constructor with a single value: collect value and set branches to zero.

Definition at line 133 of file binary_tree.h.

Member Function Documentation

◆ child() [1/2]

template<typename T, std::size_t N>
Node* til::NaryTree< T, N >::Node::child ( std::size_t  i) const
inline

Returns a pointer on the n-th child.

Definition at line 149 of file binary_tree.h.

References til::size().

◆ child() [2/2]

template<typename T, std::size_t N>
Node* & til::NaryTree< T, N >::Node::child ( std::size_t  i)
inline

Returns a pointer on the n-th child.

Definition at line 156 of file binary_tree.h.

References til::size().

◆ get() [1/2]

template<typename T, std::size_t N>
const T& til::NaryTree< T, N >::Node::get ( ) const
inline

Definition at line 145 of file binary_tree.h.

◆ get() [2/2]

template<typename T, std::size_t N>
T& til::NaryTree< T, N >::Node::get ( )
inline

Definition at line 146 of file binary_tree.h.

◆ operator()() [1/2]

template<typename T, std::size_t N>
const T& til::NaryTree< T, N >::Node::operator() ( ) const
inline

Definition at line 142 of file binary_tree.h.

◆ operator()() [2/2]

template<typename T, std::size_t N>
T& til::NaryTree< T, N >::Node::operator() ( )
inline

Definition at line 143 of file binary_tree.h.

◆ operator=()

template<typename T, std::size_t N>
void til::NaryTree< T, N >::Node::operator= ( const T &  value)
inline

Definition at line 162 of file binary_tree.h.

References til::operator*().


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