Getting all field names from a protocol buffer in C++? -


is there way fields of protobuff message using descriptor, in c++?

there's way in python this: getting field names protocol buffer?

just wondering if there's same thing in c++. tried find on descriptor.h, without success.

yes. if have descriptor, number of fields using descriptor::field_count(). then, iterate on fields using descriptor::field(int index), returns fielddescriptor, can find name of each field using fielddescriptor::name().


Comments

Popular posts from this blog

Receive udp packets in android gstreamer -

php - Extract Text from HTTP referer -

matplotlib - PYTHON: Annotate boxes disapear dependant on range -