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

authentication - Mongodb revoke acccess to connect test database -

How to merge four videos on one screen with ffmpeg -

Receive udp packets in android gstreamer -