Get a single element of a vector value from a KeyMap astMapGetElemX
"
Data Type Codes"
section below for the code
appropriate to each supported data type). The stored value is converted to the data type indiced by
X
before being returned (an error is reported if it is not possible to convert the stored
value to the requested data type). Note, the astMapGetElemC function has an extra
parameter "
l"
which specifies the maximum length of the string to be stored in the
"
value"
buffer (see the "
astMapGetElemC"
section below). No error is reported if the requested key cannot be found in the given KeyMap, or if it has an undefined value, but a zero value will be returned as the function value.
"
value"
buffer supplied to the astMapGetElemC
function should be a pointer to a character array with "
l"
elements, where
"
l"
is the maximum length of the string to be returned. The value of "
l"
should be supplied as an extra parameter following "
key"
when invoking
astMapGetElemC, and should include space for a terminating null character.
D: double
F: float
I: int
K: int64_t
C: "
const"
pointer to null terminated character string
A: Pointer to AstObject
P: Generic "
void "
pointer
S: short int
B: Unsigned byte (i.e. char)
For example, astMapGetElemD would be used to get a "
double"
value, while astMapGetElemI
would be used to get an "
int"
value, etc. For D or I, the supplied "
value"
parameter should be a pointer to a double or int. For C, the supplied "
value"
parameter should be a pointer to a character string with "
l"
elements. For A,
the supplied "
value"
parameter should be a pointer to an AstObject pointer.