Thank you for your advice. I’m implementing a component model that has a different type-system than protocol buffer. For the connectors that are IPC or inter technology I would like to base the serialization on protocol buffers. There is always an option based on the IDL definition I to generate specific protocol buffer messages that represent the exact argument list per method, but this looks over kill for me.
Thank you again, George On Nov 16, 12:28 pm, Henner Zeller <[email protected]> wrote: > You might want to look into extensions that allow to do this in a > typesafe manner. > http://code.google.com/apis/protocolbuffers/docs/proto.html#extensions > > Whenever something is considered to be transferred in a 'generic' way, > this is often a design-smell alarm. What is what you attempt to do ? > > > > On Tue, Nov 16, 2010 at 09:54, George <[email protected]> wrote: > > Hi, > > > I would like to create a protocol buffer message that accepts a > > variety of different arguments (including other messages). I can see > > two obvious ways to do that: > > > message ArgInt32 { > > required int32 arg = 1; > > } > > message ArgInt64 { > > required int64 arg = 1; > > } > > //... > > message ArgMessage { > > required bytes arg = 1; > > } > > > message Arguments { > > repeated bytes argument = 1; > > } > > > Where argument is serialized one of the predifined argument messages. > > > Or > > > message Arguments { > > repeated int32 arg_int32 = 1; > > repeated int64 arg_int64 = 2; > > //... > > repeated bytes arg_bytes = 100; > > } > > > Is there better way to do that? If not based on your experience which > > you will prefer? > > > Thanks, > > George > > > -- > > You received this message because you are subscribed to the Google Groups > > "Protocol Buffers" group. > > To post to this group, send email to [email protected]. > > To unsubscribe from this group, send email to > > [email protected]. > > For more options, visit this group > > athttp://groups.google.com/group/protobuf?hl=en.- Hide quoted text - > > - Show quoted text - -- You received this message because you are subscribed to the Google Groups "Protocol Buffers" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/protobuf?hl=en.
