4.6.0
Freundlich's C++ toolkit
Loading...
Searching...
No Matches
fcppt::container::tree Namespace Reference

Classes

struct  is_object
 A meta function testing if the given type is really a tree object. More...
 
struct  is_object< fcppt::container::tree::object< T > >
 A meta function testing if the given type is really a tree object. More...
 
class  object
 A tree data structure. More...
 
class  pre_order
 Wraps a tree to make it iterable in a pre-order fashion. More...
 
class  to_root
 

Functions

template<typename T >
fcppt::optional::object< fcppt::container::to_iterator_type< T > > child_position (T &_parent, T &_child)
 Returns an iterator pointing to the position in the parent's child container where this object resides.
 
template<typename T >
bool operator== (fcppt::container::tree::object< T > const &_a, fcppt::container::tree::object< T > const &_b)
 Compares the values and recursively the values of the children.
 
template<typename T >
bool operator!= (fcppt::container::tree::object< T > const &_a, fcppt::container::tree::object< T > const &_b)
 Compares the values and recursively the values of the children.
 
template<typename Value >
fcppt::container::tree::object< Value >::size_type depth (fcppt::container::tree::object< Value > const &_tree)
 
template<typename Value >
fcppt::container::tree::object< Value >::size_type level (fcppt::container::tree::object< Value > const &_tree)
 Calculates the level of a tree.
 
template<typename Tree >
fcppt::container::tree::pre_order< Tree > make_pre_order (Tree &_tree)
 Creates a pre_order object.
 
template<typename Tree >
fcppt::container::tree::to_root< Tree > make_to_root (Tree &_tree)
 Creates a to_root object.
 
template<typename Result , typename Value , typename Function >
Result map (fcppt::container::tree::object< Value > const &_tree, Function const &_function)
 Maps a tree to another tree.
 
template<typename T >
void swap (fcppt::container::tree::object< T > &, fcppt::container::tree::object< T > &) noexcept
 Swaps two trees.
 
template<typename Ch , typename Traits , typename Value >
std::basic_ostream< Ch, Traits > & operator<< (std::basic_ostream< Ch, Traits > &_stream, fcppt::container::tree::object< Value > const &_tree)
 Outputs a tree.
 

Function Documentation

◆ depth()

template<typename Value >
fcppt::container::tree::object< Value >::size_type fcppt::container::tree::depth ( fcppt::container::tree::object< Value > const & _tree)

◆ operator!=()

template<typename T >
bool fcppt::container::tree::operator!= ( fcppt::container::tree::object< T > const & _a,
fcppt::container::tree::object< T > const & _b )

Compares the values and recursively the values of the children.

◆ operator==()

template<typename T >
bool fcppt::container::tree::operator== ( fcppt::container::tree::object< T > const & _a,
fcppt::container::tree::object< T > const & _b )

Compares the values and recursively the values of the children.

◆ swap()

template<typename T >
void fcppt::container::tree::swap ( fcppt::container::tree::object< T > & ,
fcppt::container::tree::object< T > &  )
noexcept

Swaps two trees.