I have protobuf:
message Msg
{
oneof type {
   Msg1 msg1 = 1;
   Msg2 msg2 = 2;
   Msg3 msg3 = 3;
....
}
};

Is it possible to fill Msg with protobuf::Message from one of msgs?
Like:

msg1 m1;
//fill m1;
f(&m1);

msg2 m2;
//fill m2;
f(&m2);
...

void f(google::protobuf::Message *m)
{
Msg mainMessage;
// fill mainMessage with data from m correctly? <---
}

I tried CopyFrom but it doesn't work in this case.

Thank you.


-- 
You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/protobuf/1d5bd684-ee18-47d2-bb7a-7f738eaf3d76n%40googlegroups.com.

Reply via email to