casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | Friends
casa::OrderedMapRep< key, value > Class Template Reference

Representation class for an Ordered Map. More...

#include <OrderedMap.h>

Inheritance diagram for casa::OrderedMapRep< key, value >:
casa::NoticeSource casa::MapRep< key, value >

List of all members.

Public Types

enum  { OrderedMapRepVersion }

Public Member Functions

 OrderedMapRep (const value &, uInt size)
 Creates a map with the specified default value, "value", and the internal block size.
 OrderedMapRep (const value &)
 Creates a map with the specified default value, "value".
valueisDefined (const key &)
 These functions check to see if a mapping is defined between the specified key and some value.
const valueisDefined (const key &) const
 Returns a non-zero value if a mapping is defined for the key parameter.
uInt ndefined () const
 Returns the number of user defined mappings.
valuedefine (const key &, const value &)
 Defines a mapping (ie.
void remove (const key &)
 Undefines a mapping (ie.
void clear ()
 Clear the entire map (ie.
MapIterRep< key, value > * getRep (Map< key, value > *) const
MapRep< key, value > * Clone () const
uInt nused () const
 Get the number of mappings.
uInt ntot () const
uInt incr () const
 Get or set the Block allocation increment.
uInt incr (uInt nri)
 ~OrderedMapRep ()
 Removes a map.

Protected Member Functions

Int findKey (const key &, Bool &) const
 Binary search for the key.

Protected Attributes

PtrBlock< OrderedPair< key,
value > * > 
kvblk
 The blocks to hold the keys and values and the total, used and increment size of these blocks.
uInt nrtot
uInt nrused
uInt nrincr
uInt lastRef
 The index of the last key used.

Friends

class OrderedMap< key, value >

Detailed Description

template<class key, class value>
class casa::OrderedMapRep< key, value >

Representation class for an Ordered Map.

Review Status

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

Definition at line 98 of file OrderedMap.h.


Member Enumeration Documentation

template<class key , class value >
anonymous enum
Enumerator:
OrderedMapRepVersion 

Definition at line 165 of file OrderedMap.h.


Constructor & Destructor Documentation

template<class key , class value >
casa::OrderedMapRep< key, value >::OrderedMapRep ( const value ,
uInt  size 
)

Creates a map with the specified default value, "value", and the internal block size.

template<class key , class value >
casa::OrderedMapRep< key, value >::OrderedMapRep ( const value )

Creates a map with the specified default value, "value".

template<class key , class value >
casa::OrderedMapRep< key, value >::~OrderedMapRep ( )

Removes a map.


Member Function Documentation

template<class key , class value >
void casa::OrderedMapRep< key, value >::clear ( ) [virtual]

Clear the entire map (ie.

remove all mappings).

Implements casa::MapRep< key, value >.

template<class key , class value >
MapRep<key,value>* casa::OrderedMapRep< key, value >::Clone ( ) const [virtual]
template<class key , class value >
value& casa::OrderedMapRep< key, value >::define ( const key &  ,
const value  
) [virtual]

Defines a mapping (ie.

create a key value mapping)

Implements casa::MapRep< key, value >.

template<class key , class value >
Int casa::OrderedMapRep< key, value >::findKey ( const key &  ,
Bool  
) const [protected]

Binary search for the key.

template<class key , class value >
MapIterRep<key,value>* casa::OrderedMapRep< key, value >::getRep ( Map< key, value > *  ) const [virtual]
template<class key , class value >
uInt casa::OrderedMapRep< key, value >::incr ( ) const [inline]

Get or set the Block allocation increment.

Definition at line 156 of file OrderedMap.h.

References casa::OrderedMapRep< key, value >::nrincr.

template<class key , class value >
uInt casa::OrderedMapRep< key, value >::incr ( uInt  nri) [inline]

Definition at line 157 of file OrderedMap.h.

References casa::OrderedMapRep< key, value >::nrincr.

template<class key , class value >
value* casa::OrderedMapRep< key, value >::isDefined ( const key &  ) [virtual]

These functions check to see if a mapping is defined between the specified key and some value.

If one is, a pointer to the value is returned, otherwise 0 is returned.

Implements casa::MapRep< key, value >.

template<class key , class value >
const value* casa::OrderedMapRep< key, value >::isDefined ( const key &  ) const [virtual]

Returns a non-zero value if a mapping is defined for the key parameter.

Implements casa::MapRep< key, value >.

template<class key , class value >
uInt casa::OrderedMapRep< key, value >::ndefined ( ) const [virtual]

Returns the number of user defined mappings.

Implements casa::MapRep< key, value >.

template<class key , class value >
uInt casa::OrderedMapRep< key, value >::ntot ( ) const [inline]

Definition at line 150 of file OrderedMap.h.

References casa::OrderedMapRep< key, value >::nrtot.

template<class key , class value >
uInt casa::OrderedMapRep< key, value >::nused ( ) const [inline]

Get the number of mappings.

Definition at line 149 of file OrderedMap.h.

References casa::OrderedMapRep< key, value >::nrused.

template<class key , class value >
void casa::OrderedMapRep< key, value >::remove ( const key &  ) [virtual]

Undefines a mapping (ie.

remove a key value mapping).

Implements casa::MapRep< key, value >.


Friends And Related Function Documentation

template<class key , class value >
friend class OrderedMap< key, value > [friend]

Definition at line 99 of file OrderedMap.h.


Member Data Documentation

template<class key , class value >
PtrBlock<OrderedPair<key,value>*> casa::OrderedMapRep< key, value >::kvblk [protected]

The blocks to hold the keys and values and the total, used and increment size of these blocks.

Definition at line 170 of file OrderedMap.h.

template<class key , class value >
uInt casa::OrderedMapRep< key, value >::lastRef [protected]

The index of the last key used.

Definition at line 176 of file OrderedMap.h.

template<class key , class value >
uInt casa::OrderedMapRep< key, value >::nrincr [protected]

Definition at line 173 of file OrderedMap.h.

Referenced by casa::OrderedMapRep< key, value >::incr().

template<class key , class value >
uInt casa::OrderedMapRep< key, value >::nrtot [protected]

Definition at line 171 of file OrderedMap.h.

Referenced by casa::OrderedMapRep< key, value >::ntot().

template<class key , class value >
uInt casa::OrderedMapRep< key, value >::nrused [protected]

Definition at line 172 of file OrderedMap.h.

Referenced by casa::OrderedMapRep< key, value >::nused().


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