SyTen
syten::BinaryTree::Node< T > Class Template Reference

A node in a binary tree, containing a value of type T and possibly leaves. More...

#include <binary_tree.h>

+ Inheritance diagram for syten::BinaryTree::Node< T >:
+ Collaboration diagram for syten::BinaryTree::Node< T >:

Public Types

typedef T Value
 The type of the contained value. More...
 

Public Member Functions

MemoryUsage::MemorySize allocSize () const
 Returns the size in bytes allocated by this node and its children. More...
 
template<typename... Args>
void build_a (Args... args)
 Build a left leaf from supplied arguments. More...
 
template<typename... Args>
void build_b (Args... args)
 Build a right leaf from supplied arguments. More...
 
void clear_a ()
 Deletes left subtree if it exists. More...
 
void clear_b ()
 Deletes right subtree if it exists. More...
 
void init_a (Node &&other)
 Initialises left subtree from other node by moving. More...
 
void init_a (Node const &other)
 Initialises left subtree from other node by deep-copying. More...
 
void init_b (Node &&other)
 Initialises right subtree from other node by moving. More...
 
void init_b (Node const &other)
 Initialises right subtree from other node by deep-copying. More...
 
template<class Archive >
void load (Archive &ar, const unsigned int in_version)
 Boost deserialisation. More...
 
 Node ()=default
 Default ctor. More...
 
 Node (Node &&other)
 Move ctor. More...
 
 Node (Node const &other)
 Copy ctor. More...
 
template<typename... Args>
 Node (NodeType type, Args... args)
 Standard ctor to forward arguments to contained value type. More...
 
Nodeoperator= (Node &&other)
 Move assignment operator. More...
 
Nodeoperator= (Node const &other)
 Copy assignment operator. More...
 
void print (std::ostream &out, int current_level, Index &last)
 Printing helper. More...
 
template<typename Archive >
void save (Archive &ar, const unsigned int) const
 Boost serialisation. More...
 
Nodetop ()
 Returns ptr to top node. More...
 
Node const * top () const
 Returns ptr to top node. More...
 
 ~Node ()
 Dtor. More...
 

Public Attributes

Nodea = nullptr
 Ptr to left leaf, if existing. More...
 
Nodeb = nullptr
 Ptr to right leaf, if existing. More...
 
Noder = nullptr
 Ptr to parent node, if existing. More...
 
NodeType t = NodeType::Invalid
 Type of this node. More...
 
Value v = Value()
 The contained value. More...
 

Detailed Description

template<typename T>
class syten::BinaryTree::Node< T >

A node in a binary tree, containing a value of type T and possibly leaves.

Versioned via BinaryTree::boost_version_Node.


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