|
MoSync 3.2.1
|
Iterator for a Dictionary. More...
#include <MAUtil/Dictionary.h>
Public Member Functions | |
| Storage & | operator* () |
| Storage * | operator-> () |
| Iterator & | operator++ () |
| Iterator | operator++ (int) |
| Iterator & | operator-- () |
| Iterator | operator-- (int) |
| bool | operator== (const Iterator &) const |
| bool | operator!= (const Iterator &) const |
| Iterator & | operator= (const Iterator &) |
| Iterator (const Iterator &) | |
Protected Member Functions | |
| Iterator (dict_t *) | |
Protected Attributes | |
| DictNode * | mNode |
| dict_t * | mDict |
Friends | |
| class | Dictionary |
| class | ConstIterator |
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.
| MAUtil::Dictionary< Key, Storage >::Iterator::Iterator | ( | const Iterator & | o | ) |
| MAUtil::Dictionary< Key, Storage >::Iterator::Iterator | ( | dict_t * | dict | ) | [protected] |
| Storage & MAUtil::Dictionary< Key, Storage >::Iterator::operator* | ( | ) |
| Storage * MAUtil::Dictionary< Key, Storage >::Iterator::operator-> | ( | ) |
| 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.
| MAUtil::Dictionary< Key, Storage >::Iterator MAUtil::Dictionary< Key, Storage >::Iterator::operator++ | ( | int | ) |
| 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.
References MAASSERT, MAUtil::Dictionary< Key, Storage >::mDict, and NULL.
| MAUtil::Dictionary< Key, Storage >::Iterator MAUtil::Dictionary< Key, Storage >::Iterator::operator-- | ( | int | ) |
| bool MAUtil::Dictionary< Key, Storage >::Iterator::operator== | ( | const Iterator & | o | ) | const |
| bool MAUtil::Dictionary< Key, Storage >::Iterator::operator!= | ( | const Iterator & | o | ) | const |
| MAUtil::Dictionary< Key, Storage >::Iterator & MAUtil::Dictionary< Key, Storage >::Iterator::operator= | ( | const Iterator & | o | ) |
friend class Dictionary [friend] |
friend class ConstIterator [friend] |
DictNode* MAUtil::Dictionary< Key, Storage >::Iterator::mNode [protected] |
Referenced by MAUtil::Dictionary< Key, Storage >::begin(), MAUtil::Dictionary< Key, Storage >::end(), MAUtil::Dictionary< Key, Storage >::erase(), MAUtil::Dictionary< Key, Storage >::find(), MAUtil::Dictionary< Key, Storage >::insert(), MAUtil::Dictionary< Key, Storage >::Iterator::operator!=(), MAUtil::Dictionary< Key, Storage >::Iterator::operator=(), and MAUtil::Dictionary< Key, Storage >::Iterator::operator==().
dict_t* MAUtil::Dictionary< Key, Storage >::Iterator::mDict [protected] |
Referenced by MAUtil::Dictionary< Key, Storage >::Iterator::operator=().