MDSTk Libraries
1.1.0
Medical Data Segmentation Toolkit
|
Iterator used to traverse vector elements. More...
#include <mdsVectorIterator.h>
Public Types | |
enum | { TEMPLATE_PARAMETER_IS_NOT_VECTOR = V::CLASS_VECTOR } |
Check that V is a vector. More... | |
typedef CVectorIterator< V, T > | tDerived |
Iterator type. | |
typedef T | tElement |
Element type. | |
typedef CIteratorTraits < CVectorIterator< V, T > >::tItem | tItem |
Value (or item) type. | |
typedef V | tVector |
Vector type. | |
Public Member Functions | |
void | advance () |
Moves iterator to the next element. | |
bool | atEnd () const |
Returns true if the iterator points after the end. | |
CVectorIterator (tVector &Vector) | |
Constructor. | |
tDerived & | getImpl () |
Returns reference to the iterator implementation. | |
const tDerived & | getImpl () const |
tSize | getSize () const |
Returns size of the vector. | |
tSize | index () const |
Returns the current iterator position. | |
operator bool () const | |
Returns true if the iterator is valid, i.e. not pointing after the end. | |
tItem & | operator* () const |
Returns reference to the current item. | |
CIteratorBase & | operator++ () |
CIteratorBase | operator++ (int) |
tItem * | operator-> () const |
Returns pointer to the current item. | |
const tElement & | value () const |
Returns the current item. | |
tElement * | valuePtr () const |
Returns pointer to the current item. | |
tElement & | valueRef () const |
Returns reference to the current item. | |
~CVectorIterator () | |
Destructor. | |
Protected Attributes | |
tSize | m_i |
Iterator position. | |
tVector & | m_Vector |
Reference to the vector. |
Iterator used to traverse vector elements.
typedef CVectorIterator< V, T > mds::base::CIteratorBase< CVectorIterator< V, T > >::tDerived [inherited] |
Iterator type.
typedef T mds::math::CVectorIterator< V, T >::tElement |
Element type.
typedef CIteratorTraits<CVectorIterator< V, T > >::tItem mds::base::CIteratorBase< CVectorIterator< V, T > >::tItem [inherited] |
Value (or item) type.
typedef V mds::math::CVectorIterator< V, T >::tVector |
Vector type.
anonymous enum |
mds::math::CVectorIterator< V, T >::CVectorIterator | ( | tVector & | Vector | ) |
Constructor.
mds::math::CVectorIterator< V, T >::~CVectorIterator | ( | ) |
Destructor.
void mds::math::CVectorIterator< V, T >::advance | ( | ) |
Moves iterator to the next element.
bool mds::math::CVectorIterator< V, T >::atEnd | ( | ) | const |
Returns true if the iterator points after the end.
tDerived& mds::base::CIteratorBase< CVectorIterator< V, T > >::getImpl | ( | ) | [inherited] |
Returns reference to the iterator implementation.
const tDerived& mds::base::CIteratorBase< CVectorIterator< V, T > >::getImpl | ( | ) | const [inherited] |
tSize mds::math::CVectorIterator< V, T >::getSize | ( | ) | const |
Returns size of the vector.
Reimplemented from mds::base::CIteratorBase< CVectorIterator< V, T > >.
tSize mds::math::CVectorIterator< V, T >::index | ( | ) | const |
Returns the current iterator position.
mds::base::CIteratorBase< CVectorIterator< V, T > >::operator bool | ( | ) | const [inherited] |
Returns true if the iterator is valid, i.e. not pointing after the end.
tItem& mds::base::CIteratorBase< CVectorIterator< V, T > >::operator* | ( | ) | const [inherited] |
Returns reference to the current item.
CIteratorBase& mds::base::CIteratorBase< CVectorIterator< V, T > >::operator++ | ( | ) | [inherited] |
CIteratorBase mds::base::CIteratorBase< CVectorIterator< V, T > >::operator++ | ( | int | ) | [inherited] |
tItem* mds::base::CIteratorBase< CVectorIterator< V, T > >::operator-> | ( | ) | const [inherited] |
Returns pointer to the current item.
const tElement& mds::math::CVectorIterator< V, T >::value | ( | ) | const |
Returns the current item.
Reimplemented from mds::base::CIteratorBase< CVectorIterator< V, T > >.
tElement* mds::math::CVectorIterator< V, T >::valuePtr | ( | ) | const |
Returns pointer to the current item.
Reimplemented from mds::base::CIteratorBase< CVectorIterator< V, T > >.
tElement& mds::math::CVectorIterator< V, T >::valueRef | ( | ) | const |
Returns reference to the current item.
Reimplemented from mds::base::CIteratorBase< CVectorIterator< V, T > >.
tSize mds::math::CVectorIterator< V, T >::m_i [protected] |
Iterator position.
tVector& mds::math::CVectorIterator< V, T >::m_Vector [protected] |
Reference to the vector.