Enumerations

Embedded Proto fully supports enumerations. They work just like regular C++ enumerations. An enumeration defined in a .proto file as given:

enum Test_Enum 
{
  ZERO  = 0;
  ONE   = 1;
  TEN   = 10;
}

It is simply converted to the following C++ code:

enum Test_Enum
{
  ZERO = 0,
  ONE = 1,
  TEN = 10
};

Accessing enum values is done using the same functions as basic variables. As of version 4.0.0 this includes the mutable_ function, which returns a reference to the enum value.