yat
0.21pre
|
#include <yat/utility/WeightedIteratorArchetype.h>
Public Member Functions | |
WeightedIteratorArchetype (void) | |
Default Constructor. More... | |
WeightedIteratorArchetype (WeightedIteratorArchetype_ctor_arg arg) | |
Constructor. More... | |
WeightedIteratorArchetype (const WeightedIteratorArchetype< boost::iterator_archetypes::readable_writable_iterator_t, TraversalCategory > &other) | |
Friends | |
class | boost::iterator_core_access |
The purpose of this class is to complement boost::iterator_archetype, which doesn't work well when the value_type is DataWeight (weighted iterator) and reference is not DataWeight&. In that case boost::iterator_archetype creates a proxy class that doesn't work well with yat's machinery to detect whether an iterator is weighted or not. This class returns DataWeightProxy from operator* and works as intended.
Template arguments:
AccessCategory: either boost::iterator_archetypes::readable_iterator_t (for const iterator) or boost::iterator_archetypes::readable_writable_iterator_t (for mutable iterator)
Only writable iterators are not allowed because a weighted iterator must be readable in order to ensure that value_type is defined.
TraversalCategory is one of the boost categories: boost::single_pass_traversal_tag boost::forward_traversal_tag boost::bidirectional_traversal_tag boost::random_access_traversal_tag
|
inline |
Default Constructor.
Only implemented for single pass iterators (not for e.g. output iterator).
|
inlineexplicit |
Constructor.
If iterator is not default constructible (e.g. output iterator), this is only way to create an iterator.
|
inline |
Create an iterator from a mutable iterator, i.e., this is a copy constructor if mutable, otherwise conversion from mutable to const iterator.