sincerely Singaporean

If you have not done so, read this full tutorial on how to use SGEXTN to build an application.

SGLMap::ConstIterator

see header file

(no source file, everything inside header)

template ‹typename K, typename V, typename Comparator› class SGLMap::ConstIterator;

part of SGEXTN module SG_Containers

constant iterator for SGLMap

detailed description

list of all including inherited members

implementation details

preprocessor file inclusion directive: #include ‹SGLMap.h›

CMake target for BuildLah: SGEXTN::SG_Containers

see this link for more information about BuildLah

parent class: (none)

children classes: (none)

instance member functions

const K& key();

bool operator!=(SGLMap::ConstIterator x);

SGLMap::ConstIterator& operator++();

SGLMap::ConstIterator operator++(int);

SGLMap::ConstIterator operator--(int);

SGLMap::ConstIterator& operator--();

bool operator==(SGLMap::ConstIterator x);

const V& value();

Detailed Description

SGLMap::ConstIterator is a constant iterator for SGLMap and points towards a key value pair in the SGLMap. This can be used to iterate over the SGLMap sequentially. Modification to the SGLMap through a constant iterator is not possible. To do that, use a SGLMap::Iterator instead. This is a template based class with no separate source file.

Implementation Details

SGLMap::ConstIterator stores a pointer to the memory location where SGLMap keeps all its data.

const K& key();

Returns the key in the key value pair that this constant iterator points to.

If this iterator is SGLMap::constEnd, using this function will crash.

bool operator!=(SGLMap::ConstIterator x);

Checks if this constant iterator points to a different key value pair from x.

SGLMap::ConstIterator& operator++();

Increments the constant iterator to point towards the next key value pair and returns the new constant iterator.

SGLMap::ConstIterator is circular, incrementing SGLMap::constEnd gives SGLMap::constBegin and decrementing SGLMap::constBegin gives SGLMap::constEnd.

SGLMap::ConstIterator operator++(int);

Increments the constant iterator to point towards the next key value pair and returns the old constant iterator.

SGLMap::ConstIterator is circular, incrementing SGLMap::constEnd gives SGLMap::constBegin and decrementing SGLMap::constBegin gives SGLMap::constEnd.

SGLMap::ConstIterator operator--(int);

Decrements the constant iterator to point towards the previous key value pair and returns the old constant iterator.

SGLMap::ConstIterator is circular, incrementing SGLMap::constEnd gives SGLMap::constBegin and decrementing SGLMap::constBegin gives SGLMap::constEnd.

SGLMap::ConstIterator& operator--();

Decrements the constant iterator to point towards the previous key value pair and returns the new constant iterator.

SGLMap::ConstIterator is circular, incrementing SGLMap::constEnd gives SGLMap::constBegin and decrementing SGLMap::constBegin gives SGLMap::constEnd.

bool operator==(SGLMap::ConstIterator x);

Checks if this constant iterator points to the same key value pair as x.

const V& value();

Returns the value in the key value pair that this constant iterator points to.

If this iterator is SGLMap::constEnd, using this function will crash.

©2025 05524F.sg (Singapore)

contact 05524F / report a bug / make a suggestion

about 05524F SINGAPORE values

list of 05524F projects