CPPX 1.1.2
A Modern C++ Utility Library
Loading...
Searching...
No Matches
stl_ext::Node< T > Class Template Reference

#include <cppx.h>

Collaboration diagram for stl_ext::Node< T >:

Public Member Functions

 Node (T val)
 
 Node (T val, std::unique_ptr< Node< T > > left, std::unique_ptr< Node< T > > right)
 
 Node (const Node &other)
 
Nodeoperator= (const Node &other)
 
 Node (Node &&other) noexcept=default
 
Nodeoperator= (Node &&other) noexcept=default
 
int get_height_val () const
 
void set_height_val (int h)
 
std::unique_ptr< Node< T > > detach_left ()
 
std::unique_ptr< Node< T > > detach_right ()
 
const Tget_data () const
 
void set_data (const T &val)
 
Node< T > * get_left () const
 
void set_left (std::unique_ptr< Node< T > > node)
 
Node< T > * get_right () const
 
void set_right (std::unique_ptr< Node< T > > node)
 

Friends

class BST< T >
 

Detailed Description

template<typename T>
class stl_ext::Node< T >

Definition at line 16 of file cppx.h.

Constructor & Destructor Documentation

◆ Node() [1/4]

template<typename T >
stl_ext::Node< T >::Node ( T  val)
inlineexplicit

Definition at line 28 of file cppx.h.

◆ Node() [2/4]

template<typename T >
stl_ext::Node< T >::Node ( T  val,
std::unique_ptr< Node< T > >  left,
std::unique_ptr< Node< T > >  right 
)
inline

Definition at line 31 of file cppx.h.

◆ Node() [3/4]

template<typename T >
stl_ext::Node< T >::Node ( const Node< T > &  other)

Definition at line 4 of file node.tpp.

◆ Node() [4/4]

template<typename T >
stl_ext::Node< T >::Node ( Node< T > &&  other)
defaultnoexcept

Member Function Documentation

◆ detach_left()

template<typename T >
std::unique_ptr< Node< T > > stl_ext::Node< T >::detach_left ( )
inline

Definition at line 35 of file node.tpp.

◆ detach_right()

template<typename T >
std::unique_ptr< Node< T > > stl_ext::Node< T >::detach_right ( )
inline

Definition at line 40 of file node.tpp.

◆ get_data()

template<typename T >
const T & stl_ext::Node< T >::get_data ( ) const

Definition at line 45 of file node.tpp.

◆ get_height_val()

template<typename T >
int stl_ext::Node< T >::get_height_val ( ) const
inline

Definition at line 25 of file node.tpp.

◆ get_left()

template<typename T >
Node< T > * stl_ext::Node< T >::get_left ( ) const

Definition at line 55 of file node.tpp.

◆ get_right()

template<typename T >
Node< T > * stl_ext::Node< T >::get_right ( ) const

Definition at line 65 of file node.tpp.

◆ operator=() [1/2]

template<typename T >
Node< T > & stl_ext::Node< T >::operator= ( const Node< T > &  other)

Definition at line 12 of file node.tpp.

◆ operator=() [2/2]

template<typename T >
Node & stl_ext::Node< T >::operator= ( Node< T > &&  other)
defaultnoexcept

◆ set_data()

template<typename T >
void stl_ext::Node< T >::set_data ( const T val)

Definition at line 50 of file node.tpp.

◆ set_height_val()

template<typename T >
void stl_ext::Node< T >::set_height_val ( int  h)
inline

Definition at line 30 of file node.tpp.

◆ set_left()

template<typename T >
void stl_ext::Node< T >::set_left ( std::unique_ptr< Node< T > >  node)

Definition at line 60 of file node.tpp.

◆ set_right()

template<typename T >
void stl_ext::Node< T >::set_right ( std::unique_ptr< Node< T > >  node)

Definition at line 70 of file node.tpp.

Friends And Related Symbol Documentation

◆ BST< T >

template<typename T >
friend class BST< T >
friend

Definition at line 1 of file cppx.h.


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