Here's what I am trying to figure out, their docs don't explain this well enough, at least to me..

Senario:

I have 5 proto files that I generate with protoc for C++. My application needs to receive a message and then be able to iterate through all the fields while accessing their values and names.

What I would like to do is parse a message into the DynamicMessage class and then do the iteration through the fields. This way I don't have to know exactly what message it is and I can handle them all in a single generic way.

I know it's possible to handle the messages by parsing them to their specific type then treating them as their Message base class but for my application that is not desirable.

It looks like what I want to do should be possible via the "--descriptor_set_out" and dynamic message class.

What I've Tried (And Failed With):

I moved the descriptor.proto into the folder with my protos and included it along side my others in the compilation step. I also set the--descriptor_set_out flag to print to a file "my_descriptors.pb.ds"

I have no idea where to proceed from there.

Here's what i've referenced, although there isn't much... Sorry for the long post, and somewhat vague topic naming schema.

Also, incase it wasn't clear, I assume the messages aren't "Unknown." I assume there will still be the requirement of including the respective headers for each proto so my code knows about the 'unknown' message its handling.

Edit
Report