Back to index

salome-gui  6.5.0
Public Member Functions | Private Member Functions | Private Attributes | Friends
IMapIterator< Key, Value > Class Template Reference

Indexed map iterator template class. More...

#include <QtxMap.h>

List of all members.

Public Member Functions

 IMapIterator ()
 IMapIterator (const IMap< Key, Value > *m)
 IMapIterator (const IMapIterator &i)
bool operator== (const IMapIterator &i)
bool operator!= (const IMapIterator &i)
 operator bool () const
const Key & key () const
Value & value ()
const Value & value () const
Value & operator* ()
IMapIteratoroperator++ ()
IMapIterator operator++ (int)
IMapIteratoroperator-- ()
IMapIterator operator-- (int)

Private Member Functions

 IMapIterator (const IMap< Key, Value > *m, const int index)
void init ()

Private Attributes

IMap< Key, Value > * myMap
int myIndex

Friends

class IMap< Key, Value >
class IMapConstIterator< Key, Value >

Detailed Description

template<class Key, class Value>
class IMapIterator< Key, Value >

Indexed map iterator template class.

Definition at line 139 of file QtxMap.h.


Constructor & Destructor Documentation

template<class Key, class Value>
IMapIterator< Key, Value >::IMapIterator ( ) [inline]

Definition at line 142 of file QtxMap.h.

: myMap( 0 ), myIndex( 0 )                                   { init(); }

Here is the call graph for this function:

template<class Key, class Value>
IMapIterator< Key, Value >::IMapIterator ( const IMap< Key, Value > *  m) [inline]

Definition at line 143 of file QtxMap.h.

: myMap( const_cast< IMap<Key,Value>* >( m ) ), myIndex( 0 ) { init(); }

Here is the call graph for this function:

template<class Key, class Value>
IMapIterator< Key, Value >::IMapIterator ( const IMapIterator< Key, Value > &  i) [inline]

Definition at line 144 of file QtxMap.h.

: myMap( i.myMap ), myIndex( i.myIndex )                     { init(); }

Here is the call graph for this function:

template<class Key, class Value>
IMapIterator< Key, Value >::IMapIterator ( const IMap< Key, Value > *  m,
const int  index 
) [inline, private]

Definition at line 163 of file QtxMap.h.

: myMap( const_cast< IMap<Key,Value>* >( m ) ), myIndex( index ) { init(); }

Here is the call graph for this function:


Member Function Documentation

template<class Key, class Value>
void IMapIterator< Key, Value >::init ( ) [inline, private]

Definition at line 164 of file QtxMap.h.

{ if ( !myMap || myIndex >= myMap->count() ) myIndex = -1; }

Here is the caller graph for this function:

template<class Key, class Value>
const Key& IMapIterator< Key, Value >::key ( ) const [inline]

Definition at line 151 of file QtxMap.h.

{ return myMap->key( myIndex );   }
template<class Key, class Value>
IMapIterator< Key, Value >::operator bool ( ) const [inline]

Definition at line 149 of file QtxMap.h.

{ return myIndex >= 0; }
template<class Key, class Value>
bool IMapIterator< Key, Value >::operator!= ( const IMapIterator< Key, Value > &  i) [inline]

Definition at line 147 of file QtxMap.h.

{ return !myMap || myMap != i.myMap || myIndex != i.myIndex; }

Here is the caller graph for this function:

template<class Key, class Value>
Value& IMapIterator< Key, Value >::operator* ( ) [inline]

Definition at line 155 of file QtxMap.h.

{ return value(); }

Here is the call graph for this function:

template<class Key, class Value>
IMapIterator& IMapIterator< Key, Value >::operator++ ( ) [inline]

Definition at line 157 of file QtxMap.h.

{ myIndex++; init(); return *this;                     }

Here is the call graph for this function:

template<class Key, class Value>
IMapIterator IMapIterator< Key, Value >::operator++ ( int  ) [inline]

Definition at line 158 of file QtxMap.h.

{ IMapIterator i = *this; myIndex++; init(); return i; }

Here is the call graph for this function:

template<class Key, class Value>
IMapIterator& IMapIterator< Key, Value >::operator-- ( ) [inline]

Definition at line 159 of file QtxMap.h.

{ myIndex--; init(); return *this;                     }

Here is the call graph for this function:

template<class Key, class Value>
IMapIterator IMapIterator< Key, Value >::operator-- ( int  ) [inline]

Definition at line 160 of file QtxMap.h.

{ IMapIterator i = *this; myIndex--; init(); return i; }

Here is the call graph for this function:

template<class Key, class Value>
bool IMapIterator< Key, Value >::operator== ( const IMapIterator< Key, Value > &  i) [inline]

Definition at line 146 of file QtxMap.h.

{ return !operator!=( i );                                   }

Here is the call graph for this function:

template<class Key, class Value>
Value& IMapIterator< Key, Value >::value ( ) [inline]

Definition at line 152 of file QtxMap.h.

{ return myMap->value( myIndex ); }

Here is the caller graph for this function:

template<class Key, class Value>
const Value& IMapIterator< Key, Value >::value ( ) const [inline]

Definition at line 153 of file QtxMap.h.

{ return myMap->value( myIndex ); }

Friends And Related Function Documentation

template<class Key, class Value>
friend class IMap< Key, Value > [friend]

Definition at line 170 of file QtxMap.h.

template<class Key, class Value>
friend class IMapConstIterator< Key, Value > [friend]

Definition at line 171 of file QtxMap.h.


Member Data Documentation

template<class Key, class Value>
int IMapIterator< Key, Value >::myIndex [private]

Definition at line 168 of file QtxMap.h.

template<class Key, class Value>
IMap<Key,Value>* IMapIterator< Key, Value >::myMap [private]

Definition at line 167 of file QtxMap.h.


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