CatapultServer  v0.5.0.1 (Elephant)
catapult::model::EntityRange< TEntity >::iterator< TIterator, TIteratorEntity > Class Template Reference

Entity range iterator. More...

Public Types

using difference_type = typename TIterator::difference_type
 
using value_type = std::remove_const_t< TIteratorEntity >
 
using pointer = TIteratorEntity *
 
using reference = TIteratorEntity &
 
using iterator_category = std::bidirectional_iterator_tag
 

Public Member Functions

 iterator (TIterator current)
 Creates an iterator around current. More...
 
bool operator== (const iterator &rhs) const
 Returns true if this iterator and rhs are equal. More...
 
bool operator!= (const iterator &rhs) const
 Returns true if this iterator and rhs are not equal. More...
 
iteratoroperator++ ()
 Advances the iterator to the next position. More...
 
iterator operator++ (int)
 Advances the iterator to the next position. More...
 
iteratoroperator-- ()
 Advances the iterator to the previous position. More...
 
iterator operator-- (int)
 Advances the iterator to the previous position. More...
 
reference operator* () const
 Returns a reference to the current entity. More...
 
pointer operator-> () const
 Returns a pointer to the current entity. More...
 
reference operator* ()
 Returns a reference to the current entity. More...
 
pointer operator-> ()
 Returns a pointer to the current entity. More...
 

Private Attributes

TIterator m_current
 

Detailed Description

template<typename TEntity>
template<typename TIterator, typename TIteratorEntity>
class catapult::model::EntityRange< TEntity >::iterator< TIterator, TIteratorEntity >

Entity range iterator.

Member Typedef Documentation

◆ difference_type

template<typename TEntity>
template<typename TIterator , typename TIteratorEntity >
using catapult::model::EntityRange< TEntity >::iterator< TIterator, TIteratorEntity >::difference_type = typename TIterator::difference_type

◆ iterator_category

template<typename TEntity>
template<typename TIterator , typename TIteratorEntity >
using catapult::model::EntityRange< TEntity >::iterator< TIterator, TIteratorEntity >::iterator_category = std::bidirectional_iterator_tag

◆ pointer

template<typename TEntity>
template<typename TIterator , typename TIteratorEntity >
using catapult::model::EntityRange< TEntity >::iterator< TIterator, TIteratorEntity >::pointer = TIteratorEntity*

◆ reference

template<typename TEntity>
template<typename TIterator , typename TIteratorEntity >
using catapult::model::EntityRange< TEntity >::iterator< TIterator, TIteratorEntity >::reference = TIteratorEntity&

◆ value_type

template<typename TEntity>
template<typename TIterator , typename TIteratorEntity >
using catapult::model::EntityRange< TEntity >::iterator< TIterator, TIteratorEntity >::value_type = std::remove_const_t<TIteratorEntity>

Constructor & Destructor Documentation

◆ iterator()

template<typename TEntity>
template<typename TIterator , typename TIteratorEntity >
catapult::model::EntityRange< TEntity >::iterator< TIterator, TIteratorEntity >::iterator ( TIterator  current)
inlineexplicit

Creates an iterator around current.

Member Function Documentation

◆ operator!=()

template<typename TEntity>
template<typename TIterator , typename TIteratorEntity >
bool catapult::model::EntityRange< TEntity >::iterator< TIterator, TIteratorEntity >::operator!= ( const iterator< TIterator, TIteratorEntity > &  rhs) const
inline

Returns true if this iterator and rhs are not equal.

◆ operator*() [1/2]

template<typename TEntity>
template<typename TIterator , typename TIteratorEntity >
reference catapult::model::EntityRange< TEntity >::iterator< TIterator, TIteratorEntity >::operator* ( )
inline

Returns a reference to the current entity.

Here is the call graph for this function:

◆ operator*() [2/2]

template<typename TEntity>
template<typename TIterator , typename TIteratorEntity >
reference catapult::model::EntityRange< TEntity >::iterator< TIterator, TIteratorEntity >::operator* ( ) const
inline

Returns a reference to the current entity.

Here is the call graph for this function:

◆ operator++() [1/2]

template<typename TEntity>
template<typename TIterator , typename TIteratorEntity >
iterator& catapult::model::EntityRange< TEntity >::iterator< TIterator, TIteratorEntity >::operator++ ( )
inline

Advances the iterator to the next position.

◆ operator++() [2/2]

template<typename TEntity>
template<typename TIterator , typename TIteratorEntity >
iterator catapult::model::EntityRange< TEntity >::iterator< TIterator, TIteratorEntity >::operator++ ( int  )
inline

Advances the iterator to the next position.

◆ operator--() [1/2]

template<typename TEntity>
template<typename TIterator , typename TIteratorEntity >
iterator& catapult::model::EntityRange< TEntity >::iterator< TIterator, TIteratorEntity >::operator-- ( )
inline

Advances the iterator to the previous position.

◆ operator--() [2/2]

template<typename TEntity>
template<typename TIterator , typename TIteratorEntity >
iterator catapult::model::EntityRange< TEntity >::iterator< TIterator, TIteratorEntity >::operator-- ( int  )
inline

Advances the iterator to the previous position.

◆ operator->() [1/2]

template<typename TEntity>
template<typename TIterator , typename TIteratorEntity >
pointer catapult::model::EntityRange< TEntity >::iterator< TIterator, TIteratorEntity >::operator-> ( )
inline

Returns a pointer to the current entity.

◆ operator->() [2/2]

template<typename TEntity>
template<typename TIterator , typename TIteratorEntity >
pointer catapult::model::EntityRange< TEntity >::iterator< TIterator, TIteratorEntity >::operator-> ( ) const
inline

Returns a pointer to the current entity.

Here is the caller graph for this function:

◆ operator==()

template<typename TEntity>
template<typename TIterator , typename TIteratorEntity >
bool catapult::model::EntityRange< TEntity >::iterator< TIterator, TIteratorEntity >::operator== ( const iterator< TIterator, TIteratorEntity > &  rhs) const
inline

Returns true if this iterator and rhs are equal.

Member Data Documentation

◆ m_current

template<typename TEntity>
template<typename TIterator , typename TIteratorEntity >
TIterator catapult::model::EntityRange< TEntity >::iterator< TIterator, TIteratorEntity >::m_current
private

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