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 -

r - Update two sets of radiobuttons reactively - shiny -

ios - Realm over CoreData should I use NSFetchedResultController or a Dictionary? -