Support I have an enum in a .proto
file such as:
enum My_Types
{
my_types_a = 0;
my_types_b = 1;
my_types_c = 2;
}
I want to generate an EnumDescriptor
so that I can can reference values from this enum, but I must use the Google Reflection APIs . When using the protobuf compiled version of the .proto file, I would be able to say My_Types_descriptor()
to get the EnumDescriptor
, but how would I do this using reflection? The same would apply for EnumValueDescriptor
which can describe a particular enum constant.
Given a DescriptorPool, how can I use reflection to achieve this? I believe this API could help, but I do not know how to use it.