[protobuf] Generic parsing class

2010-06-15 Thread Miguel Muñoz
Comrades, I have a class I'd like to submit to the protocol buffer code base. It's a class called GeneratedMessageParser, and it parses messages from generic parameters. Here's why: I have a glass called MessageTranceiverM extends Message. This class needs to call the parseFrom() method of

Re: [protobuf] Generic parsing class

2010-06-15 Thread Miguel Muñoz
:50 PM, Kenton Varda wrote: Try this: M prototype = M.getDefaultInstance(); // later on M instance = prototype.newBuilderForType().mergeFrom(data).build(); On Tue, Jun 15, 2010 at 1:30 PM, Miguel Muñoz swingguy1...@yahoo.com wrote: Comrades, I have a class I'd like to submit

[protobuf] hasXxx methods

2010-06-22 Thread Miguel Muñoz
where the methods will return false. -- Miguel Muñoz --- Miguel Muñoz swingguy1...@yahoo.com 323/225-7285 --- The Sun, with all those planets revolving around it and dependent on it, can still ripen a vine of grapes

[protobuf] Re: Serializing Dictionarystring,object

2011-01-31 Thread Miguel Muñoz
The way we serialize a mapString, String is this: 1) We define a MappedPair message like this: message MappedPair { string key=1; string value=2; } 2) Then we define a MappedPairList message, that's just a repeated MappedPair. 3) Then we iterate through our MapString, String to convert it to

[protobuf] Re: Serialization of primitive types

2011-06-16 Thread Miguel Muñoz
protobuf objects behind a facade, so I don't need to know the serialization details. -- Miguel Muñoz On Jun 15, 7:07 am, gabor.dicso gabor.di...@gmail.com wrote: Hi all, I would like to be able to serialize primitive types platform- independently. I have hand-written Java data classes and I want