Resources | developer.brewmp.com Resources | developer.brewmp.com

Developer

resources

IDL enum in C++

IDL enumerated types are mapped as C/C++ enumerated types. Due to compiler differences in the actual width of enum types, a placeholder enumerator is added to generated enums to force the width to 4 bytes. This placeholder value is not considered to be a valid enum element by the generated stub and skeleton code, and should not be used elsewhere. The starting value for enums is always 0.

For example:

enum color
{
  RED,
  ORANGE,
  YELLOW,
  GREEN,
  BLUE
};

is mapped as:

enum color
{
  RED,
  ORANGE,
  YELLOW,
  GREEN,
  BLUE,
  _32BIT_PLACEHOLDER_color = 0x7fffffff
};