Previous Table of Contents Next


18.3.3 Mapping for Enumerators


   COM enumerations can have enumerators explicitly tagged with values. When COM enumerations are mapped into CORBA, the enumerators are presented in CORBA in increasing order according to their tagged values.

   The Microsoft IDL or ODL specification:

   // Microsoft IDL or ODL typedef [v1_enum] enum tagA_or_B_orC { A = 0, B, C }

   A_or_B_or_C;

   would be represented as the following statements in OMG IDL:

   // OMG IDLenum A_or_B_or_C {B, C, A};

   In this manner, the precedence relationship is maintained in the OMG system such that B is less than C is less than A.

   OMG IDL does not support enumerators defined with explicit tagged values. The CORBA view of a COM object, therefore, is responsible for maintaining the correct tagged value of the mapped enumerators as they cross the view.