MADARA  3.1.8
DeepIterator< Iterator > Class Template Reference

The iterator type returned by deep_iterate. More...

#include <DeepIterator.h>

Inheritance diagram for DeepIterator< Iterator >:
Collaboration diagram for DeepIterator< Iterator >:

Public Types

typedef Iterator::value_type underlying_value_type
 
typedef DeepIterator::value_type value_type
 

Public Member Functions

bool operator!= (const DeepIterator &o) const
 Equality operator. More...
 
value_type operator* () const
 Returns the same as the underlying iterator's operator*, except any values are deep copied first. More...
 
DeepIteratoroperator++ ()
 Pre-fix increment. More...
 
DeepIterator operator++ (int)
 Post-fix increment. More...
 
underlying_value_typeoperator-> () const
 Pass-through to the underlying iterator's operator->(). More...
 
bool operator== (const DeepIterator &o) const
 Equality operator. More...
 

Private Types

typedef IteratorTraits< Iterator > traits
 

Private Member Functions

 DeepIterator (const Iterator &i)
 

Private Attributes

Iterator i_
 

Friends

template<class I >
DeepIterator< I > deep_iterate (const I &i)
 

Detailed Description

template<class Iterator>
class DeepIterator< Iterator >

The iterator type returned by deep_iterate.

Use that function instead of constructing this class directly.

Template Parameters
Iteratorthe type of the underlying iterator. Automatically determined by deep_iterate.

Definition at line 71 of file DeepIterator.h.

Member Typedef Documentation

template<class Iterator>
typedef IteratorTraits<Iterator> DeepIterator< Iterator >::traits
private

Definition at line 76 of file DeepIterator.h.

template<class Iterator>
typedef Iterator::value_type DeepIterator< Iterator >::underlying_value_type

Definition at line 80 of file DeepIterator.h.

template<class Iterator>
typedef DeepIterator::value_type DeepIterator< Iterator >::value_type

Definition at line 79 of file DeepIterator.h.

Constructor & Destructor Documentation

template<class Iterator>
DeepIterator< Iterator >::DeepIterator ( const Iterator &  i)
inlineprivate

Definition at line 153 of file DeepIterator.h.

Member Function Documentation

template<class Iterator>
bool DeepIterator< Iterator >::operator!= ( const DeepIterator< Iterator > &  o) const
inline

Equality operator.

Passes through to underlying iterator.

Returns
same as underlying iterator

Definition at line 147 of file DeepIterator.h.

template<class Iterator>
value_type DeepIterator< Iterator >::operator* ( void  ) const
inline

Returns the same as the underlying iterator's operator*, except any values are deep copied first.

Definition at line 86 of file DeepIterator.h.

template<class Iterator>
DeepIterator& DeepIterator< Iterator >::operator++ ( void  )
inline

Pre-fix increment.

Increments underlying iterator, and returns this iterator afterwards. Use instead of post-fix whereever possible.

Returns
*this

Definition at line 109 of file DeepIterator.h.

template<class Iterator>
DeepIterator DeepIterator< Iterator >::operator++ ( int  )
inline

Post-fix increment.

Increments underlying iterator, and returns a copy of this iterator (along with a copy of the underlying iterator) from prior to this increment. If you don't need the previous iterator value, use the pre-fix increment instead.

Note: calls the underlying iterator's pre-fix increment, not post-fix.

Returns
a copy of *this from prior to the increment

Definition at line 125 of file DeepIterator.h.

template<class Iterator>
underlying_value_type* DeepIterator< Iterator >::operator-> ( ) const
inline

Pass-through to the underlying iterator's operator->().

Note that methods/variables accessed through this operator will reference the original, not a deep copy.

Returns
pointer to the underlying iterator's value

Definition at line 98 of file DeepIterator.h.

template<class Iterator>
bool DeepIterator< Iterator >::operator== ( const DeepIterator< Iterator > &  o) const
inline

Equality operator.

Passes through to underlying iterator.

Returns
same as underlying iterator

Definition at line 137 of file DeepIterator.h.

Friends And Related Function Documentation

template<class Iterator>
template<class I >
DeepIterator<I> deep_iterate ( const I &  i)
friend

Member Data Documentation

template<class Iterator>
Iterator DeepIterator< Iterator >::i_
private

Definition at line 155 of file DeepIterator.h.


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