Open CASCADE Technology 7.8.2.dev
|
Helper class that allows to use NCollection iterators as STL iterators. NCollection iterator can be extended to STL iterator of any category by adding necessary methods: STL forward iterator requires IsEqual method, STL bidirectional iterator requires Previous method, and STL random access iterator requires Offset and Differ methods. See NCollection_Vector as example of declaring custom STL iterators. More...
#include <NCollection_IndexedIterator.hxx>
Public Types | |
using | iterator_category = Category |
using | value_type = ItemType |
using | difference_type = ptrdiff_t |
using | pointer = typename std::conditional<IsConstant, const ItemType*, ItemType*>::type |
using | reference = typename std::conditional<IsConstant, const ItemType&, ItemType&>::type |
Public Member Functions | |
NCollection_IndexedIterator () | |
Default constructor. | |
NCollection_IndexedIterator (const BaseIndexedMap &theMap) | |
Constructor from NCollection_Indexed*Map. | |
NCollection_IndexedIterator (const size_t theIndex, const BaseIndexedMap &theMap) | |
Constructor from NCollection_Indexed*Map. | |
NCollection_IndexedIterator (const NCollection_IndexedIterator< Category, BaseIndexedMap, ItemType, false > &theOther) | |
Cast from non-const variant to const one. | |
NCollection_IndexedIterator & | operator= (const NCollection_IndexedIterator< Category, BaseIndexedMap, ItemType, false > &theOther) |
Assignment of non-const iterator to const one. | |
methods related to bidirectional STL iterator | |
NCollection_IndexedIterator & | operator-- () |
Prefix decrement. | |
NCollection_IndexedIterator | operator-- (int) |
Postfix decrement. | |
methods related to forward STL iterator | |
bool | operator== (const NCollection_IndexedIterator &theOther) const |
Test for equality. | |
template<bool theOtherIsConstant> | |
bool | operator== (const NCollection_IndexedIterator< Category, BaseIndexedMap, ItemType, theOtherIsConstant > &theOther) const |
Test for equality. | |
template<bool theOtherIsConstant> | |
bool | operator!= (const NCollection_IndexedIterator< Category, BaseIndexedMap, ItemType, theOtherIsConstant > &theOther) const |
Test for equality. | |
bool | operator!= (const NCollection_IndexedIterator &theOther) const |
Test for inequality. | |
NCollection_IndexedIterator::reference | operator* () const |
Get reference to current item. | |
NCollection_IndexedIterator::pointer | operator-> () const |
Dereferencing operator. | |
NCollection_IndexedIterator & | operator++ () |
Prefix increment. | |
NCollection_IndexedIterator | operator++ (int) |
Postfix increment. | |
template<bool Condition> | |
std::enable_if<!Condition, ItemType & >::type | Reference () const |
Test for equality. | |
template<bool Condition> | |
std::enable_if< Condition, constItemType & >::type | Reference () const |
Test for equality. | |
Helper class that allows to use NCollection iterators as STL iterators. NCollection iterator can be extended to STL iterator of any category by adding necessary methods: STL forward iterator requires IsEqual method, STL bidirectional iterator requires Previous method, and STL random access iterator requires Offset and Differ methods. See NCollection_Vector as example of declaring custom STL iterators.
using NCollection_IndexedIterator< Category, BaseIndexedMap, ItemType, IsConstant >::difference_type = ptrdiff_t |
using NCollection_IndexedIterator< Category, BaseIndexedMap, ItemType, IsConstant >::iterator_category = Category |
using NCollection_IndexedIterator< Category, BaseIndexedMap, ItemType, IsConstant >::pointer = typename std::conditional<IsConstant, const ItemType*, ItemType*>::type |
using NCollection_IndexedIterator< Category, BaseIndexedMap, ItemType, IsConstant >::reference = typename std::conditional<IsConstant, const ItemType&, ItemType&>::type |
using NCollection_IndexedIterator< Category, BaseIndexedMap, ItemType, IsConstant >::value_type = ItemType |
|
inline |
Default constructor.
|
inline |
Constructor from NCollection_Indexed*Map.
|
inline |
Constructor from NCollection_Indexed*Map.
|
inline |
Cast from non-const variant to const one.
|
inline |
Test for inequality.
|
inline |
Test for equality.
|
inline |
Get reference to current item.
|
inline |
Addition.
|
inline |
Prefix increment.
|
inline |
Postfix increment.
|
inline |
Move forward.
|
inline |
Difference.
|
inline |
Decrease.
|
inline |
Prefix decrement.
|
inline |
Postfix decrement.
|
inline |
Move backward.
|
inline |
Dereferencing operator.
|
inline |
Comparison.
|
inline |
Comparison.
|
inline |
Assignment of non-const iterator to const one.
|
inline |
Test for equality.
|
inline |
Test for equality.
|
inline |
Comparison.
|
inline |
Comparison.
|
inline |
Get item at offset from current.
|
inlineprotected |
Test for equality.
|
inlineprotected |
Test for equality.