VistaIODecodeAttrValue(3)

NAME
VistaIODecodeAttrValue - decode an attribute value

SYNOPSIS
VistaIOBoolean VistaIODecodeAttrValue (str, dict, repn, value)
    VistaIOStringConst str;
    VistaIODictEntry *dict;
    VistaIORepnKind repn;
    VistaIOPointer value;

ARGUMENTS

str Specifies the attribute value to be decoded.

dict
    May specify a dictionary to be used in recognizing the value supplied as a keyword, or it may be NULL

repn
    Specifies the representation in which the value is to be returned. It must be one of VistaIOBitRepn, VistaIOUByteRepn, VistaIOSByteRepn, VistaIOShortRepn, VistaIOLongRepn, VistaIOFloatRepn, VistaIODoubleRepn, VistaIOBooleanRepn, or VistaIOStringRepn.

value
    Specifies a location at which the value is be returned.

DESCRIPTION
VistaIODecodeAttrValue decodes the string str, returning its value in the form specified by repn.

If a dictionary, dict, has been provided, the routine determines whether str is a keyword defined in the dictionary. If so, it uses the value associated with that keyword rather than the attribute's original value. (See the VistaIOdictionary(3) manual page.)

The value obtained directly from str, or indirectly via the dictionary, is converted to the representation repn and then stored at the location pointed to by value.

RETURN VALUES
VistaIODecodeAttrValue returns TRUE if successful and FALSE otherwise. It will fail if repn is invalid, or if the str cannot be interpreted as a value of the type indicated by repn.

SEE ALSO
VistaIOEncodeAttrValue(3), VistaIOGetAttr(3), VistaIOattribute(3),

NOTES
The value argument must point to sufficient storage to contain a value of the representation requested. Neither VistaIODecodeAttrValue nor the C compiler can automatically check that this is so.

DIAGNOSTICS

``Can't decode to repn.''
    The repn argument is not one of VistaIOBitRepn, VistaIOUByteRepn, ..., VistaIOBooleanRepn, or VistaIOStringRepn.

AUTHOR
Art Pope <pope@cs.ubc.ca>

Adaption to vistaio: Gert Wollny <gw.fossdev@gmail.com>