casacore
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
casacore::OrderedMapIterRep< key, value > Class Template Reference

OrderedMap iterator "letter". More...

#include <OrderedMap.h>

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 key, class value>
class casacore::OrderedMapIterRep< key, value >

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 302 of file OrderedMap.h.

Member Enumeration Documentation

◆ anonymous enum

template<class key , class value >
anonymous enum
Enumerator
OrderedMapIterRepVersion 

Definition at line 422 of file OrderedMap.h.

Constructor & Destructor Documentation

◆ OrderedMapIterRep() [1/2]

template<class key , class value >
casacore::OrderedMapIterRep< key, value >::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.

◆ OrderedMapIterRep() [2/2]

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

Definition at line 414 of file OrderedMap.h.

Member Function Documentation

◆ atEnd()

template<class key , class value >
Bool casacore::OrderedMapIterRep< key, value >::atEnd ( ) const
virtual

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

Implements casacore::MapIterRep< key, value >.

◆ atStart()

template<class key , class value >
Bool casacore::OrderedMapIterRep< key, value >::atStart ( ) const
virtual

◆ Clone()

template<class key , class value >
MapIterRep<key,value>* casacore::OrderedMapIterRep< key, value >::Clone ( )
inlinevirtual

Duplicate a map iterator.

Implements casacore::MapIterRep< key, value >.

Definition at line 388 of file OrderedMap.h.

References casacore::OrderedMapIterRep< key, value >::container.

◆ getKey() [1/2]

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

Retrieve the key at the current iterator position.

Implements casacore::MapIterRep< key, value >.

◆ getKey() [2/2]

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

◆ getVal() [1/4]

template<class key , class value >
value& casacore::OrderedMapIterRep< key, value >::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< key, value >::CurIndex, and casacore::OrderedMapIterRep< key, value >::getVal().

Referenced by casacore::OrderedMapIterRep< key, value >::getVal().

◆ getVal() [2/4]

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

Retrieve the value at the current iterator position.

Implements casacore::MapIterRep< key, value >.

◆ getVal() [3/4]

template<class key , class value >
value& casacore::OrderedMapIterRep< key, value >::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::OrderedMapIterRep< key, value >::container, casacore::OrderedMapIterRep< key, value >::isValid(), and casacore::OrderedMapIterRep< key, value >::throwInvalidIter().

◆ getVal() [4/4]

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

◆ isValid()

template<class key , class value >
Bool casacore::OrderedMapIterRep< key, value >::isValid ( ) const
virtual

◆ notify()

template<class key , class value >
void casacore::OrderedMapIterRep< key, value >::notify ( const Notice )
virtual

Hook through which NoticeTargets are notified (by NoticeSources).

Implements casacore::NoticeTarget.

◆ operator++() [1/2]

template<class key , class value >
void casacore::OrderedMapIterRep< key, value >::operator++ ( )
virtual

Advance the iterator to the next key.

Implements casacore::MapIterRep< key, value >.

◆ operator++() [2/2]

template<class key , class value >
void casacore::OrderedMapIterRep< key, value >::operator++ ( int  )
virtual

◆ throwInvalidIter()

template<class key , class value >
void casacore::OrderedMapIterRep< key, value >::throwInvalidIter ( ) const
protected

◆ thrownext()

template<class key , class value >
void casacore::OrderedMapIterRep< key, value >::thrownext ( ) const
protected

◆ toStart()

template<class key , class value >
void casacore::OrderedMapIterRep< key, value >::toStart ( )
virtual

Move the iterator to the beginning of the Map.

Implements casacore::MapIterRep< key, value >.

Member Data Documentation

◆ container

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

◆ CurIndex

template<class key , class value >
uInt casacore::OrderedMapIterRep< key, value >::CurIndex
protected

Definition at line 316 of file OrderedMap.h.

Referenced by casacore::OrderedMapIterRep< key, value >::getVal().


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