#include <grouped_element_iterator.hpp>
Inheritance diagram for GroupedElementIterator:
Public Member Functions | |
GroupedElementIterator () | |
Default Constructor. | |
template<typename GI, typename EI, typename GT, typename ET> | |
GroupedElementIterator (GroupedElementIterator< GI, EI, GT, ET > const &other, ElementIterator(GroupType::*group_begin_fun)()=&GroupType::begin, ElementIterator(GroupType::*group_end_fun)()=&GroupType::end, typename boost::enable_if< boost::is_convertible< GI, GroupIterator > >::type *d1=0, typename boost::enable_if< boost::is_convertible< EI, ElementIterator > >::type *d2=0, typename boost::enable_if< boost::is_convertible< GT, GroupType > >::type *d3=0, typename boost::enable_if< boost::is_convertible< ET, ElementType > >::type *d4=0) | |
Generic conversion constructor. | |
Friends | |
class | GroupedElementIterator |
class | boost::iterator_core_access |
std::ostream & | operator<< (std::ostream &os, GroupedElementIterator< GroupIterator, ElementIterator, GroupType, ElementType > const &gei) |
Classes | |
class | dc_mem_fun_ref |
This iterator allows the iteration over containers of containers (groups) of elements, as if the elements were stored contiguously in a single container. It is a true Bidirectional Iterator, and thus supports forward and backward iteration over every element in a defined range. Past-the-end iteration is undefined.
Four template arguments are required:
Default Constructor.
By default, the iterator is initialized so as to minimize the chance of NULL-ptr dereferences. Practically, this means that you shouldn't count on pointer-like behaviour when iterating on default-constructed (or past-the-end) GroupedElementIterator objects.
GroupedElementIterator | ( | GroupIterator | begin, | |
GroupIterator | end, | |||
ElementIterator(GroupType::*)() | group_begin_fun, | |||
ElementIterator(GroupType::*)() | group_end_fun, | |||
bool | at_end = false | |||
) |
Construct GroupedElementIterators from a range of element groups.
GroupedElementIterator | ( | GroupIterator | begin, | |
GroupIterator | end, | |||
bool | at_end = false | |||
) |
Construct GroupedElementIterators from a range of element groups.
GroupedElementIterator | ( | GroupedElementIterator< GI, EI, GT, ET > const & | other, | |
ElementIterator(GroupType::*)() | group_begin_fun = &GroupType::begin , |
|||
ElementIterator(GroupType::*)() | group_end_fun = &GroupType::end , |
|||
typename boost::enable_if< boost::is_convertible< GI, GroupIterator > >::type * | d1 = 0 , |
|||
typename boost::enable_if< boost::is_convertible< EI, ElementIterator > >::type * | d2 = 0 , |
|||
typename boost::enable_if< boost::is_convertible< GT, GroupType > >::type * | d3 = 0 , |
|||
typename boost::enable_if< boost::is_convertible< ET, ElementType > >::type * | d4 = 0 | |||
) |
Generic conversion constructor.
This allows GroupedElementIterator objects with a constant referent to be constructed from GroupedElementIterator objects with a non-constant referent (or, in english, to allow const_iterator types to be constructed from iterator types).
The constructor can be called with any instance of GroupedElementIterator whose template parameters are convertible to the template parameters of this class (use of boost::enable_if prevents calls to this constructor with template arguments that are not convertible).
Optionally, two additional arguments can be provided to pass function pointers that return the begin and end iterators for each group in the range (the GroupType::begin() and GroupType::end() methods are used by default -- arguments 2 and 3 allow different methods to be specified).
GroupedElementIterator | ( | GroupIterator | begin, | |
GroupIterator | end, | |||
ElementIterator(GroupType::*)() | group_begin_fun, | |||
ElementIterator(GroupType::*)() | group_end_fun, | |||
bool | at_end = false | |||
) |
Construct GroupedElementIterators from a range of element groups.
GroupedElementIterator | ( | GroupIterator | begin, | |
GroupIterator | end, | |||
bool | at_end = false | |||
) |
Construct GroupedElementIterators from a range of element groups.
friend class GroupedElementIterator [friend] |
friend class boost::iterator_core_access [friend] |
std::ostream& operator<< | ( | std::ostream & | os, | |
GroupedElementIterator< GroupIterator, ElementIterator, GroupType, ElementType > const & | gei | |||
) | [friend] |