Back to index

salome-smesh  6.5.0
Public Types | Public Member Functions | Private Attributes
SMDS_StdIterator< VALUE, PtrSMDSIterator, EqualVALUE > Class Template Reference

Wrapper over pointer to SMDS_Iterator, like SMDS_ElemIteratorPtr, enabling its usage in std-like way: provide operators ++, *, etc. More...

#include <SMDS_StdIterator.hxx>

List of all members.

Public Types

typedef SMDS_StdIterator
< VALUE, PtrSMDSIterator > 
_Self

Public Member Functions

 SMDS_StdIterator (PtrSMDSIterator pItr)
 SMDS_StdIterator ()
VALUE operator* () const
 Return the current object.
_Selfoperator++ ()
_Self operator++ (int)
bool operator!= (const _Self &__x) const
bool operator== (const _Self &__x) const

Private Attributes

VALUE _value
PtrSMDSIterator _piterator
EqualVALUE _EqualVALUE

Detailed Description

template<typename VALUE, class PtrSMDSIterator, class EqualVALUE = std::equal_to<VALUE>>
class SMDS_StdIterator< VALUE, PtrSMDSIterator, EqualVALUE >

Wrapper over pointer to SMDS_Iterator, like SMDS_ElemIteratorPtr, enabling its usage in std-like way: provide operators ++, *, etc.

Definition at line 37 of file SMDS_StdIterator.hxx.


Member Typedef Documentation

template<typename VALUE , class PtrSMDSIterator , class EqualVALUE = std::equal_to<VALUE>>
typedef SMDS_StdIterator<VALUE, PtrSMDSIterator> SMDS_StdIterator< VALUE, PtrSMDSIterator, EqualVALUE >::_Self

Definition at line 44 of file SMDS_StdIterator.hxx.


Constructor & Destructor Documentation

template<typename VALUE , class PtrSMDSIterator , class EqualVALUE = std::equal_to<VALUE>>
SMDS_StdIterator< VALUE, PtrSMDSIterator, EqualVALUE >::SMDS_StdIterator ( PtrSMDSIterator  pItr) [inline]

Definition at line 47 of file SMDS_StdIterator.hxx.

    : _value( pItr->more() ? (VALUE)(pItr->next()) : 0 ), _piterator(pItr)
  {}
template<typename VALUE , class PtrSMDSIterator , class EqualVALUE = std::equal_to<VALUE>>
SMDS_StdIterator< VALUE, PtrSMDSIterator, EqualVALUE >::SMDS_StdIterator ( ) [inline]

Definition at line 51 of file SMDS_StdIterator.hxx.

                    : _value( 0 )
  {}

Member Function Documentation

template<typename VALUE , class PtrSMDSIterator , class EqualVALUE = std::equal_to<VALUE>>
bool SMDS_StdIterator< VALUE, PtrSMDSIterator, EqualVALUE >::operator!= ( const _Self __x) const [inline]

Definition at line 70 of file SMDS_StdIterator.hxx.

  { return !_EqualVALUE( _value, __x._value); }
template<typename VALUE , class PtrSMDSIterator , class EqualVALUE = std::equal_to<VALUE>>
VALUE SMDS_StdIterator< VALUE, PtrSMDSIterator, EqualVALUE >::operator* ( ) const [inline]

Return the current object.

Definition at line 55 of file SMDS_StdIterator.hxx.

  { return _value; }
template<typename VALUE , class PtrSMDSIterator , class EqualVALUE = std::equal_to<VALUE>>
_Self& SMDS_StdIterator< VALUE, PtrSMDSIterator, EqualVALUE >::operator++ ( ) [inline]

Definition at line 60 of file SMDS_StdIterator.hxx.

  { _value = _piterator->more() ? VALUE( _piterator->next()) : 0; return *this; }
template<typename VALUE , class PtrSMDSIterator , class EqualVALUE = std::equal_to<VALUE>>
_Self SMDS_StdIterator< VALUE, PtrSMDSIterator, EqualVALUE >::operator++ ( int  ) [inline]

Definition at line 65 of file SMDS_StdIterator.hxx.

  { _Self res = *this; _value = _piterator->more() ? VALUE( _piterator->next()) : 0; return res; }
template<typename VALUE , class PtrSMDSIterator , class EqualVALUE = std::equal_to<VALUE>>
bool SMDS_StdIterator< VALUE, PtrSMDSIterator, EqualVALUE >::operator== ( const _Self __x) const [inline]

Definition at line 75 of file SMDS_StdIterator.hxx.

  { return _EqualVALUE( _value, __x._value); }

Member Data Documentation

template<typename VALUE , class PtrSMDSIterator , class EqualVALUE = std::equal_to<VALUE>>
EqualVALUE SMDS_StdIterator< VALUE, PtrSMDSIterator, EqualVALUE >::_EqualVALUE [private]

Definition at line 41 of file SMDS_StdIterator.hxx.

template<typename VALUE , class PtrSMDSIterator , class EqualVALUE = std::equal_to<VALUE>>
PtrSMDSIterator SMDS_StdIterator< VALUE, PtrSMDSIterator, EqualVALUE >::_piterator [private]

Definition at line 40 of file SMDS_StdIterator.hxx.

template<typename VALUE , class PtrSMDSIterator , class EqualVALUE = std::equal_to<VALUE>>
VALUE SMDS_StdIterator< VALUE, PtrSMDSIterator, EqualVALUE >::_value [private]

Definition at line 39 of file SMDS_StdIterator.hxx.


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