Open CASCADE Technology 7.8.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. | |
NCollection_StlIterator (const BaseIterator &theIterator) | |
Constructor from NCollection iterator. | |
NCollection_StlIterator (const NCollection_StlIterator< Category, BaseIterator, ItemType, false > &theIterator) | |
Cast from non-const variant to const one. | |
NCollection_StlIterator & | operator= (const NCollection_StlIterator< Category, BaseIterator, ItemType, false > &theIterator) |
Assignment of non-const iterator to const one. | |
const BaseIterator & | Iterator () const |
Access to NCollection iterator instance. | |
BaseIterator & | ChangeIterator () |
Access to NCollection iterator instance. | |
methods related to bidirectional STL iterator | |
NCollection_StlIterator & | operator-- () |
Prefix decrement. | |
NCollection_StlIterator | operator-- (int) |
Postfix decrement. | |
methods related to forward STL iterator | |
bool | operator== (const NCollection_StlIterator &theOther) const |
Test for equality. | |
bool | operator!= (const NCollection_StlIterator &theOther) const |
Test for inequality. | |
NCollection_StlIterator::reference | operator* () const |
Get reference to current item. | |
NCollection_StlIterator::pointer | operator-> () const |
Dereferencing operator. | |
NCollection_StlIterator & | operator++ () |
Prefix increment. | |
NCollection_StlIterator | 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_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 |
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 |
Comparison.
|
inline |
Comparison.
|
inline |
Get item at offset from current.
|
inlineprotected |
Test for equality.
|
inlineprotected |
Test for equality.