ug4
ug::AssocElemIter< TElem, TAssocElem, VSorted > Class Template Reference

Iterator that allows to traverse associated elements of a given element. More...

#include <associated_elements_iterator.h>

+ Inheritance diagram for ug::AssocElemIter< TElem, TAssocElem, VSorted >:

Public Member Functions

 AssocElemIter (Grid &grid, TElem *elem, typename Grid::traits< TAssocElem >::callback cbConsiderElem=ConsiderAll())
 
 AssocElemIter (typename Grid::traits< TAssocElem >::callback cbConsiderElem=ConsiderAll())
 
AssocElemIter end () const
 
bool invalid () const
 
bool operator!= (const AssocElemIter &iter) const
 returns true if exactly one iterator is invalid or if the iterators point to different elements. More...
 
TAssocElem * operator* ()
 
AssocElemIteroperator++ ()
 
AssocElemIter operator++ (int unused)
 
bool operator== (const AssocElemIter &iter) const
 returns true if both iterators are invalid or if both point to the same elemnt. More...
 
void reinit (Grid &grid, TElem *elem)
 
void reinit (Grid &grid, TElem *elem, typename Grid::traits< TAssocElem >::callback cb)
 
void set_callback (typename Grid::traits< TAssocElem >::callback cbConsiderElem)
 
bool valid () const
 

Private Member Functions

TAssocElem * dereference () const
 dereference More...
 
bool equal (AssocElemIter const &other) const
 returns true if both iterators are invalid or if both point to the same elemnt. More...
 
void increment ()
 returns next iterator More...
 
void init (Grid &grid, TElem *elem)
 

Private Attributes

Grid::traits< TAssocElem >::secure_container m_assElems
 
Grid::traits< TAssocElem >::callback m_cbConsiderElem
 
size_t m_i
 

Detailed Description

template<class TElem, class TAssocElem, bool VSorted = false>
class ug::AssocElemIter< TElem, TAssocElem, VSorted >

Iterator that allows to traverse associated elements of a given element.

The type of the element whose associated elements shall be traversed has to be specified through the template argument TElem. The type of the associated elements has to be specified through the TAssocElem template argument. Through VRefOrder one can choose whether the traversed associated elements shall be sorted in the order in which they appear in the reference element of given element (false by default).

Constructor & Destructor Documentation

◆ AssocElemIter() [1/2]

template<class TElem , class TAssocElem , bool VSorted = false>
ug::AssocElemIter< TElem, TAssocElem, VSorted >::AssocElemIter ( typename Grid::traits< TAssocElem >::callback  cbConsiderElem = ConsiderAll())
inline

◆ AssocElemIter() [2/2]

template<class TElem , class TAssocElem , bool VSorted = false>
ug::AssocElemIter< TElem, TAssocElem, VSorted >::AssocElemIter ( Grid grid,
TElem *  elem,
typename Grid::traits< TAssocElem >::callback  cbConsiderElem = ConsiderAll() 
)
inline

Member Function Documentation

◆ dereference()

◆ end()

template<class TElem , class TAssocElem , bool VSorted = false>
AssocElemIter ug::AssocElemIter< TElem, TAssocElem, VSorted >::end ( ) const
inline

◆ equal()

template<class TElem , class TAssocElem , bool VSorted = false>
bool ug::AssocElemIter< TElem, TAssocElem, VSorted >::equal ( AssocElemIter< TElem, TAssocElem, VSorted > const &  other) const
inlineprivate

◆ increment()

◆ init()

◆ invalid()

template<class TElem , class TAssocElem , bool VSorted = false>
bool ug::AssocElemIter< TElem, TAssocElem, VSorted >::invalid ( ) const
inline

◆ operator!=()

template<class TElem , class TAssocElem , bool VSorted = false>
bool ug::AssocElemIter< TElem, TAssocElem, VSorted >::operator!= ( const AssocElemIter< TElem, TAssocElem, VSorted > &  iter) const
inline

returns true if exactly one iterator is invalid or if the iterators point to different elements.

References ug::AssocElemIter< TElem, TAssocElem, VSorted >::equal().

◆ operator*()

template<class TElem , class TAssocElem , bool VSorted = false>
TAssocElem* ug::AssocElemIter< TElem, TAssocElem, VSorted >::operator* ( )
inline

◆ operator++() [1/2]

template<class TElem , class TAssocElem , bool VSorted = false>
AssocElemIter& ug::AssocElemIter< TElem, TAssocElem, VSorted >::operator++ ( )
inline

◆ operator++() [2/2]

template<class TElem , class TAssocElem , bool VSorted = false>
AssocElemIter ug::AssocElemIter< TElem, TAssocElem, VSorted >::operator++ ( int  unused)
inline

◆ operator==()

template<class TElem , class TAssocElem , bool VSorted = false>
bool ug::AssocElemIter< TElem, TAssocElem, VSorted >::operator== ( const AssocElemIter< TElem, TAssocElem, VSorted > &  iter) const
inline

returns true if both iterators are invalid or if both point to the same elemnt.

References ug::AssocElemIter< TElem, TAssocElem, VSorted >::equal().

◆ reinit() [1/2]

template<class TElem , class TAssocElem , bool VSorted = false>
void ug::AssocElemIter< TElem, TAssocElem, VSorted >::reinit ( Grid grid,
TElem *  elem 
)
inline

◆ reinit() [2/2]

template<class TElem , class TAssocElem , bool VSorted = false>
void ug::AssocElemIter< TElem, TAssocElem, VSorted >::reinit ( Grid grid,
TElem *  elem,
typename Grid::traits< TAssocElem >::callback  cb 
)
inline

◆ set_callback()

template<class TElem , class TAssocElem , bool VSorted = false>
void ug::AssocElemIter< TElem, TAssocElem, VSorted >::set_callback ( typename Grid::traits< TAssocElem >::callback  cbConsiderElem)
inline

◆ valid()

Member Data Documentation

◆ m_assElems

◆ m_cbConsiderElem

◆ m_i


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