casa
$Rev:20696$
|
#include <HashMapIter.h>
Public Member Functions | |
void | toStart () |
Move the iterator to the start of the Map. | |
void | operator++ () |
Advance to the next element of the Map. | |
void | operator++ (int) |
const key & | getKey () const |
Get the key or value for the current position in the Map. | |
const val & | getVal () const |
Bool | atEnd () const |
Check to see if the iterator position is at the end or beginning of the Map. | |
Bool | atStart () const |
Bool | isValid () const |
Check to see if the iterator is in a valid state. | |
ConstHashMapIter (const HashMap< key, val > &st) | |
Constructs a Map iterator from a Map (with reference semantics). | |
virtual ConstHashMapIter< key, val > & | operator= (const HashMap< key, val > &other) |
Assign one map iterator to a map (with reference semantics). | |
ConstHashMapIter (const ConstHashMapIter< key, val > &st) | |
Constructs a Map iterator from another iterator (with reference semantics). | |
virtual ConstHashMapIter< key, val > & | operator= (const ConstHashMapIter< key, val > &other) |
Assign one map iterator to another iterator (with reference semantics). | |
ConstHashMapIter () | |
Default constructor creates an invalid Map iterator. | |
const val & | defaultVal () const |
Returns the default value for the Map on which this iterator is operating if it is a valid iterator, otherwise it throws an exception. | |
const val & | operator() (const key &ky) const |
Allows mapping functions to be performed with the map on which this iterator operates. | |
Bool | isDefined (const key &ky) const |
Allows one to check to see if a given key is defined in the map which this iterator tracks. | |
uInt | ndefined () const |
Returns the number of user defined mappings. | |
const HashMap< key, val > & | container () const |
Returns the container on which this iterator is operating. | |
virtual | ~ConstHashMapIter () |
dtor | |
Protected Member Functions | |
void | step () |
Protected Attributes | |
ListIter< OrderedPair< key, val > > | iter |
HashMap< key, val > * | Container |
uInt | curBucket |
Bool | atEnd_ |
Definition at line 81 of file HashMapIter.h.
casa::ConstHashMapIter< key, val >::ConstHashMapIter | ( | const HashMap< key, val > & | st | ) |
casa::ConstHashMapIter< key, val >::ConstHashMapIter | ( | const ConstHashMapIter< key, val > & | st | ) |
Constructs a Map iterator from another iterator (with reference semantics).
casa::ConstHashMapIter< key, val >::ConstHashMapIter | ( | ) | [inline] |
Default constructor creates an invalid Map iterator.
Definition at line 143 of file HashMapIter.h.
virtual casa::ConstHashMapIter< key, val >::~ConstHashMapIter | ( | ) | [virtual] |
dtor
Bool casa::ConstHashMapIter< key, val >::atEnd | ( | ) | const [inline] |
Check to see if the iterator position is at the end or beginning of the Map.
Definition at line 111 of file HashMapIter.h.
References casa::ConstHashMapIter< key, val >::atEnd_.
Bool casa::ConstHashMapIter< key, val >::atStart | ( | ) | const |
const HashMap<key,val>& casa::ConstHashMapIter< key, val >::container | ( | ) | const [inline] |
Returns the container on which this iterator is operating.
Reimplemented in casa::HashMapIter< key, val >.
Definition at line 192 of file HashMapIter.h.
References casa::ConstHashMapIter< key, val >::Container, casa::ConstHashMapIter< key, val >::isValid(), and casa::throw_invalid_hashmapiter_error().
const val& casa::ConstHashMapIter< key, val >::defaultVal | ( | ) | const [inline] |
Returns the default value for the Map on which this iterator is operating if it is a valid iterator, otherwise it throws an exception.
Reimplemented in casa::HashMapIter< key, val >.
Definition at line 151 of file HashMapIter.h.
References casa::ConstHashMapIter< key, val >::Container, casa::ConstHashMapIter< key, val >::isValid(), and casa::throw_invalid_hashmapiter_error().
const key& casa::ConstHashMapIter< key, val >::getKey | ( | ) | const |
Get the key or value for the current position in the Map.
const val& casa::ConstHashMapIter< key, val >::getVal | ( | ) | const |
Reimplemented in casa::HashMapIter< key, val >.
Bool casa::ConstHashMapIter< key, val >::isDefined | ( | const key & | ky | ) | const [inline] |
Allows one to check to see if a given key is defined in the map which this iterator tracks.
If this iterator is invalid, then an exception will be thrown.
Definition at line 173 of file HashMapIter.h.
References casa::ConstHashMapIter< key, val >::Container, casa::ConstHashMapIter< key, val >::isValid(), and casa::throw_invalid_hashmapiter_error().
Bool casa::ConstHashMapIter< key, val >::isValid | ( | ) | const [inline] |
Check to see if the iterator is in a valid state.
Definition at line 118 of file HashMapIter.h.
References casa::ConstHashMapIter< key, val >::Container, casa::False, and casa::True.
Referenced by casa::HashMapIter< key, val >::clear(), casa::ConstHashMapIter< key, val >::container(), casa::HashMapIter< key, val >::container(), casa::ConstHashMapIter< key, val >::defaultVal(), casa::HashMapIter< key, val >::defaultVal(), casa::HashMapIter< key, val >::define(), casa::ConstHashMapIter< key, val >::isDefined(), casa::ConstHashMapIter< key, val >::ndefined(), casa::ConstHashMapIter< key, val >::operator()(), casa::HashMapIter< key, val >::operator()(), and casa::HashMapIter< key, val >::remove().
uInt casa::ConstHashMapIter< key, val >::ndefined | ( | ) | const [inline] |
Returns the number of user defined mappings.
Definition at line 182 of file HashMapIter.h.
References casa::ConstHashMapIter< key, val >::Container, casa::ConstHashMapIter< key, val >::isValid(), and casa::throw_invalid_hashmapiter_error().
const val& casa::ConstHashMapIter< key, val >::operator() | ( | const key & | ky | ) | const [inline] |
Allows mapping functions to be performed with the map on which this iterator operates.
If this iterator is invalid, then an exception will be thrown.
Reimplemented in casa::HashMapIter< key, val >.
Definition at line 162 of file HashMapIter.h.
References casa::ConstHashMapIter< key, val >::Container, casa::ConstHashMapIter< key, val >::isValid(), and casa::throw_invalid_hashmapiter_error().
void casa::ConstHashMapIter< key, val >::operator++ | ( | ) | [inline] |
Advance to the next element of the Map.
Definition at line 93 of file HashMapIter.h.
References casa::ConstHashMapIter< key, val >::step().
void casa::ConstHashMapIter< key, val >::operator++ | ( | int | ) | [inline] |
Definition at line 94 of file HashMapIter.h.
References casa::ConstHashMapIter< key, val >::step().
virtual ConstHashMapIter<key,val>& casa::ConstHashMapIter< key, val >::operator= | ( | const HashMap< key, val > & | other | ) | [virtual] |
Assign one map iterator to a map (with reference semantics).
Reimplemented in casa::HashMapIter< key, val >.
virtual ConstHashMapIter<key,val>& casa::ConstHashMapIter< key, val >::operator= | ( | const ConstHashMapIter< key, val > & | other | ) | [virtual] |
Assign one map iterator to another iterator (with reference semantics).
Reimplemented in casa::HashMapIter< key, val >.
void casa::ConstHashMapIter< key, val >::step | ( | ) | [protected] |
Referenced by casa::ConstHashMapIter< key, val >::operator++().
void casa::ConstHashMapIter< key, val >::toStart | ( | ) |
Move the iterator to the start of the Map.
Bool casa::ConstHashMapIter< key, val >::atEnd_ [protected] |
Definition at line 208 of file HashMapIter.h.
Referenced by casa::ConstHashMapIter< key, val >::atEnd().
HashMap<key,val>* casa::ConstHashMapIter< key, val >::Container [protected] |
Definition at line 206 of file HashMapIter.h.
Referenced by casa::HashMapIter< key, val >::clear(), casa::ConstHashMapIter< key, val >::container(), casa::HashMapIter< key, val >::container(), casa::ConstHashMapIter< key, val >::defaultVal(), casa::HashMapIter< key, val >::defaultVal(), casa::HashMapIter< key, val >::define(), casa::ConstHashMapIter< key, val >::isDefined(), casa::ConstHashMapIter< key, val >::isValid(), casa::ConstHashMapIter< key, val >::ndefined(), casa::ConstHashMapIter< key, val >::operator()(), casa::HashMapIter< key, val >::operator()(), and casa::HashMapIter< key, val >::remove().
uInt casa::ConstHashMapIter< key, val >::curBucket [protected] |
Definition at line 207 of file HashMapIter.h.
ListIter<OrderedPair<key,val> > casa::ConstHashMapIter< key, val >::iter [protected] |
Definition at line 205 of file HashMapIter.h.