casacore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
casacore::OrderedMapIterRep< t, v > Class Template Reference

OrderedMap iterator "letter". More...

#include <OrderedMap.h>

Inheritance diagram for casacore::OrderedMapIterRep< t, v >:
casacore::MapIterRep< key, value > casacore::NoticeTarget

Public Types

enum  { OrderedMapIterRepVersion }
 
- Public Types inherited from casacore::MapIterRep< key, value >
enum  { MapIterRepVersion }
 

Public Member Functions

Bool isValid () const
 Checks to see if the iterator is in a valid state. More...
 
Bool atEnd () const
 Checks to see if the iterator is at one of the map extremes, "atEnd()" or "atStart()". More...
 
Bool atStart () const
 
void toStart ()
 Move the iterator to the beginning of the Map. More...
 
void operator++ ()
 Advance the iterator to the next key. More...
 
void operator++ (int)
 
const key & getKey () const
 Retrieve the key at the current iterator position. More...
 
const key & getKey (uInt inx) const
 
valuegetVal (uInt inx)
 Retrieve the value at the given index in the internal block which stores the representation of the OrderedMap. More...
 
const valuegetVal () const
 Retrieve the value at the current iterator position. More...
 
const valuegetVal (uInt inx) const
 
valuegetVal ()
 Return the value at the current location of the map iterator. More...
 
MapIterRep< key, value > * Clone ()
 Duplicate a map iterator. More...
 
void notify (const Notice &)
 Hook through which NoticeTargets are notified (by NoticeSources). More...
 
 OrderedMapIterRep (OrderedMap< key, value > *st)
 These constructors allow a ListMapIter to be constructed from a ListMap. More...
 
 OrderedMapIterRep (OrderedMap< key, value > &st)
 
- Public Member Functions inherited from casacore::MapIterRep< key, value >
const valuedefaultVal () const
 This returns the default value for the map that this iterator is tracking. More...
 
valuedefaultVal ()
 
valuedefine (const key &ky, const value &val)
 These functions allow for the definition and removal of key/value relations. More...
 
void remove (const key &ky)
 
void clear ()
 Clear all of the mappings. More...
 
const valueoperator() (const key &ky) const
 Allows mapping functions to be performed with the map on which this iterator operates. More...
 
valueoperator() (const key &ky)
 
const valueisDefined (const key &ky) const
 Allows one to check to see if a given key is defined in the map which this iterator tracks. More...
 
valueisDefined (const key &ky)
 
uInt ndefined () const
 Returns the number of user defined mappings. More...
 
Map< key, value > & container ()
 Returns the container on which this iterator is operating. More...
 
const Map< key, value > & container () const
 
 MapIterRep (Map< key, value > &st)
 This allows a MapIter to be constructed from a Map. More...
 
 MapIterRep (Map< key, value > *st)
 
virtual ~MapIterRep ()
 
- Public Member Functions inherited from casacore::NoticeTarget
virtual ~NoticeTarget ()
 Destructs this NoticeTarget. More...
 
Bool isValid () const
 Returns a boolean value telling whether this NoticeTarget is still "valid". More...
 
Bool isAttached () const
 Returns a boolean value telling whether this NoticeTarget is still attached to a NoticeSource or not. More...
 
void invalidate ()
 Makes the current NoticeTarget "invalid". More...
 

Protected Member Functions

void thrownext () const
 
void throwInvalidIter () const
 
- Protected Member Functions inherited from casacore::NoticeTarget
 NoticeTarget ()
 Creates an unlinked, "invalid" NoticeTarget. More...
 
 NoticeTarget (NoticeSource *v)
 Creates a "valid" NoticeTarget linked to the specified NoticeSource. More...
 
 NoticeTarget (NoticeSource &v)
 
 NoticeTarget (NoticeTarget &other)
 Creates a "valid" NoticeTarget linked to the same NoticeSource as the other NoticeTarget. More...
 
 NoticeTarget (NoticeTarget *other)
 
void unlink ()
 Unlinks this NoticeTarget from its NoticeSource. More...
 
void link (const NoticeTarget &other)
 Links this NoticeTarget to the same NoticeSource as the other NoticeTarget. More...
 
void link (const NoticeTarget *other)
 
Link< NoticeTarget * > * next ()
 Retrieves the next NoticeTarget in the target list of the associated NoticeSource. More...
 
const Link< NoticeTarget * > * next () const
 
void attach (NoticeSource *v)
 Adds this NoticeTarget to the target list in the specified NoticeSource, so that it will receive all notices sent out by that NoticeSource. More...
 
void attach (NoticeSource &v)
 

Protected Attributes

OrderedMap< key, value > * container
 
uInt CurIndex
 
- Protected Attributes inherited from casacore::MapIterRep< key, value >
Map< key, value > * Container
 
- Protected Attributes inherited from casacore::NoticeTarget
Link< NoticeTarget * > * ilink
 
NoticeSourcecontainer
 
Bool valid
 

Detailed Description

template<class t, class v>
class casacore::OrderedMapIterRep< t, v >

OrderedMap iterator "letter".

