MoSync 3.3
MAUtil::Dictionary< Key, Storage >::Iterator Class Reference

Iterator for a Dictionary. More...

#include <MAUtil/Dictionary.h>

List of all members.

Public Member Functions

Storage & operator* ()
Storage * operator-> ()
Iteratoroperator++ ()
Iterator operator++ (int)
Iteratoroperator-- ()
Iterator operator-- (int)
bool operator== (const Iterator &) const
bool operator!= (const Iterator &) const
Iteratoroperator= (const Iterator &)
 Iterator (const Iterator &)

Protected Member Functions

 Iterator (dict_t *)

Protected Attributes

DictNodemNode
dict_t * mDict

Friends

class Dictionary
class ConstIterator

Detailed Description

template<class Key, class Storage>
class MAUtil::Dictionary< Key, Storage >::Iterator

Iterator for a Dictionary.

An Iterator is bound to a specific Dictionary object. The Iterator can point to a specific element in that Dictionary, or at Dictionary::end(), which is "beyond" the last element of the Dictionary. If the iterator points at Dictionary::end(), attempting to access the element will cause a crash. The Iterator is bidirectional; it can move backwards or forwards through the Dictionary.


Constructor & Destructor Documentation

template<class Key , class Storage >
MAUtil::Dictionary< Key, Storage >::Iterator::Iterator ( const Iterator o)
template<class Key , class Storage >
MAUtil::Dictionary< Key, Storage >::Iterator::Iterator ( dict_t *  dict) [protected]

Member Function Documentation

template<class Key , class Storage >
Storage & MAUtil::Dictionary< Key, Storage >::Iterator::operator* ( )

References MAASSERT, and NULL.

template<class Key , class Storage >
Storage * MAUtil::Dictionary< Key, Storage >::Iterator::operator-> ( )

References MAASSERT, and NULL.

template<class Key , class Storage >
MAUtil::Dictionary< Key, Storage >::Iterator & MAUtil::Dictionary< Key, Storage >::Iterator::operator++ ( )

Causes the Iterator to point to the next element in the Dictionary to which it is bound. If the Iterator points to Dictionary::end(), this operation will cause a crash.

References MAASSERT, MAUtil::Dictionary< Key, Storage >::mDict, and NULL.

template<class Key , class Storage >
MAUtil::Dictionary< Key, Storage >::Iterator MAUtil::Dictionary< Key, Storage >::Iterator::operator++ ( int  )
template<class Key , class Storage >
MAUtil::Dictionary< Key, Storage >::Iterator & MAUtil::Dictionary< Key, Storage >::Iterator::operator-- ( )

Causes the Iterator to point to the previous element in the Dictionary to which it is bound.

Note:
If the iterator points to the first node, this operation will cause it to point to Dictionary::end().

References MAASSERT, MAUtil::Dictionary< Key, Storage >::mDict, and NULL.

template<class Key , class Storage >
MAUtil::Dictionary< Key, Storage >::Iterator MAUtil::Dictionary< Key, Storage >::Iterator::operator-- ( int  )
template<class Key , class Storage >
bool MAUtil::Dictionary< Key, Storage >::Iterator::operator== ( const Iterator o) const
template<class Key , class Storage >
bool MAUtil::Dictionary< Key, Storage >::Iterator::operator!= ( const Iterator o) const
template<class Key , class Storage >
MAUtil::Dictionary< Key, Storage >::Iterator & MAUtil::Dictionary< Key, Storage >::Iterator::operator= ( const Iterator o)

Friends And Related Function Documentation

template<class Key, class Storage>
friend class Dictionary [friend]
template<class Key, class Storage>
friend class ConstIterator [friend]

Member Data Documentation

template<class Key, class Storage>
dict_t* MAUtil::Dictionary< Key, Storage >::Iterator::mDict [protected]
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines