CatapultServer  v0.5.0.1 (Elephant)
catapult::state::CompactMosaicMap::basic_iterator Class Reference

Base of mosaic iterators. More...

Inheritance diagram for catapult::state::CompactMosaicMap::basic_iterator:
Collaboration diagram for catapult::state::CompactMosaicMap::basic_iterator:

Public Types

enum  Stage {
  Stage::Start, Stage::Value, Stage::Array, Stage::Map,
  Stage::End
}
 Iterator stage. More...
 
using difference_type = std::ptrdiff_t
 
using iterator_category = std::forward_iterator_tag
 

Public Member Functions

 basic_iterator (FirstLevelStorage &storage, Stage stage)
 Creates an iterator around storage with initial stage. More...
 
 basic_iterator (FirstLevelStorage &storage, const MosaicLocation &location)
 Creates an iterator around storage pointing to the mosaic at location. More...
 
bool operator== (const basic_iterator &rhs) const
 Returns true if this iterator and rhs are equal. More...
 
bool operator!= (const basic_iterator &rhs) const
 Returns true if this iterator and rhs are not equal. More...
 
basic_iteratoroperator++ ()
 Advances the iterator to the next position. More...
 
basic_iterator operator++ (int)
 Advances the iterator to the next position. More...
 

Protected Member Functions

Mosaiccurrent () const
 Gets a reference to the current value. More...
 

Private Member Functions

void advance ()
 
void setValueMosaic ()
 
void setArrayMosaic ()
 
void setMapMosaic ()
 
void setEnd ()
 
bool isEnd () const
 

Private Attributes

FirstLevelStoragem_storage
 
Stage m_stage
 
Mosaicm_pCurrent
 
size_t m_arrayIndex
 
MosaicMap::iterator m_mapIterator
 

Detailed Description

Base of mosaic iterators.

Member Typedef Documentation

◆ difference_type

◆ iterator_category

Member Enumeration Documentation

◆ Stage

Iterator stage.

Enumerator
Start 
Value 
Array 
Map 
End 

Constructor & Destructor Documentation

◆ basic_iterator() [1/2]

catapult::state::CompactMosaicMap::basic_iterator::basic_iterator ( FirstLevelStorage storage,
Stage  stage 
)
explicit

Creates an iterator around storage with initial stage.

Here is the call graph for this function:

◆ basic_iterator() [2/2]

catapult::state::CompactMosaicMap::basic_iterator::basic_iterator ( FirstLevelStorage storage,
const MosaicLocation location 
)
explicit

Creates an iterator around storage pointing to the mosaic at location.

Here is the call graph for this function:

Member Function Documentation

◆ advance()

void catapult::state::CompactMosaicMap::basic_iterator::advance ( )
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ current()

CompactMosaicMap::Mosaic & catapult::state::CompactMosaicMap::basic_iterator::current ( ) const
protected

Gets a reference to the current value.

Here is the caller graph for this function:

◆ isEnd()

bool catapult::state::CompactMosaicMap::basic_iterator::isEnd ( ) const
private

◆ operator!=()

bool catapult::state::CompactMosaicMap::basic_iterator::operator!= ( const basic_iterator rhs) const

Returns true if this iterator and rhs are not equal.

◆ operator++() [1/2]

CompactMosaicMap::basic_iterator & catapult::state::CompactMosaicMap::basic_iterator::operator++ ( )

Advances the iterator to the next position.

◆ operator++() [2/2]

CompactMosaicMap::basic_iterator catapult::state::CompactMosaicMap::basic_iterator::operator++ ( int  )

Advances the iterator to the next position.

◆ operator==()

bool catapult::state::CompactMosaicMap::basic_iterator::operator== ( const basic_iterator rhs) const

Returns true if this iterator and rhs are equal.

◆ setArrayMosaic()

void catapult::state::CompactMosaicMap::basic_iterator::setArrayMosaic ( )
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setEnd()

void catapult::state::CompactMosaicMap::basic_iterator::setEnd ( )
private

◆ setMapMosaic()

void catapult::state::CompactMosaicMap::basic_iterator::setMapMosaic ( )
private
Here is the caller graph for this function:

◆ setValueMosaic()

void catapult::state::CompactMosaicMap::basic_iterator::setValueMosaic ( )
private
Here is the caller graph for this function:

Member Data Documentation

◆ m_arrayIndex

size_t catapult::state::CompactMosaicMap::basic_iterator::m_arrayIndex
private

◆ m_mapIterator

MosaicMap::iterator catapult::state::CompactMosaicMap::basic_iterator::m_mapIterator
private

◆ m_pCurrent

Mosaic* catapult::state::CompactMosaicMap::basic_iterator::m_pCurrent
private

◆ m_stage

Stage catapult::state::CompactMosaicMap::basic_iterator::m_stage
private

◆ m_storage

FirstLevelStorage& catapult::state::CompactMosaicMap::basic_iterator::m_storage
private

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