AST_KEYMAP

Create a KeyMap

Description:

This function creates a new empty KeyMap and optionally initialises its attributes. Entries can then be added to the KeyMap using the AST_MAPPUT0 <X > and AST_MAPPUT1 <X > functions.

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), 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.

Invocation

RESULT = AST_KEYMAP( OPTIONS, STATUS )

Arguments

OPTIONS = CHARACTER ( ) (Given)
A character string containing an optional comma-separated list of attribute assignments to be used for initialising the new KeyMap. The syntax used is identical to that for the AST_SET routine.
STATUS = INTEGER (Given and Returned)
The global status.

Returned Value

AST_MAP = INTEGER
A pointer to the new KeyMap.

Notes:

Status Handling

The protected interface to this function includes an extra parameter at the end of the parameter list descirbed above. This parameter is a pointer to the integer inherited status variable: " int status" .