Loading...
Searching...
No Matches
VdfIndexedDataIterator< IteratedType > Class Template Reference

This is a simple "iterator filter" that erases the type and traits of the container used by VdfIndexedData<T> to store its indices and data. More...

#include <indexedDataIterator.h>

Public Types

using BaseIterator = typename std::vector< IteratedType >::const_iterator
 
using iterator_category = std::forward_iterator_tag
 
using value_type = typename BaseIterator::value_type
 
using reference = typename BaseIterator::reference
 
using pointer = typename BaseIterator::pointer
 
using difference_type = typename BaseIterator::difference_type
 

Public Member Functions

reference operator* () const
 
pointer operator-> () const
 
VdfIndexedDataIteratoroperator++ ()
 
VdfIndexedDataIterator operator++ (int)
 
bool operator== (const VdfIndexedDataIterator &rhs) const
 
bool operator!= (const VdfIndexedDataIterator &rhs) const
 

Friends

template<typename T >
class VdfIndexedData
 

Detailed Description

template<typename IteratedType>
class VdfIndexedDataIterator< IteratedType >

This is a simple "iterator filter" that erases the type and traits of the container used by VdfIndexedData<T> to store its indices and data.

It allows VdfIndexedData to supply a simple iterator with few guarantees or inferences, which client code can use with e.g. STL algorithms, while still preserving most of VdfIndexedData's ability to change container implementations without disrupting clients.

This models a const_iterator with forward traversal capability (only).

Definition at line 29 of file indexedDataIterator.h.

Member Typedef Documentation

◆ BaseIterator

using BaseIterator = typename std::vector<IteratedType>::const_iterator

Definition at line 32 of file indexedDataIterator.h.

◆ difference_type

using difference_type = typename BaseIterator::difference_type

Definition at line 38 of file indexedDataIterator.h.

◆ iterator_category

using iterator_category = std::forward_iterator_tag

Definition at line 34 of file indexedDataIterator.h.

◆ pointer

using pointer = typename BaseIterator::pointer

Definition at line 37 of file indexedDataIterator.h.

◆ reference

using reference = typename BaseIterator::reference

Definition at line 36 of file indexedDataIterator.h.

◆ value_type

using value_type = typename BaseIterator::value_type

Definition at line 35 of file indexedDataIterator.h.

Member Function Documentation

◆ operator!=()

bool operator!= ( const VdfIndexedDataIterator< IteratedType > &  rhs) const
inline

Definition at line 62 of file indexedDataIterator.h.

◆ operator*()

reference operator* ( ) const
inline

Definition at line 44 of file indexedDataIterator.h.

◆ operator++() [1/2]

VdfIndexedDataIterator & operator++ ( )
inline

Definition at line 47 of file indexedDataIterator.h.

◆ operator++() [2/2]

VdfIndexedDataIterator operator++ ( int  )
inline

Definition at line 52 of file indexedDataIterator.h.

◆ operator->()

pointer operator-> ( ) const
inline

Definition at line 45 of file indexedDataIterator.h.

◆ operator==()

bool operator== ( const VdfIndexedDataIterator< IteratedType > &  rhs) const
inline

Definition at line 58 of file indexedDataIterator.h.

Friends And Related Function Documentation

◆ VdfIndexedData

friend class VdfIndexedData
friend

Definition at line 69 of file indexedDataIterator.h.


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