Stroika Library 3.0d24
 
Loading...
Searching...
No Matches
Stroika::Foundation::Traversal::DelegatedIterator< T, EXTRA_DATA > Class Template Reference

#include <DelegatedIterator.h>

Inheritance diagram for Stroika::Foundation::Traversal::DelegatedIterator< T, EXTRA_DATA >:
Stroika::Foundation::Traversal::Iterator< T, ITERATOR_TRAITS >

Additional Inherited Members

- Public Types inherited from Stroika::Foundation::Traversal::Iterator< T, ITERATOR_TRAITS >
using difference_type = typename ITERATOR_TRAITS::difference_type
 difference_type = typename ITERATOR_TRAITS::difference_type;
 
using value_type = typename ITERATOR_TRAITS::value_type
 value_type = typename ITERATOR_TRAITS::value_type;
 
using pointer = typename ITERATOR_TRAITS::pointer
 pointer = typename ITERATOR_TRAITS::pointer;
 
using reference = typename ITERATOR_TRAITS::reference
 reference = typename ITERATOR_TRAITS::reference;
 
using iterator_category = forward_iterator_tag
 iterator_category = forward_iterator_tag;
 
- Public Member Functions inherited from Stroika::Foundation::Traversal::Iterator< T, ITERATOR_TRAITS >
 Iterator (const unique_ptr< IRep > &rep) noexcept
 This overload is usually not called directly. Instead, iterators are usually created from a container (eg. Sequence<T>{}.begin()).
 
nonvirtual Iteratoroperator= (Iterator &&rhs) noexcept
 Iterators are safely copyable, preserving their current position. Copy-Assigning could throw since it probably involves a Clone()
 
nonvirtual const T & operator* () const
 Return the Current value pointed to by the Iterator<T> (same as Current())
 
nonvirtual const value_typeoperator-> () const
 Return a pointer to the current value pointed to by the Iterator<T> (like Current())
 
nonvirtual Iteratoroperator++ ()
 Advance iterator; support for range-based-for, and STL style iteration in general (containers must also support begin, end).
 
nonvirtual Iterator operator+ (ptrdiff_t i) const
 
nonvirtual operator bool () const
 return not AtEnd ()
 
nonvirtual bool operator== (const Iterator &rhs) const
 Equals () checks if two iterators are equal to one another (point to the same position in the sequence).
 
nonvirtual const T & Current () const
 Returns the value of the current item visited by the Iterator<T>, and is illegal to call if AtEnd()
 
nonvirtual bool AtEnd () const
 AtEnd () means there is nothing left in this iterator (a synonym for (it == container.end ()).
 
nonvirtual void reset ()
 Set to AtEnd and disassociate with owner.
 
nonvirtual void clear ()
 Set to AtEnd and disassociate with owner.
 
nonvirtual IRepGetRep ()
 Get a reference to the IRep owned by the iterator. This is an implementation detail, mainly intended for implementors.
 
nonvirtual const IRepConstGetRep () const
 Get a reference to the IRep owned by the iterator. This is an implementation detail, mainly intended for implementors.
 
nonvirtual void Refresh ()
 Refresh the current iterator state based on what is in the underlying IRep.
 
nonvirtual void Invariant () const noexcept
 Invariant does nothing if !qStroika_Foundation_Debug_AssertionsChecked, but if qStroika_Foundation_Debug_AssertionsChecked, checks internal state and asserts in good shape.
 
- Static Public Member Functions inherited from Stroika::Foundation::Traversal::Iterator< T, ITERATOR_TRAITS >
static constexpr default_sentinel_t GetEmptyIterator () noexcept
 Used by someContainer::end ()
 

Detailed Description

template<typename T, typename EXTRA_DATA = Common::Empty>
class Stroika::Foundation::Traversal::DelegatedIterator< T, EXTRA_DATA >

Handy helper to combine (or track) iterators

Definition at line 25 of file DelegatedIterator.h.


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