28 #ifndef CASA_SIMORDMAP_H
29 #define CASA_SIMORDMAP_H
31 #ifndef AIPS_USE_DEPRECATED
32 #error "SimOrdMap.h is deprecated; use -DBUILD_DEPRECATED=ON to use it"
44 #define KVBLKpair(INX) ((OrderedPair<K,V>*)(kvblk[INX]))
73 template<
class K,
class V>
class SimpleOrderedMap
91 SimpleOrderedMap<K,V>&
operator= (
const SimpleOrderedMap<K,V>&);
95 V &
define (
const K&,
const V&);
166 void rename (
const K& newkey,
const K& oldkey);
172 void remove (
const K&);
216 #ifndef CASACORE_NO_AUTO_TEMPLATES
217 #include <casacore/casa/Containers/SimOrdMap.tcc>
218 #endif //# CASACORE_NO_AUTO_TEMPLATES
const V & defaultVal() const
size_t nelements() const
The number of elements contained in this Block<T>.
SimpleOrderedMap< K, V > & operator=(const SimpleOrderedMap< K, V > &)
Assigns this SimpleOrderedMap to another with copy semantics.
~SimpleOrderedMap()
Removes a map.
Block< void * > kvblk
The blocks to hold the keys and values and the total, used and increment size of these blocks...
Simple map with keys ordered.
void rename(const K &newkey, const K &oldkey)
Rename a key.
static uInt Version()
Version for major change (used by SimOrdMapIO).
const V * isDefined(const K &k) const
void clear()
Clear the entire map (ie.
V & operator()(const K &ky)
This is the mapping function which maps keys to values.
Bool ok() const
Check the internal state.
uInt findKey(const K &, Bool &) const
Binary search for the key.
SimpleOrderedMap(const V &defaultValue, uInt size)
Creates a map with the specified default value, "value", and the internal block size.
bool Bool
Define the standard types used by Casacore.
V & defaultVal()
Returns the default value for the Map.
const V & getVal(uInt inx) const
Get the i-th value in the map.
void copyBlock(const SimpleOrderedMap< K, V > &)
Copy from another Block of OrderedPair's.
uInt ntot() const
Get the total size of the block in use.
V * isDefined(const K &)
These functions check to see if a mapping is defined between the specified key and some value...
uInt incr() const
Get or set the Block allocation increment.
void defaultValue(CStokesVector &v)
const K & getKey(uInt inx) const
Get the i-th key in the map.
V & define(const K &, const V &)
Defines a mapping (ie.
uInt ndefined() const
Get the number of elements in the map.
#define casacore
<X11/Intrinsic.h> #defines true, false, casacore::Bool, and String.