Previous Table of Contents Next


19.9.12 Mapping for Enumerated Types


   ODL enumerated types are mapped to OMG IDL enums; for example:

   // ODLtypedef enum MyModule_color {red, green, blue};

   [odl,dual,uuid(...)]interface DIMyModule_foo: IDispatch {HRESULT op1([in] MyModule_color col);}

   // OMG IDL enum MyModule_color {red, green, blue}; interface foo: COM::CORBA_View {

   long op1(in MyModule_color col); }; };

   Note – An ODL enumeration is mapped to OMG IDL such that the enumerators in the enumeration are ordered according to the ascending order of the value of the enumerators. Because OMG IDL does not support explicitly tagged enumerators, the CORBA view of an automation/dual object must maintain the mapping of the values of the enumeration.