PreviousNext

Enumerated Types

An OM attribute with syntax template Enum(*) is an enumerated type (OM_S_ENUMERATION) and has a set of values associated with that OM attribute. For example, one of the OM attributes of the OM class DS_C_ENTRY_INFO_SELECTION is DS_INFO_TYPE. DS_INFO_TYPE is listed in the OM attribute table for DS_C_ENTRY_INFO_SELECTION in XDS Class Definitions as having a value syntax of Enum(DS_Information_Type), as shown in the table below. DS_INFO_TYPE takes one of the following values:

· DS_TYPES_ONLY

· DS_TYPES_AND_VALUES


Description of an OM Attribute By Using Syntax Enum(*)

OM Attributes of a DS_C_ENTRY_INFO_SELECTION

OM Attribute

Value Syntax
Value Length Value Number Value Initially
DS_ALL_
ATTRIBUTES
OM_S_BOOLEAN - 1 OM_TRUE
DS_ATTRIBUTES_
SELECTED
String(OM_S_
OBJECT_
IDENTIFIER_
STRING)
- 0 or more -
DS_INFO_TYPE Enum(DS_
Information_Type)
- 1 DS_TYPES_
AND VALUES
The C language representation of the syntax of the OM attribute type DS_INFO_TYPE is OM_S_ENUMERATION as defined in the xom.h header file. The value of the OM attribute is either DS_TYPES_ONLY or DS_TYPES_AND_VALUES, as shown in the following code fragment from example.h:

/*

* Public Object ("Descriptor List") for

* Entry-Information-Selection

* parameter to ds_read().

*/

OM_descriptor selection[] = {

OM_OID_DESC(OM_CLASS, DS_C_ENTRY_INFO_SELECTION),

{ DS_ALL_ATTRIBUTES, OM_S_BOOLEAN, { OM_FALSE, NULL } },

OM_OID_DESC(DS_ATTRIBUTES_SELECTED, DS_A_PHONE_NBR),

{ DS_INFO_TYPE,OM_S_ENUMERATION,

{ DS_TYPES_AND_VALUES,NULL } },

OM_NULL_DESCRIPTOR

};