[protobuf] accessor method for message type

2013-04-22 Thread Oliver Wang
hello, I am new to protocol buffer and try to follow through the following example that can encode different message type: message OneMessage { enum Type { FOO = 1; BAR = 2; BAZ = 3; } // Identifies which field is filled in. required Type type = 1; // One of the following will be

[protobuf] is protobuf the right choice in this case?

2013-04-22 Thread balche8
Hi all, I'm working on a project that involves two layers: one is written in C++ and the other one in Javascript. The C++ layer contains the model of the application in form of a tree in a similar way as HTML does (nothing really complicated, just elements with attributes). The interaction

[protobuf] Re: how to calculate protocol buffer message size without parsing the full message?

2013-04-22 Thread Oliver Wang
Can't you use ByteSize() method to get the size? Oliver On Sunday, April 21, 2013 12:07:57 AM UTC-4, Sean Nguyen wrote: Hi, I want to calculate the protocol buffer message size without reading the stream to the end? I don't see the size of the outer most message is stored. For example:

Re: [protobuf] accessor method for message type

2013-04-22 Thread Oliver Jowett
On Sat, Apr 20, 2013 at 4:38 PM, Oliver Wang python...@gmail.com wrote: So the from generated code, I would expect an access method such as set_foo() set_bar and set_baz() so that I can connect Foo object to the message. But I don't see it at all, there are methods such as has_foo()

Re: [protobuf] Re: how to calculate protocol buffer message size without parsing the full message?

2013-04-22 Thread Oliver Jowett
On Sun, Apr 21, 2013 at 9:48 PM, Oliver Wang python...@gmail.com wrote: Can't you use ByteSize() method to get the size? Not when you're parsing - you don't have a message instance yet! Oliver -- You received this message because you are subscribed to the Google Groups Protocol Buffers

Re: [protobuf] is protobuf the right choice in this case?

2013-04-22 Thread Michael Haberler
Am 20.04.2013 um 14:17 schrieb balche8 anibal.cheha...@gmail.com: Hi all, I'm working on a project that involves two layers: one is written in C++ and the other one in Javascript. The C++ layer contains the model of the application in form of a tree in a similar way as HTML does

[protobuf] new code generator: protobuf-nginx

2013-04-22 Thread dave
Hi, I've written a Google Protocol Buffers code generator for nginx module developers interested in using protobuf messages within nginx natively. The project is on Github here: https://github.com/dbcode/protobuf-nginx/ Please let me know if you can add it to the Third Party Add-Ons wiki

Re: [protobuf] new code generator: protobuf-nginx

2013-04-22 Thread Feng Xiao
What's special for nginx? Can this code generator be used for not-nginx-releated projects? On Mon, Apr 22, 2013 at 9:27 AM, d...@daveb.net wrote: Hi, I've written a Google Protocol Buffers code generator for nginx module developers interested in using protobuf messages within nginx natively.

Re: [protobuf] new code generator: protobuf-nginx

2013-04-22 Thread Dave Bailey
The generated code relies on nginx-specific types such as its typedefs for strings, arrays, and rbtrees, and also its memory pools and so on. The generated code is meant to be compiled into the nginx binary, which is currently the way all module development is done with nginx. -dave On Apr

Re: [protobuf] new code generator: protobuf-nginx

2013-04-22 Thread Feng Xiao
I think it's better to list it in the other utilities section as it's not a general C solution but specified for nginx. Does this sound good to you? I'll add it to the wiki page if you are ok with it. On Mon, Apr 22, 2013 at 11:28 AM, Dave Bailey d...@daveb.net wrote: The generated code relies

Re: [protobuf] new code generator: protobuf-nginx

2013-04-22 Thread Dave Bailey
Thank you, that sounds good to me. -dave On Apr 22, 2013, at 11:36, Feng Xiao xiaof...@google.com wrote: I think it's better to list it in the other utilities section as it's not a general C solution but specified for nginx. Does this sound good to you? I'll add it to the wiki page if you

[protobuf] Re: Python3 Protobufs

2013-04-22 Thread Dale Peterson
Charles, Thanks for taking the time to do this! Is it possible to make your github repo be based off of the latest svn checkout of GPB? I have used the instructions here [0] to do this for other projects where I wanted to use git but the official code was managed with svn (as in this case).

[protobuf] 2.5.0 C++ performance summary

2013-04-22 Thread Stephen Townsend
Apologies if this is an FAQ but I see the release notes state C++ optimizations were made, is there a list of those changes anywhere please? is this the atomic opt stuff only? What's the expected (ballpark) improvement over 2.4.x? Thank in advance. -- You received this message because

Re: [protobuf] 2.5.0 C++ performance summary

2013-04-22 Thread Feng Xiao
On Mon, Apr 22, 2013 at 2:27 PM, Stephen Townsend stevetownse...@gmail.comwrote: Apologies if this is an FAQ but I see the release notes state C++ optimizations were made, is there a list of those changes anywhere please? is this the atomic opt stuff only? What's the expected (ballpark)