![]() |
VR-Forces 4.1 Class Documentation
|
This class will implement a data dictionary iterator that allows for data dictionaries to be chained within a single iterator. More...

Public Member Functions | |
| DtDictIterator (QHash< Key, Type > &d) | |
| ~DtDictIterator () | |
| unsigned int | count () |
| Returns the number of items in the current dictionary. | |
| bool | isEmpty () const |
| Returns true if the current dictionary is empty. | |
| Type | toFirst () |
| Moves the iterator to the first item of the current list. | |
| bool | remove (const Key &k) |
| Will remove the string (if there) from the current dictionary in the iterator. | |
| Type | operator++ () |
| Moves the iterator to the next object in the list. | |
| Type | operator+= (uint j) |
| Moves the iterator down the list the specified number of spaces. | |
| void | operator= (const typename QHash< Key, Type >::iterator &iter) |
| Type | current () |
| Type | reset (int toPosition=0, bool findFirstValid=true) |
| Resets the iterator to the first item in the supplied list index list. | |
| void | addDataDict (QHash< Key, Type > *dict) |
| Adds a data dictionary to our current dictionary list. | |
| Type | find (const Key &key) |
| Finds a particular key that could be in any of the attached dictionaries in this iterator. | |
| Type | nextList () |
| Moves to the next list in the chain and returns the first element of that list. | |
Protected Attributes | |
| QHash< Key, Type > * | myCurrentDict |
| QList< QHash< Key, Type > * > | myList |
| unsigned int | myPosition |
This class will implement a data dictionary iterator that allows for data dictionaries to be chained within a single iterator.
This allows for a single iterator to encompass the global and local data dictionaries
|
inline |
|
inline |
|
inline |
Returns the number of items in the current dictionary.
References DtDictIterator< Key, Type >::myCurrentDict.
|
inline |
Returns true if the current dictionary is empty.
References DtDictIterator< Key, Type >::myCurrentDict.
|
inline |
Moves the iterator to the first item of the current list.
To reset to the beginning of the first, call the reset method
References DtDictIterator< Key, Type >::myList, DtDictIterator< Key, Type >::myPosition, and DtDictIterator< Key, Type >::reset().
Referenced by DtDictIterator< Key, Type >::DtDictIterator(), and DtDictIterator< Key, Type >::nextList().
|
inline |
Will remove the string (if there) from the current dictionary in the iterator.
References DtDictIterator< Key, Type >::myCurrentDict.
|
inline |
Moves the iterator to the next object in the list.
References DtDictIterator< Key, Type >::myCurrentDict, and DtDictIterator< Key, Type >::nextList().
|
inline |
Moves the iterator down the list the specified number of spaces.
References DtDictIterator< Key, Type >::myList, and DtDictIterator< Key, Type >::myPosition.
|
inline |
|
inline |
References DtDictIterator< Key, Type >::myCurrentDict.
|
inline |
Resets the iterator to the first item in the supplied list index list.
References DtDictIterator< Key, Type >::myCurrentDict, DtDictIterator< Key, Type >::myList, and DtDictIterator< Key, Type >::myPosition.
Referenced by DtDictIterator< Key, Type >::toFirst().
|
inline |
Adds a data dictionary to our current dictionary list.
References DtDictIterator< Key, Type >::myCurrentDict, and DtDictIterator< Key, Type >::myList.
Referenced by DtDictIterator< Key, Type >::DtDictIterator().
|
inline |
Finds a particular key that could be in any of the attached dictionaries in this iterator.
References DtDictIterator< Key, Type >::myList.
|
inline |
Moves to the next list in the chain and returns the first element of that list.
If at the end of the lists, returns NULL
References DtDictIterator< Key, Type >::myCurrentDict, DtDictIterator< Key, Type >::myList, DtDictIterator< Key, Type >::myPosition, and DtDictIterator< Key, Type >::toFirst().
Referenced by DtDictIterator< Key, Type >::operator++().
|
protected |
Referenced by DtDictIterator< Key, Type >::addDataDict(), DtDictIterator< Key, Type >::count(), DtDictIterator< Key, Type >::current(), DtDictIterator< Key, Type >::isEmpty(), DtDictIterator< Key, Type >::nextList(), DtDictIterator< Key, Type >::operator++(), DtDictIterator< Key, Type >::remove(), and DtDictIterator< Key, Type >::reset().
|
protected |
|
protected |