MDSTk Libraries  1.1.0
Medical Data Segmentation Toolkit
Public Types | Public Member Functions | Protected Attributes
mds::math::CVectorIterator< V, T > Class Template Reference

Iterator used to traverse vector elements. More...

#include <mdsVectorIterator.h>

Inheritance diagram for mds::math::CVectorIterator< V, T >:
Inheritance graph
[legend]

List of all members.

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.
tDerivedgetImpl ()
 Returns reference to the iterator implementation.
const tDerivedgetImpl () 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.
tItemoperator* () const
 Returns reference to the current item.
CIteratorBaseoperator++ ()
CIteratorBase operator++ (int)
tItemoperator-> () const
 Returns pointer to the current item.
const tElementvalue () const
 Returns the current item.
tElementvaluePtr () const
 Returns pointer to the current item.
tElementvalueRef () const
 Returns reference to the current item.
 ~CVectorIterator ()
 Destructor.

Protected Attributes

tSize m_i
 Iterator position.
tVectorm_Vector
 Reference to the vector.

Detailed Description

template<class V, typename T>
class mds::math::CVectorIterator< V, T >

Iterator used to traverse vector elements.


Member Typedef Documentation

typedef CVectorIterator< V, T > mds::base::CIteratorBase< CVectorIterator< V, T > >::tDerived [inherited]

Iterator type.

template<class V , typename T >
typedef T mds::math::CVectorIterator< V, T >::tElement

Element type.

Value (or item) type.

template<class V , typename T >
typedef V mds::math::CVectorIterator< V, T >::tVector

Vector type.


Member Enumeration Documentation

template<class V , typename T >
anonymous enum

Check that V is a vector.

You will see name of this enum somewhere in compiler error message if the type V is not vector.

Enumerator:
TEMPLATE_PARAMETER_IS_NOT_VECTOR 

Constructor & Destructor Documentation

template<class V , typename T >
mds::math::CVectorIterator< V, T >::CVectorIterator ( tVector Vector)

Constructor.

template<class V , typename T >
mds::math::CVectorIterator< V, T >::~CVectorIterator ( )

Destructor.


Member Function Documentation

template<class V , typename T >
void mds::math::CVectorIterator< V, T >::advance ( )

Moves iterator to the next element.

template<class V , typename T >
bool mds::math::CVectorIterator< V, T >::atEnd ( ) const

Returns true if the iterator points after the end.

Returns reference to the iterator implementation.

const tDerived& mds::base::CIteratorBase< CVectorIterator< V, T > >::getImpl ( ) const [inherited]
template<class V , typename T >
tSize mds::math::CVectorIterator< V, T >::getSize ( ) const

Returns size of the vector.

Reimplemented from mds::base::CIteratorBase< CVectorIterator< V, T > >.

template<class V , typename 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.

template<class V , typename T >
const tElement& mds::math::CVectorIterator< V, T >::value ( ) const

Returns the current item.

Reimplemented from mds::base::CIteratorBase< CVectorIterator< V, T > >.

template<class V , typename T >
tElement* mds::math::CVectorIterator< V, T >::valuePtr ( ) const

Returns pointer to the current item.

Reimplemented from mds::base::CIteratorBase< CVectorIterator< V, T > >.

template<class V , typename T >
tElement& mds::math::CVectorIterator< V, T >::valueRef ( ) const

Returns reference to the current item.

Reimplemented from mds::base::CIteratorBase< CVectorIterator< V, T > >.


Member Data Documentation

template<class V , typename T >
tSize mds::math::CVectorIterator< V, T >::m_i [protected]

Iterator position.

template<class V , typename T >
tVector& mds::math::CVectorIterator< V, T >::m_Vector [protected]

Reference to the vector.


The documentation for this class was generated from the following file: