PreviousNext

C Declaration of Object Identifiers

Every application program that uses a class or another object identifier must explicitly import it into every compilation unit (C source module) that uses it. Each such class or object identifier name must be explicitly exported from just one compilation module. Most application programs find it convenient to export all the names they use from the same compilation unit. Exporting and importing is performed by using the following two macros:

· The importing macro makes the class or other object identifier constants available within a compilation unit.

- OM_IMPORT(class_name)

- OM_IMPORT(OID_name)

· The exporting macro allocates memory for the constants that represent the class or another object identifier.

- OM_EXPORT(class_name)

- OM_EXPORT(OID_name)

Object identifiers are defined in the appropriate header files, with the definition identifier having the prefix OMP_O_ followed by the variable name for the object identifier. The constant itself provides the hexadecimal value of the object identifier string.