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"
35 #include <casacore/casa/aips.h>
36 #include <casacore/casa/Containers/OrderedPair.h>
37 #include <casacore/casa/Containers/Block.h>
38 #include <casacore/casa/BasicSL/String.h>
44 #define KVBLKpair(INX) ((OrderedPair<K,V>*)(kvblk[INX]))
166 void rename (
const K& newkey,
const K& oldkey);
216 #ifndef CASACORE_NO_AUTO_TEMPLATES
217 #include <casacore/casa/Containers/SimOrdMap.tcc>
size_t nelements() const
The number of elements contained in this Block<T>.
void clear()
Clear the entire map (ie.
V * isDefined(const K &)
These functions check to see if a mapping is defined between the specified key and some value.
const V * isDefined(const K &k) const
V & operator()(const K &ky)
This is the mapping function which maps keys to values.
Block< void * > kvblk
The blocks to hold the keys and values and the total, used and increment size of these blocks.
const K & getKey(uInt inx) const
Get the i-th key in the map.
uInt ntot() const
Get the total size of the block in use.
const V & defaultVal() const
V & define(const K &, const V &)
Defines a mapping (ie.
const V & getVal(uInt inx) const
Get the i-th value in the map.
uInt findKey(const K &, Bool &) const
Binary search for the key.
~SimpleOrderedMap()
Removes a map.
V & defaultVal()
Returns the default value for the Map.
SimpleOrderedMap(const V &defaultValue)
Creates a map with the specified default value, "value".
Bool ok() const
Check the internal state.
SimpleOrderedMap< K, V > & operator=(const SimpleOrderedMap< K, V > &)
Assigns this SimpleOrderedMap to another with copy semantics.
void copyBlock(const SimpleOrderedMap< K, V > &)
Copy from another Block of OrderedPair's.
SimpleOrderedMap(const V &defaultValue, uInt size)
Creates a map with the specified default value, "value", and the internal block size.
void rename(const K &newkey, const K &oldkey)
Rename a key.
static uInt Version()
Version for major change (used by SimOrdMapIO).
const V & operator()(const K &ky) const
uInt incr() const
Get or set the Block allocation increment.
uInt ndefined() const
Get the number of elements in the map.
void remove(const K &)
Undefines a mapping (ie.
SimpleOrderedMap(const SimpleOrderedMap< K, V > &)
Creates a map from another one; use copy semantics.
this file contains all the compiler specific defines
bool Bool
Define the standard types used by Casacore.