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>.
V & define(const K &, const V &)
Defines a mapping (ie.
SimpleOrderedMap< K, V > & operator=(const SimpleOrderedMap< K, V > &)
Assigns this SimpleOrderedMap to another with copy semantics.
void clear()
Clear the entire map (ie.
Block< void * > kvblk
The blocks to hold the keys and values and the total, used and increment size of these blocks.
uInt ntot() const
Get the total size of the block in use.
V & defaultVal()
Returns the default value for the Map.
const K & getKey(uInt inx) const
Get the i-th key in the map.
uInt findKey(const K &, Bool &) const
Binary search for the key.
~SimpleOrderedMap()
Removes a map.
SimpleOrderedMap(const V &defaultValue)
Creates a map with the specified default value, "value".
Bool ok() const
Check the internal state.
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.
const V & operator()(const K &ky) const
void rename(const K &newkey, const K &oldkey)
Rename a key.
const V & defaultVal() const
V * isDefined(const K &)
These functions check to see if a mapping is defined between the specified key and some value.
static uInt Version()
Version for major change (used by SimOrdMapIO).
uInt incr() const
Get or set the Block allocation increment.
V & operator()(const K &ky)
This is the mapping function which maps keys to values.
const V & getVal(uInt inx) const
Get the i-th value in the map.
uInt ndefined() const
Get the number of elements in the map.
void remove(const K &)
Undefines a mapping (ie.
const V * isDefined(const K &k) const
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.