PreviousNext

OM_value

The OM_value data type is used to represent any data value. Its C declaration is as follows:

typedef struct {

OM_uint32 padding;

OM_object object;

} OM_padded_object;
typedef union OM_value_union {

OM_string string;

OM_boolean boolean;

OM_enumeration enumeration;

OM_integer integer;

OM_padded_object object;

} OM_value;

Note: The first type definition (in particular, its padding component) aligns the object component with the elements component of the string component in the second type definition. This facilitates initialization in C.

The identifier OM_value_union is defined for reasons of compilation order. It is used in the definition of the OM_descriptor data type.

A data value of this data type is an attribute value. It has no components if the value's syntax is OM_S_NO_MORE_SYNTAXES or OM_S_NO_VALUE. Otherwise, it has one of the following components:

· string

The value if its syntax is a string syntax

· boolean

The value if its syntax is OM_S_BOOLEAN

· enumeration

The value if its syntax is OM_S_ENUMERATION

· integer

The value if its syntax is OM_S_INTEGER

· object

The value if its syntax is OM_S_OBJECT

Note: A data value of this data type is only displayed as a component of a descriptor. Thus, it is always accompanied by indicators of the value's syntax. The latter indicator reveals which component is present.