Re: [protobuf] inheritance.. well sort of... and FieldDescriptors

2011-01-28 Thread TJ Rothwell
Is there a best practice for this use case? Here are some options. // Duplicate every field (sounds like you're doing this) message FooRequest { required string prompt = 1; required int64 timeout = 2; required Foo foo = 3; } message BarRequest { required string prompt = 1; required int

[protobuf] inheritance.. well sort of... and FieldDescriptors

2011-01-28 Thread koert
i have several proto message definitions that all share the first 4 fields. its as if they are all subclasses of one protobuf message format. in java can i create the FieldDescriptors for these 4 fields once and use them for the getters and setters of all these message classes? it would save me a l