casacore
|
#include <HashMap.h>
Public Member Functions | |
void | toStart () |
Move the iterator to the start of the Map. More... | |
void | operator++ () |
Advance to the next element of the Map. More... | |
void | operator++ (int) |
const key & | getKey () const |
Get the key or value for the current position in the Map. More... | |
const val & | getVal () const |
Bool | atEnd () const |
Check to see if the iterator position is at the end or beginning of the Map. More... | |
Bool | atStart () const |
Bool | isValid () const |
Check to see if the iterator is in a valid state. More... | |
ConstHashMapIter (const HashMap< key, val > &st) | |
Constructs a Map iterator from a Map (with reference semantics). More... | |
virtual ConstHashMapIter< key, val > & | operator= (const HashMap< key, val > &other) |
Assign one map iterator to a map (with reference semantics). More... | |
ConstHashMapIter (const ConstHashMapIter< key, val > &st) | |
Constructs a Map iterator from another iterator (with reference semantics). More... | |
virtual ConstHashMapIter< key, val > & | operator= (const ConstHashMapIter< key, val > &other) |
Assign one map iterator to another iterator (with reference semantics). More... | |
ConstHashMapIter () | |
Default constructor creates an invalid Map iterator. More... | |
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. More... | |
const val & | operator() (const key &ky) const |
Allows mapping functions to be performed with the map on which this iterator operates. More... | |
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. More... | |
uInt | ndefined () const |
Returns the number of user defined mappings. More... | |
const HashMap< key, val > & | container () const |
Returns the container on which this iterator is operating. More... | |
virtual | ~ConstHashMapIter () |
dtor More... | |
Protected Member Functions | |
void | step () |
Protected Attributes | |
ListIter< OrderedPair< key, val > > | iter |
HashMap< key, val > * | Container |
uInt | curBucket |
Bool | atEnd_ |
casacore::ConstHashMapIter< key, val >::ConstHashMapIter | ( | const HashMap< key, val > & | st | ) |
casacore::ConstHashMapIter< key, val >::ConstHashMapIter | ( | const ConstHashMapIter< key, val > & | st | ) |
Constructs a Map iterator from another iterator (with reference semantics).
|
inline |
Default constructor creates an invalid Map iterator.
Definition at line 144 of file HashMapIter.h.
Referenced by casacore::ConstHashMapIter< key, val >::isValid().
|
virtual |
dtor
Referenced by casacore::ConstHashMapIter< key, val >::container().
|
inline |
Check to see if the iterator position is at the end or beginning of the Map.
Definition at line 112 of file HashMapIter.h.
References casacore::ConstHashMapIter< key, val >::atEnd_, and casacore::ConstHashMapIter< key, val >::atStart().
Bool casacore::ConstHashMapIter< key, val >::atStart | ( | ) | const |
Referenced by casacore::ConstHashMapIter< key, val >::atEnd().
|
inline |
Returns the container on which this iterator is operating.
Definition at line 193 of file HashMapIter.h.
References casacore::ConstHashMapIter< key, val >::Container, casacore::ConstHashMapIter< key, val >::isValid(), casacore::ConstHashMapIter< key, val >::step(), casacore::throw_invalid_hashmapiter_error(), and casacore::ConstHashMapIter< key, val >::~ConstHashMapIter().
|
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.
Definition at line 152 of file HashMapIter.h.
References casacore::ConstHashMapIter< key, val >::Container, casacore::ConstHashMapIter< key, val >::isValid(), and casacore::throw_invalid_hashmapiter_error().
Referenced by casacore::HashMapIter< key, val >::defaultVal().
const key& casacore::ConstHashMapIter< key, val >::getKey | ( | ) | const |
Get the key or value for the current position in the Map.
Referenced by casacore::ConstHashMapIter< key, val >::operator++().
const val& casacore::ConstHashMapIter< key, val >::getVal | ( | ) | const |
Referenced by casacore::ConstHashMapIter< key, val >::operator++().
|
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 174 of file HashMapIter.h.
References casacore::ConstHashMapIter< key, val >::Container, casacore::ConstHashMapIter< key, val >::isValid(), and casacore::throw_invalid_hashmapiter_error().
|
inline |
Check to see if the iterator is in a valid state.
Definition at line 119 of file HashMapIter.h.
References casacore::ConstHashMapIter< key, val >::ConstHashMapIter(), casacore::ConstHashMapIter< key, val >::Container, casacore::False, casacore::ConstHashMapIter< key, val >::operator=(), and casacore::True.
Referenced by casacore::HashMapIter< key, val >::clear(), casacore::ConstHashMapIter< key, val >::container(), casacore::HashMapIter< key, val >::container(), casacore::ConstHashMapIter< key, val >::defaultVal(), casacore::HashMapIter< key, val >::defaultVal(), casacore::HashMapIter< key, val >::define(), casacore::ConstHashMapIter< key, val >::isDefined(), casacore::ConstHashMapIter< key, val >::ndefined(), casacore::ConstHashMapIter< key, val >::operator()(), casacore::HashMapIter< key, val >::operator()(), and casacore::HashMapIter< key, val >::remove().
|
inline |
Returns the number of user defined mappings.
Definition at line 183 of file HashMapIter.h.
References casacore::ConstHashMapIter< key, val >::Container, casacore::ConstHashMapIter< key, val >::isValid(), and casacore::throw_invalid_hashmapiter_error().
|
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.
Definition at line 163 of file HashMapIter.h.
References casacore::ConstHashMapIter< key, val >::Container, casacore::ConstHashMapIter< key, val >::isValid(), and casacore::throw_invalid_hashmapiter_error().
Referenced by casacore::HashMapIter< key, val >::operator()().
|
inline |
Advance to the next element of the Map.
Definition at line 94 of file HashMapIter.h.
References casacore::ConstHashMapIter< key, val >::step().
|
inline |
Definition at line 95 of file HashMapIter.h.
References casacore::ConstHashMapIter< key, val >::getKey(), casacore::ConstHashMapIter< key, val >::getVal(), and casacore::ConstHashMapIter< key, val >::step().
|
virtual |
Assign one map iterator to a map (with reference semantics).
Reimplemented in casacore::HashMapIter< key, val >.
Referenced by casacore::HashMapIter< key, val >::HashMapIter(), and casacore::ConstHashMapIter< key, val >::isValid().
|
virtual |
Assign one map iterator to another iterator (with reference semantics).
Reimplemented in casacore::HashMapIter< key, val >.
|
protected |
void casacore::ConstHashMapIter< key, val >::toStart | ( | ) |
Move the iterator to the start of the Map.
|
protected |
Definition at line 209 of file HashMapIter.h.
Referenced by casacore::ConstHashMapIter< key, val >::atEnd().
|
protected |
Definition at line 207 of file HashMapIter.h.
Referenced by casacore::HashMapIter< key, val >::clear(), casacore::ConstHashMapIter< key, val >::container(), casacore::HashMapIter< key, val >::container(), casacore::ConstHashMapIter< key, val >::defaultVal(), casacore::HashMapIter< key, val >::defaultVal(), casacore::HashMapIter< key, val >::define(), casacore::ConstHashMapIter< key, val >::isDefined(), casacore::ConstHashMapIter< key, val >::isValid(), casacore::ConstHashMapIter< key, val >::ndefined(), casacore::ConstHashMapIter< key, val >::operator()(), casacore::HashMapIter< key, val >::operator()(), and casacore::HashMapIter< key, val >::remove().
|
protected |
Definition at line 208 of file HashMapIter.h.
|
protected |
Definition at line 206 of file HashMapIter.h.