Is there a way to obtain a simple struct from protocol buffers message in C++? i.e.
struct PlainFoo {
int32_t bar;
float baz;
};
from
message Foo {
required int32 bar = 1;
required float baz = 2;
}
I obtain some data over network in a protocol buffer and I'd like to be able to add it to other similar data and store it in a compact representation for internal use without having to basically copy the message declaration in my code.
I know I can use the generated message class itself, but it has bunch of internal members that I'd prefer not having to move around.
The messages in question only have required fields.
structderive from a common class). But I cannot share that implementation with you because it is based on my company proprietary C++ framework. - prapin