carl  24.04
Computer ARithmetic Library
carl::tree_detail::ChildrenIterator< T, reverse > Struct Template Reference

Iterator class for iterations over all children of a given element. More...

#include <carlTree.h>

Inheritance diagram for carl::tree_detail::ChildrenIterator< T, reverse >:
Collaboration diagram for carl::tree_detail::ChildrenIterator< T, reverse >:

Public Types

using Base = BaseIterator< T, ChildrenIterator< T, reverse >, reverse >
 

Public Member Functions

 ChildrenIterator (const tree< T > *t, std::size_t base, bool end=false)
 
ChildrenIteratornext ()
 
ChildrenIteratorprevious ()
 
template<typename It >
 ChildrenIterator (const BaseIterator< T, It, reverse > &ii)
 
 ChildrenIterator (const ChildrenIterator &ii)
 
 ChildrenIterator (ChildrenIterator &&ii)
 
ChildrenIteratoroperator= (const ChildrenIterator &it)
 
ChildrenIteratoroperator= (ChildrenIterator &&it) noexcept
 
virtual ~ChildrenIterator () noexcept=default
 
const auto & nodes () const
 
const auto & node (std::size_t id) const
 
const auto & curnode () const
 
std::size_t depth () const
 
std::size_t id () const
 
bool isRoot () const
 
bool isValid () const
 
T * operator-> ()
 
T const * operator-> () const
 

Data Fields

std::size_t parent
 
std::size_t current
 

Protected Attributes

const tree< T > * mTree
 

Detailed Description

template<typename T, bool reverse = false>
struct carl::tree_detail::ChildrenIterator< T, reverse >

Iterator class for iterations over all children of a given element.

Definition at line 454 of file carlTree.h.

Member Typedef Documentation

◆ Base

template<typename T , bool reverse = false>
using carl::tree_detail::ChildrenIterator< T, reverse >::Base = BaseIterator<T,ChildrenIterator<T,reverse>,reverse>

Definition at line 458 of file carlTree.h.

Constructor & Destructor Documentation

◆ ChildrenIterator() [1/4]

template<typename T , bool reverse = false>
carl::tree_detail::ChildrenIterator< T, reverse >::ChildrenIterator ( const tree< T > *  t,
std::size_t  base,
bool  end = false 
)
inline

Definition at line 460 of file carlTree.h.

Here is the call graph for this function:

◆ ChildrenIterator() [2/4]

template<typename T , bool reverse = false>
template<typename It >
carl::tree_detail::ChildrenIterator< T, reverse >::ChildrenIterator ( const BaseIterator< T, It, reverse > &  ii)
inline

Definition at line 491 of file carlTree.h.

Here is the call graph for this function:

◆ ChildrenIterator() [3/4]

template<typename T , bool reverse = false>
carl::tree_detail::ChildrenIterator< T, reverse >::ChildrenIterator ( const ChildrenIterator< T, reverse > &  ii)
inline

Definition at line 494 of file carlTree.h.

◆ ChildrenIterator() [4/4]

template<typename T , bool reverse = false>
carl::tree_detail::ChildrenIterator< T, reverse >::ChildrenIterator ( ChildrenIterator< T, reverse > &&  ii)
inline

Definition at line 495 of file carlTree.h.

◆ ~ChildrenIterator()

template<typename T , bool reverse = false>
virtual carl::tree_detail::ChildrenIterator< T, reverse >::~ChildrenIterator ( )
virtualdefaultnoexcept

Member Function Documentation

◆ curnode()

const auto& carl::tree_detail::BaseIterator< T, ChildrenIterator< T, false > , reverse >::curnode ( ) const
inlineinherited

Definition at line 86 of file carlTree.h.

◆ depth()

std::size_t carl::tree_detail::BaseIterator< T, ChildrenIterator< T, false > , reverse >::depth ( ) const
inlineinherited

Definition at line 96 of file carlTree.h.

◆ id()

std::size_t carl::tree_detail::BaseIterator< T, ChildrenIterator< T, false > , reverse >::id ( ) const
inlineinherited

Definition at line 99 of file carlTree.h.

◆ isRoot()

bool carl::tree_detail::BaseIterator< T, ChildrenIterator< T, false > , reverse >::isRoot ( ) const
inlineinherited

Definition at line 103 of file carlTree.h.

◆ isValid()

bool carl::tree_detail::BaseIterator< T, ChildrenIterator< T, false > , reverse >::isValid ( ) const
inlineinherited

Definition at line 106 of file carlTree.h.

◆ next()

template<typename T , bool reverse = false>
ChildrenIterator& carl::tree_detail::ChildrenIterator< T, reverse >::next ( )
inline

Definition at line 473 of file carlTree.h.

Here is the call graph for this function:

◆ node()

const auto& carl::tree_detail::BaseIterator< T, ChildrenIterator< T, false > , reverse >::node ( std::size_t  id) const
inlineinherited

Definition at line 82 of file carlTree.h.

◆ nodes()

const auto& carl::tree_detail::BaseIterator< T, ChildrenIterator< T, false > , reverse >::nodes ( ) const
inlineinherited

Definition at line 79 of file carlTree.h.

◆ operator->() [1/2]

T* carl::tree_detail::BaseIterator< T, ChildrenIterator< T, false > , reverse >::operator-> ( )
inlineinherited

Definition at line 109 of file carlTree.h.

◆ operator->() [2/2]

T const* carl::tree_detail::BaseIterator< T, ChildrenIterator< T, false > , reverse >::operator-> ( ) const
inlineinherited

Definition at line 112 of file carlTree.h.

◆ operator=() [1/2]

template<typename T , bool reverse = false>
ChildrenIterator& carl::tree_detail::ChildrenIterator< T, reverse >::operator= ( ChildrenIterator< T, reverse > &&  it)
inlinenoexcept

Definition at line 501 of file carlTree.h.

Here is the call graph for this function:

◆ operator=() [2/2]

template<typename T , bool reverse = false>
ChildrenIterator& carl::tree_detail::ChildrenIterator< T, reverse >::operator= ( const ChildrenIterator< T, reverse > &  it)
inline

Definition at line 496 of file carlTree.h.

Here is the call graph for this function:

◆ previous()

template<typename T , bool reverse = false>
ChildrenIterator& carl::tree_detail::ChildrenIterator< T, reverse >::previous ( )
inline

Definition at line 481 of file carlTree.h.

Here is the call graph for this function:

Field Documentation

◆ current

std::size_t carl::tree_detail::BaseIterator< T, ChildrenIterator< T, false > , reverse >::current
inherited

Definition at line 89 of file carlTree.h.

◆ mTree

const tree<T>* carl::tree_detail::BaseIterator< T, ChildrenIterator< T, false > , reverse >::mTree
protectedinherited

Definition at line 76 of file carlTree.h.

◆ parent

template<typename T , bool reverse = false>
std::size_t carl::tree_detail::ChildrenIterator< T, reverse >::parent

Definition at line 459 of file carlTree.h.


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