mercredi 19 octobre 2016

protocol buffers get EnumDescriptor *

I have an UpdateType enum in my protocol buffers message

I want to modify it using reflections, for that I need EnumDescriptor.

Google protocol buffers Documentation says

#include <google/protobuf/descriptor.h>
namespace google::protobuf

Describes an enum type defined in a .proto file.

To get the EnumDescriptor for a generated enum type, call TypeName_descriptor(). Use DescriptorPool to construct your own descriptors.

How can I get EnumDescriptor? where is TypeName_descriptor() func?

Aucun commentaire:

Enregistrer un commentaire