[protobuf] protobuffer suport composite object in stack not in heap?

2010-12-29 Thread aristohuang
eg. message A { string a; when set_a(), memory of a in heap(new/malloc) int b; when set_b(), memory of b in stack }; if defines many composite sub-class objects, a lot of time cost in new/ malloc. are you think so? or have a good idear for this? -- You received this message because you a

[protobuf] Re: Transfer protocol buffer object to POJO java object

2010-12-29 Thread users ....
One other thing to consider (if performance is not an issue) is to extend Smooks (www.smooks.org). I have been considering this my self although currently I do not have enough of a need to write this yet. Basically you would write the Smooks "cartridge" to read a PB. You can throw SAX events in co

Re: [protobuf] Re: Transfer protocol buffer object to POJO java object

2010-12-29 Thread Kenton Varda
No, the camel-case name is not stored anywhere. You will need to construct it yourself. If performance is a concern, just cache the results in a Map. On Wed, Dec 29, 2010 at 8:11 AM, Sean Nguyen wrote: > I am writing a utility base on your suggestion and I run into a > problem of getting a cam

Re: [protobuf] Does PrococolBuf support the buffer function when try to read the information from the inputstream?

2010-12-29 Thread Evan Jones
On Dec 27, 2010, at 4:43 , 飞 杨 wrote: Does PrococolBuf support the above buffer function? if does, what the code would be like... I think what you are asking is to have a streaming protocol, where one connection or file contains multiple protocol buffers? http://code.google.com/apis/protoc

[protobuf] Re: Transfer protocol buffer object to POJO java object

2010-12-29 Thread Sean Nguyen
I am writing a utility base on your suggestion and I run into a problem of getting a camel name out of a FieldDescriptor. My proto message is like this: message Person { optional string last_name = 1; optional string first_name = 2; } When java object is generated it uses camel field name as