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

Developer

resources

IDL enum in Lua

IDL enumerated types are mapped as constants, where the first symbol maps to zero, the second maps to one, and so on. For example:

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

is mapped as:

RED = 0   
ORANGE = 1
YELLOW = 2
GREEN = 3
BLUE = 4