An Interface Definition Language (IDL) enum is mapped to a corresponding C++ enum. For example, given the following IDL:
module M { enum Color { red, green, blue }; };a C++ programmer might introduce a local variable of the corresponding C++ type and initialize it with the following code:
{ M::Color MYCOLOR = M::red; }
Note: The name of the enumeration value is M::red not M::Color::red. The enum construct does not introduce a nested scope; the enumeration value identifiers are in the same scope as the name of the enum. For this reason, choose the names of the enumeration values carefully so that they do not conflict with other IDL identifiers.