Review Status

Reviewed By:
UNKNOWN
Date Reviewed:
before2004/08/25

This is the "letter" which when paired (Const)MapIter "envelope" allows traversal of "OrderedMap"s.

Definition at line 48 of file OrderedMap.h.

Member Enumeration Documentation

template<class t , class v >
anonymous enum
Enumerator
OrderedMapIterRepVersion 

Definition at line 422 of file OrderedMap.h.

Constructor & Destructor Documentation

template<class t , class v >
casacore::OrderedMapIterRep< t, v >::OrderedMapIterRep ( OrderedMap< key, value > *  st)
inline

These constructors allow a ListMapIter to be constructed from a ListMap.

Definition at line 407 of file OrderedMap.h.

template<class t , class v >
casacore::OrderedMapIterRep< t, v >::OrderedMapIterRep ( OrderedMap< key, value > &  st)
inline

Definition at line 414 of file OrderedMap.h.

Member Function Documentation

template<class t , class v >
Bool casacore::OrderedMapIterRep< t, v >::atEnd ( ) const
virtual

Checks to see if the iterator is at one of the map extremes, "atEnd()" or "atStart()".

Implements casacore::MapIterRep< key, value >.

template<class t , class v >
Bool casacore::OrderedMapIterRep< t, v >::atStart ( ) const
virtual
template<class t , class v >
MapIterRep<key,value>* casacore::OrderedMapIterRep< t, v >::Clone ( )
inlinevirtual

Duplicate a map iterator.

Implements casacore::MapIterRep< key, value >.

Definition at line 388 of file OrderedMap.h.

References casacore::MapIterRep< key, value >::container().

template<class t , class v >
const key& casacore::OrderedMapIterRep< t, v >::getKey ( ) const
virtual

Retrieve the key at the current iterator position.

Implements casacore::MapIterRep< key, value >.

template<class t , class v >
const key& casacore::OrderedMapIterRep< t, v >::getKey ( uInt  inx) const
inline
template<class t , class v >
value& casacore::OrderedMapIterRep< t, v >::getVal ( uInt  inx)
inline

Retrieve the value at the given index in the internal block which stores the representation of the OrderedMap.


Note: This should typically not be used;

Definition at line 366 of file OrderedMap.h.

References casacore::MapIterRep< key, value >::container(), casacore::OrderedMapIterRep< t, v >::isValid(), and casacore::OrderedMapIterRep< t, v >::throwInvalidIter().

template<class t , class v >
const value& casacore::OrderedMapIterRep< t, v >::getVal ( ) const
virtual

Retrieve the value at the current iterator position.

Implements casacore::MapIterRep< key, value >.

template<class t , class v >
const value& casacore::OrderedMapIterRep< t, v >::getVal ( uInt  inx) const
inline
template<class t , class v >
value& casacore::OrderedMapIterRep< t, v >::getVal ( )
inlinevirtual

Return the value at the current location of the map iterator.

Should throw an exception if the iterator is "past the end of the Map" or if the iterator is invalid.

Implements casacore::MapIterRep< key, value >.

Definition at line 384 of file OrderedMap.h.

References casacore::OrderedMapIterRep< t, v >::CurIndex, and casacore::OrderedMapIterRep< t, v >::getVal().

Referenced by casacore::OrderedMapIterRep< t, v >::getVal().

template<class t , class v >
Bool casacore::OrderedMapIterRep< t, v >::isValid ( ) const
virtual

Checks to see if the iterator is in a valid state.

Implements casacore::MapIterRep< key, value >.

Referenced by casacore::OrderedMapIterRep< t, v >::getKey(), and casacore::OrderedMapIterRep< t, v >::getVal().

template<class t , class v >
void casacore::OrderedMapIterRep< t, v >::notify ( const Notice )
virtual

Hook through which NoticeTargets are notified (by NoticeSources).

Implements casacore::NoticeTarget.

template<class t , class v >
void casacore::OrderedMapIterRep< t, v >::operator++ ( )
virtual

Advance the iterator to the next key.

Implements casacore::MapIterRep< key, value >.

template<class t , class v >
void casacore::OrderedMapIterRep< t, v >::operator++ ( int  )
virtual
template<class t , class v >
void casacore::OrderedMapIterRep< t, v >::throwInvalidIter ( ) const
protected
template<class t , class v >
void casacore::OrderedMapIterRep< t, v >::thrownext ( ) const
protected
template<class t , class v >
void casacore::OrderedMapIterRep< t, v >::toStart ( )
virtual

Move the iterator to the beginning of the Map.

Implements casacore::MapIterRep< key, value >.

Member Data Documentation

template<class t , class v >
OrderedMap<key,value>* casacore::OrderedMapIterRep< t, v >::container
protected

Definition at line 314 of file OrderedMap.h.

template<class t , class v >
uInt casacore::OrderedMapIterRep< t, v >::CurIndex
protected

Definition at line 316 of file OrderedMap.h.

Referenced by casacore::OrderedMapIterRep< t, v >::getVal().


The documentation for this class was generated from the following file: