Public Member Functions | Private Attributes | List of all members
SIntDict< T >::IteratorDict Class Reference

#include <sortdict.h>

Public Member Functions

 IteratorDict (const SIntDict< T > &dict)
 
virtual ~IteratorDict ()
 
T * toFirst () const
 
T * toLast () const
 
T * current () const
 
int currentKey () const
 
T * operator++ ()
 
T * operator-- ()
 

Private Attributes

QDictIterator< T > * m_di
 

Detailed Description

template<class T>
class SIntDict< T >::IteratorDict

Simple iterator for SDict. It iterates over the dictionary elements in an unsorted way, but does provide information about the element's key.

Definition at line 667 of file sortdict.h.

Constructor & Destructor Documentation

template<class T>
SIntDict< T >::IteratorDict::IteratorDict ( const SIntDict< T > &  dict)
inline

Create an iterator given the dictionary.

Definition at line 671 of file sortdict.h.

672  {
673  m_di = new QIntDictIterator<T>(*dict.m_dict);
674  }
QDictIterator< T > * m_di
Definition: sortdict.h:729
QIntDict< T > * m_dict
Definition: sortdict.h:449
template<class T>
virtual SIntDict< T >::IteratorDict::~IteratorDict ( )
inlinevirtual

Destroys the dictionary

Definition at line 677 of file sortdict.h.

678  {
679  delete m_di;
680  }
QDictIterator< T > * m_di
Definition: sortdict.h:729

Member Function Documentation

template<class T>
T* SIntDict< T >::IteratorDict::current ( ) const
inline

Returns the current compound

Definition at line 699 of file sortdict.h.

700  {
701  return m_di->current();
702  }
QDictIterator< T > * m_di
Definition: sortdict.h:729
template<class T>
int SIntDict< T >::IteratorDict::currentKey ( ) const
inline

Returns the current key

Definition at line 705 of file sortdict.h.

706  {
707  return m_di->currentKey();
708  }
QDictIterator< T > * m_di
Definition: sortdict.h:729
template<class T>
T* SIntDict< T >::IteratorDict::operator++ ( )
inline

Moves the iterator to the next element.

Returns
the new "current" element, or zero if the iterator was already pointing at the last element.

Definition at line 714 of file sortdict.h.

715  {
716  return m_di->operator++();
717  }
QDictIterator< T > * m_di
Definition: sortdict.h:729
template<class T>
T* SIntDict< T >::IteratorDict::operator-- ( )
inline

Moves the iterator to the previous element.

Returns
the new "current" element, or zero if the iterator was already pointing at the first element.

Definition at line 723 of file sortdict.h.

724  {
725  return m_di->operator--();
726  }
QDictIterator< T > * m_di
Definition: sortdict.h:729
template<class T>
T* SIntDict< T >::IteratorDict::toFirst ( ) const
inline

Set the iterator to the first element in the list.

Returns
The first compound, or zero if the list was empty.

Definition at line 685 of file sortdict.h.

686  {
687  return m_di->toFirst();
688  }
QDictIterator< T > * m_di
Definition: sortdict.h:729
template<class T>
T* SIntDict< T >::IteratorDict::toLast ( ) const
inline

Set the iterator to the last element in the list.

Returns
The first compound, or zero if the list was empty.

Definition at line 693 of file sortdict.h.

694  {
695  return m_di->toLast();
696  }
QDictIterator< T > * m_di
Definition: sortdict.h:729

Member Data Documentation

template<class T>
QDictIterator<T>* SIntDict< T >::IteratorDict::m_di
private

Definition at line 729 of file sortdict.h.


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