Next: LutMap - Transform 1-dimensional coordinates using a lookup table
Up: AST Class Descriptions
Previous: IntraMap - Map points using a private transformation function
KeyMap
-
Store a set of key/value pairs
- Description:
- The KeyMap class is used to store a set of values with associated keys
which identify the values. The keys are strings. These may be case
sensitive or insensitive as selected by the KeyCase attribute, and
trailing spaces are ignored. The value associated with a key can be
integer (signed 4 and 2 byte, or unsigned 1 byte), floating point
(single or double precision),
void pointer,
character string or AST Object pointer. Each
value can be a scalar or a one-dimensional vector. A KeyMap is
conceptually similar to a Mapping in that a KeyMap transforms an
input into an output - the input is the key, and the output is the
value associated with the key. However, this is only a conceptual
similarity, and it should be noted that the KeyMap class inherits from
the Object class rather than the Mapping class. The methods of the
Mapping class cannot be used with a KeyMap.
- Constructor Function:
- astKeyMap
-
Inheritance
- The KeyMap class inherits from the Object class.
-
Attributes
- In addition to those attributes common to all Objects, every
KeyMap also has the following attributes:
- KeyCase: Sets the case in which keys are stored
- KeyError: Report an error if the requested key does not exist?
- SizeGuess: The expected size of the KeyMap.
- SortBy: Determines how keys are sorted in a KeyMap.
- MapLocked: Prevent new entries being added to the KeyMap?
-
Functions
- In addition to those functions applicable to all Objects, the
following functions may also be applied to all KeyMaps:
- astMapGet0
X
: Get a named scalar entry from a KeyMap
- astMapGet1
X
: Get a named vector entry from a KeyMap
- astMapGetElem
X
: Get an element of a named vector entry from a KeyMap
- astMapHasKey: Does the KeyMap contain a named entry?
- astMapKey: Return the key name at a given index in the KeyMap
- astMapLenC: Get the length of a named character entry in a KeyMap
- astMapLength: Get the length of a named entry in a KeyMap
- astMapCopy: Copy entries from one KeyMap into another
- astMapPut0
X
: Add a new scalar entry to a KeyMap
- astMapPut1
X
: Add a new vector entry to a KeyMap
- astMapPutElem
X
: Puts a value into a vector entry in a KeyMap
- astMapPutU: Add a new entry to a KeyMap with an undefined value
- astMapRemove: Removed a named entry from a KeyMap
- astMapRename: Rename an existing entry in a KeyMap
- astMapSize: Get the number of entries in a KeyMap
- astMapType: Return the data type of a named entry in a map
Next: LutMap - Transform 1-dimensional coordinates using a lookup table
Up: AST Class Descriptions
Previous: IntraMap - Map points using a private transformation function
AST A Library for Handling World Coordinate Systems in Astronomy
Starlink User Note 211
R.F. Warren-Smith & D.S. Berry
24th May 2011
E-mail:ussc@star.rl.ac.uk
Copyright (C) 2009 Science \& Technology Facilities Council