33 #ifndef __H__UG_associated_elements_iterator
34 #define __H__UG_associated_elements_iterator
49 template <
class TElem,
class TAssocElem,
bool VSorted = false>
50 class AssocElemIter :
public std::iterator<std::input_iterator_tag, TAssocElem*>
90 e.
m_i = std::numeric_limits<size_t>::max();
Iterator that allows to traverse associated elements of a given element.
Definition: associated_elements_iterator.h:51
bool operator==(const AssocElemIter &iter) const
returns true if both iterators are invalid or if both point to the same elemnt.
Definition: associated_elements_iterator.h:102
AssocElemIter(Grid &grid, TElem *elem, typename Grid::traits< TAssocElem >::callback cbConsiderElem=ConsiderAll())
Definition: associated_elements_iterator.h:59
bool operator!=(const AssocElemIter &iter) const
returns true if exactly one iterator is invalid or if the iterators point to different elements.
Definition: associated_elements_iterator.h:104
TAssocElem * operator*()
Definition: associated_elements_iterator.h:106
AssocElemIter end() const
Definition: associated_elements_iterator.h:87
void increment()
returns next iterator
Definition: associated_elements_iterator.h:135
AssocElemIter & operator++()
Definition: associated_elements_iterator.h:98
void set_callback(typename Grid::traits< TAssocElem >::callback cbConsiderElem)
Definition: associated_elements_iterator.h:68
void init(Grid &grid, TElem *elem)
Definition: associated_elements_iterator.h:109
Grid::traits< TAssocElem >::callback m_cbConsiderElem
Definition: associated_elements_iterator.h:155
bool invalid() const
Definition: associated_elements_iterator.h:95
TAssocElem * dereference() const
dereference
Definition: associated_elements_iterator.h:148
bool valid() const
Definition: associated_elements_iterator.h:94
void reinit(Grid &grid, TElem *elem)
Definition: associated_elements_iterator.h:73
void reinit(Grid &grid, TElem *elem, typename Grid::traits< TAssocElem >::callback cb)
Definition: associated_elements_iterator.h:79
size_t m_i
Definition: associated_elements_iterator.h:153
Grid::traits< TAssocElem >::secure_container m_assElems
Definition: associated_elements_iterator.h:154
bool equal(AssocElemIter const &other) const
returns true if both iterators are invalid or if both point to the same elemnt.
Definition: associated_elements_iterator.h:120
AssocElemIter(typename Grid::traits< TAssocElem >::callback cbConsiderElem=ConsiderAll())
Definition: associated_elements_iterator.h:53
callback that always returns true
Definition: basic_callbacks.h:50
Manages the elements of a grid and their interconnection.
Definition: grid.h:132
void associated_elements(traits< Vertex >::secure_container &elemsOut, TElem *e)
Puts all elements of type TAss which are contained in 'e' or which contain 'e' into elemsOut.
Definition: grid_impl.hpp:466
void associated_elements_sorted(traits< Vertex >::secure_container &elemsOut, TElem *e)
Puts all elements of type TAss which are contained in 'e' into elemsOut in the reference elements ord...
Definition: grid_impl.hpp:503
Container which holds an array of pointers.
Definition: pointer_const_array.h:84
boost::function< bool(base_object *)> callback
callback type for the elements base type.
Definition: grid.h:150