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

Actual iterator. More...

Collaboration diagram for catapult::model::BasicContiguousEntityContainer< TEntity >::iterator< TIteratorEntity >:

Public Types

using difference_type = std::ptrdiff_t
 
using value_type = TIteratorEntity
 
using pointer = TIteratorEntity *
 
using reference = TIteratorEntity &
 
using iterator_category = std::forward_iterator_tag
 

Public Member Functions

 iterator (value_type *pStart, value_type *pCurrent, State &state)
 Creates an iterator around pStart and state with specified current position (pCurrent). 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...
 
reference operator* () const
 Returns a reference to the current entity. More...
 
pointer operator-> () const
 Returns a pointer to the current entity. More...
 

Private Member Functions

constexpr bool isEntityInBuffer (value_type *pEntity) const noexcept
 
constexpr bool isEnd (value_type *pEntity) const noexcept
 
constexpr auto endBytePointer () const noexcept
 
void checkError ()
 

Static Private Member Functions

template<typename T >
static constexpr auto ToBytePointer (T *pEntity)
 
template<typename T >
static constexpr auto ToBytePointer (const T *pEntity)
 
static constexpr auto Advance (value_type *pEntity, size_t numBytes)
 

Private Attributes

value_typem_pStart
 
value_typem_pCurrent
 
Statem_state
 

Detailed Description

template<typename TEntity>
template<typename TIteratorEntity>
class catapult::model::BasicContiguousEntityContainer< TEntity >::iterator< TIteratorEntity >

Actual iterator.

Member Typedef Documentation

◆ difference_type

template<typename TEntity >
template<typename TIteratorEntity >
using catapult::model::BasicContiguousEntityContainer< TEntity >::iterator< TIteratorEntity >::difference_type = std::ptrdiff_t

◆ iterator_category

template<typename TEntity >
template<typename TIteratorEntity >
using catapult::model::BasicContiguousEntityContainer< TEntity >::iterator< TIteratorEntity >::iterator_category = std::forward_iterator_tag

◆ pointer

template<typename TEntity >
template<typename TIteratorEntity >
using catapult::model::BasicContiguousEntityContainer< TEntity >::iterator< TIteratorEntity >::pointer = TIteratorEntity*

◆ reference

template<typename TEntity >
template<typename TIteratorEntity >
using catapult::model::BasicContiguousEntityContainer< TEntity >::iterator< TIteratorEntity >::reference = TIteratorEntity&

◆ value_type

template<typename TEntity >
template<typename TIteratorEntity >
using catapult::model::BasicContiguousEntityContainer< TEntity >::iterator< TIteratorEntity >::value_type = TIteratorEntity

Constructor & Destructor Documentation

◆ iterator()

template<typename TEntity >
template<typename TIteratorEntity >
catapult::model::BasicContiguousEntityContainer< TEntity >::iterator< TIteratorEntity >::iterator ( value_type pStart,
value_type pCurrent,
State state 
)
inline

Creates an iterator around pStart and state with specified current position (pCurrent).

Here is the call graph for this function:

Member Function Documentation

◆ Advance()

template<typename TEntity >
template<typename TIteratorEntity >
static constexpr auto catapult::model::BasicContiguousEntityContainer< TEntity >::iterator< TIteratorEntity >::Advance ( value_type pEntity,
size_t  numBytes 
)
inlinestaticconstexprprivate
Here is the call graph for this function:
Here is the caller graph for this function:

◆ checkError()

template<typename TEntity >
template<typename TIteratorEntity >
void catapult::model::BasicContiguousEntityContainer< TEntity >::iterator< TIteratorEntity >::checkError ( )
inlineprivate
Here is the call graph for this function:
Here is the caller graph for this function:

◆ endBytePointer()

template<typename TEntity >
template<typename TIteratorEntity >
constexpr auto catapult::model::BasicContiguousEntityContainer< TEntity >::iterator< TIteratorEntity >::endBytePointer ( ) const
inlineconstexprprivatenoexcept
Here is the call graph for this function:
Here is the caller graph for this function:

◆ isEnd()

template<typename TEntity >
template<typename TIteratorEntity >
constexpr bool catapult::model::BasicContiguousEntityContainer< TEntity >::iterator< TIteratorEntity >::isEnd ( value_type pEntity) const
inlineconstexprprivatenoexcept
Here is the call graph for this function:
Here is the caller graph for this function:

◆ isEntityInBuffer()

template<typename TEntity >
template<typename TIteratorEntity >
constexpr bool catapult::model::BasicContiguousEntityContainer< TEntity >::iterator< TIteratorEntity >::isEntityInBuffer ( value_type pEntity) const
inlineconstexprprivatenoexcept
Here is the call graph for this function:
Here is the caller graph for this function:

◆ operator!=()

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

Returns true if this iterator and rhs are not equal.

◆ operator*()

template<typename TEntity >
template<typename TIteratorEntity >
reference catapult::model::BasicContiguousEntityContainer< TEntity >::iterator< 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 TIteratorEntity >
iterator& catapult::model::BasicContiguousEntityContainer< TEntity >::iterator< TIteratorEntity >::operator++ ( )
inline

Advances the iterator to the next position.

Here is the call graph for this function:

◆ operator++() [2/2]

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

Advances the iterator to the next position.

◆ operator->()

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

Returns a pointer to the current entity.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ operator==()

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

Returns true if this iterator and rhs are equal.

◆ ToBytePointer() [1/2]

template<typename TEntity >
template<typename TIteratorEntity >
template<typename T >
static constexpr auto catapult::model::BasicContiguousEntityContainer< TEntity >::iterator< TIteratorEntity >::ToBytePointer ( const T *  pEntity)
inlinestaticconstexprprivate

◆ ToBytePointer() [2/2]

template<typename TEntity >
template<typename TIteratorEntity >
template<typename T >
static constexpr auto catapult::model::BasicContiguousEntityContainer< TEntity >::iterator< TIteratorEntity >::ToBytePointer ( T *  pEntity)
inlinestaticconstexprprivate
Here is the caller graph for this function:

Member Data Documentation

◆ m_pCurrent

template<typename TEntity >
template<typename TIteratorEntity >
value_type* catapult::model::BasicContiguousEntityContainer< TEntity >::iterator< TIteratorEntity >::m_pCurrent
private

◆ m_pStart

template<typename TEntity >
template<typename TIteratorEntity >
value_type* catapult::model::BasicContiguousEntityContainer< TEntity >::iterator< TIteratorEntity >::m_pStart
private

◆ m_state

template<typename TEntity >
template<typename TIteratorEntity >
State& catapult::model::BasicContiguousEntityContainer< TEntity >::iterator< TIteratorEntity >::m_state
private

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