Open Model Railroad Network (OpenMRN)
Loading...
Searching...
No Matches
LinearMap< Key, Value >::Iterator Class Reference

This mimics an std::Iterator. More...

#include <LinearMap.hxx>

Public Member Functions

 Iterator ()
 Default constructor.
 
 Iterator (const Iterator &it)
 Copy constructor.
 
 Iterator (LinearMap *context, size_t index)
 Constructor.
 
 ~Iterator ()
 Destructor.
 
Pairoperator* () const
 Overloaded reference operator.
 
Pairoperator-> () const
 Overloaded pointer operator.
 
Iteratoroperator++ ()
 Overloaded pre-increement operator.
 
bool operator!= (const Iterator &it)
 Overloaded not equals operator.
 
bool operator== (const Iterator &it)
 Overloaded equals operator.
 

Private Attributes

size_t index
 index this iteration is currently indexed to
 
LinearMapm
 Context this iteration lives in.
 

Friends

class LinearMap
 Allow access to index member.
 

Detailed Description

template<typename Key, typename Value>
class LinearMap< Key, Value >::Iterator

This mimics an std::Iterator.

Definition at line 102 of file LinearMap.hxx.

Constructor & Destructor Documentation

◆ Iterator() [1/3]

template<typename Key , typename Value >
LinearMap< Key, Value >::Iterator::Iterator ( )
inline

Default constructor.

The iterator must not be used until a valid iterator is assigned to it.

Definition at line 107 of file LinearMap.hxx.

◆ Iterator() [2/3]

template<typename Key , typename Value >
LinearMap< Key, Value >::Iterator::Iterator ( const Iterator it)
inline

Copy constructor.

Definition at line 113 of file LinearMap.hxx.

◆ Iterator() [3/3]

template<typename Key , typename Value >
LinearMap< Key, Value >::Iterator::Iterator ( LinearMap context,
size_t  index 
)
inline

Constructor.

Parameters
contextcontext passed in at instantiation
indexindex to initialize this iteration with

Definition at line 123 of file LinearMap.hxx.

◆ ~Iterator()

template<typename Key , typename Value >
LinearMap< Key, Value >::Iterator::~Iterator ( )
inline

Destructor.

Definition at line 130 of file LinearMap.hxx.

Member Function Documentation

◆ operator!=()

template<typename Key , typename Value >
bool LinearMap< Key, Value >::Iterator::operator!= ( const Iterator it)
inline

Overloaded not equals operator.

Parameters
itother oterator to compare.
Returns
comparison result.

Definition at line 160 of file LinearMap.hxx.

◆ operator*()

template<typename Key , typename Value >
Pair & LinearMap< Key, Value >::Iterator::operator* ( ) const
inline

Overloaded reference operator.

Definition at line 136 of file LinearMap.hxx.

◆ operator++()

template<typename Key , typename Value >
Iterator & LinearMap< Key, Value >::Iterator::operator++ ( )
inline

Overloaded pre-increement operator.

Returns
new this.

Definition at line 149 of file LinearMap.hxx.

◆ operator->()

template<typename Key , typename Value >
Pair * LinearMap< Key, Value >::Iterator::operator-> ( ) const
inline

Overloaded pointer operator.

Definition at line 143 of file LinearMap.hxx.

◆ operator==()

template<typename Key , typename Value >
bool LinearMap< Key, Value >::Iterator::operator== ( const Iterator it)
inline

Overloaded equals operator.

Parameters
itother iterator to compare.
Returns
comparison result.

Definition at line 167 of file LinearMap.hxx.

Friends And Related Symbol Documentation

◆ LinearMap

template<typename Key , typename Value >
friend class LinearMap
friend

Allow access to index member.

Definition at line 180 of file LinearMap.hxx.

Member Data Documentation

◆ index

template<typename Key , typename Value >
size_t LinearMap< Key, Value >::Iterator::index
private

index this iteration is currently indexed to

Definition at line 174 of file LinearMap.hxx.

◆ m

template<typename Key , typename Value >
LinearMap* LinearMap< Key, Value >::Iterator::m
private

Context this iteration lives in.

Definition at line 177 of file LinearMap.hxx.


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