Open CASCADE Technology
7.7.0
|
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_StlIterator.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_StlIterator () | |
Default constructor. More... | |
NCollection_StlIterator (const BaseIterator &theIterator) | |
Constructor from NCollection iterator. More... | |
NCollection_StlIterator (const NCollection_StlIterator< Category, BaseIterator, ItemType, false > &theIterator) | |
Cast from non-const variant to const one. More... | |
NCollection_StlIterator & | operator= (const NCollection_StlIterator< Category, BaseIterator, ItemType, false > &theIterator) |
Assignment of non-const iterator to const one. More... | |
const BaseIterator & | Iterator () const |
Access to NCollection iterator instance. More... | |
BaseIterator & | ChangeIterator () |
Access to NCollection iterator instance. More... | |
methods related to bidirectional STL iterator | |
NCollection_StlIterator & | operator-- () |
Prefix decrement. More... | |
NCollection_StlIterator | operator-- (int) |
Postfix decrement. More... | |
methods related to forward STL iterator | |
bool | operator== (const NCollection_StlIterator &theOther) const |
Test for equality. More... | |
bool | operator!= (const NCollection_StlIterator &theOther) const |
Test for inequality. More... | |
NCollection_StlIterator::reference | operator* () const |
Get reference to current item. More... | |
NCollection_StlIterator::pointer | operator-> () const |
Dereferencing operator. More... | |
NCollection_StlIterator & | operator++ () |
Prefix increment. More... | |
NCollection_StlIterator | operator++ (int) |
Postfix increment. More... | |
template<bool Condition> | |
std::enable_if<!Condition, ItemType & >::type | Reference () const |
Test for equality. More... | |
template<bool Condition> | |
std::enable_if< Condition, const ItemType & >::type | Reference () const |
Test for equality. More... | |
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_StlIterator< Category, BaseIterator, ItemType, IsConstant >::difference_type = ptrdiff_t |
using NCollection_StlIterator< Category, BaseIterator, ItemType, IsConstant >::iterator_category = Category |
using NCollection_StlIterator< Category, BaseIterator, ItemType, IsConstant >::pointer = typename std::conditional<IsConstant, const ItemType*, ItemType*>::type |
using NCollection_StlIterator< Category, BaseIterator, ItemType, IsConstant >::reference = typename std::conditional<IsConstant, const ItemType&, ItemType&>::type |
using NCollection_StlIterator< Category, BaseIterator, ItemType, IsConstant >::value_type = ItemType |
|
inline |
Default constructor.
|
inline |
Constructor from NCollection iterator.
|
inline |
Cast from non-const variant to const one.
|
inline |
Access to NCollection iterator instance.
|
inline |
Access to NCollection iterator instance.
|
inline |
Test for inequality.
|
inline |
Get reference to current item.
|
inline |
Addition.
|
inline |
Prefix increment.
|
inline |
Postfix increment.
|
inline |
Move forward.
|
inline |
Decrease.
|
inline |
Difference.
|
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 |
Comparison.
|
inline |
Comparison.
|
inline |
Get item at offset from current.
|
inlineprotected |
Test for equality.
|
inlineprotected |
Test for equality.