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

Developer

resources

IDL enum in C

IDL enumerated types are mapped to C enumerated types, with a typedef to allow the name of the enum to be used as a type. As in the C++ mapping (see Broken Link), a placeholder enumerator is added to each enum to ensure binary compatibility across compilers.

Note: The starting value for enums is always 0.

For example:

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


is mapped as:

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