Check out the docs:
http://code.google.com/apis/protocolbuffers/docs/techniques.html#union

On Fri, May 14, 2010 at 12:45 PM, Vince <vincedup...@gmail.com> wrote:

> Hi,
>
> If I want to serialize many message in the same pipe,
> do I need one "master" message that includes all the others in
> optional
> and have a kind of messageType field in it to know which kind a
> message is inside?
>
> Like this,
>
> message A1 {...}
> message A2 {...}
>
> message master
> {
> enum type {...}
>
> required type t = 1;
> optional A1 a1 = 2;
> optional A2 a2 = 3;
> }
>
> Thanks,
> Vince
>
> --
> You received this message because you are subscribed to the Google Groups
> "Protocol Buffers" group.
> To post to this group, send email to proto...@googlegroups.com.
> To unsubscribe from this group, send email to
> protobuf+unsubscr...@googlegroups.com<protobuf%2bunsubscr...@googlegroups.com>
> .
> For more options, visit this group at
> http://groups.google.com/group/protobuf?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To post to this group, send email to proto...@googlegroups.com.
To unsubscribe from this group, send email to 
protobuf+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/protobuf?hl=en.

Reply via email to