[protobuf] [ Question ] Protocol Buffers Maven Plugin

2009-12-01 Thread Borys Marcelo
Hi, Folks. We are just wondering if is there a Protocol Buffers Maven Plugin in a Maven repository elsethere where we can point our pom to so we don't need to compile the Brach code fron Protocol Buffers SVN? If a .jar exists please also let us know as it can be very trick to compile the Maven Plu

[protobuf] Why do I see “cannot import name descri ptor_pb2” error?

2009-12-01 Thread Nick Bolton
Hi all, I'm having some trouble using our generated Python class... I posted my question on SO: http://stackoverflow.com/questions/1828379/why-do-i-see-cannot-import-name-descriptorpb2-error-when-using-google-protocol Nick -- You received this message because you are subscribed to the Google G

[protobuf] generic message editor? parse .proto files?

2009-12-01 Thread David McClurg
I'm trying to rebuild a message editor for a game engine using protocol buffers. Currently we are using an XML template to describe the message type and XML to store the message. I like the protocol buffer language ( .proto files ) as well as the memory and performance advantages over XML. The t

Re: [protobuf] generic message editor? parse .proto files?

2009-12-01 Thread Peter Keen
Is there a reason why you can't compile the message types into the message editor? It seems like they're pretty intimately tied together as it is. --Pete On Tue, Dec 1, 2009 at 10:27 AM, David McClurg wrote: > I'm trying to rebuild a message editor for a game engine using > protocol buffers.  Cu

Re: [protobuf] generic message editor? parse .proto files?

2009-12-01 Thread Peter Keen
Oh, that was just curiosity by the way. The real answer (in c++) is to look at DescriptorPool, DescriptorDatabase, and DynamicMessage. I started going down this path yesterday but it was taking too long to figure out how it all goes together so I just wrote a quick and dirty tool and compiled the m

Re: [protobuf] generic message editor? parse .proto files?

2009-12-01 Thread David McClurg
That's true. Adding a new type is like adding a new game feature. Requiring a tool update for content people (non-programmers) might be acceptable. I just thought that with reflection and the compiler parser, it would be a snap. Thanks, David On Tue, Dec 1, 2009 at 12:13 PM, Peter Keen wrote:

Re: [protobuf] generic message editor? parse .proto files?

2009-12-01 Thread Kenton Varda
To parse protos at runtime you will either need to use C++, or you will need to invoke protoc as a subprocess and have it output a FileDecsriptorSet which you can use in Java or other languages. I'll assume C++. Be sure to get familiar with the API documentation here: http://code.google.com/apis

Re: [protobuf] Why do I see “cannot import name de scriptor_pb2” error?

2009-12-01 Thread Kenton Varda
As I posed there, you have to actually install the protobuf library as directed in the readme. Part of the installation process is building descriptor_pb2.py. On Tue, Dec 1, 2009 at 11:39 AM, Nick Bolton wrote: > Hi all, > > I'm having some trouble using our generated Python class... I posted >

Re: [protobuf] [ Question ] Protocol Buffers Maven Plugin

2009-12-01 Thread Kenton Varda
[+gak] On Tue, Dec 1, 2009 at 1:37 AM, Borys Marcelo wrote: > Hi, Folks. > > We are just wondering if is there a Protocol Buffers Maven Plugin in a > Maven repository elsethere where we can point our pom to so we don't > need to compile the Brach code fron Protocol Buffers SVN? If a .jar > exists

Re: [protobuf] generic message editor? parse .proto files?

2009-12-01 Thread David McClurg
Thanks! Any chance for a C++ code snippet? Even an un-tested one would get me going in the right direction. On Tue, Dec 1, 2009 at 1:34 PM, Kenton Varda wrote: > To parse protos at runtime you will either need to use C++, or you will > need to invoke protoc as a subprocess and have it output a

Re: [protobuf] generic message editor? parse .proto files?

2009-12-01 Thread Kenton Varda
using google::protobuf; class MyErrorCollector : public protobuf::compiler::MultiFileErrorCollector { // Implementation of MultiFileErrorCollector interface. // Should probably just print errors to stderr. }; // Set up the importer. protobuf::compiler::DiskSourceTree source_tree; source_tree.

Re: [protobuf] [ Question ] Protocol Buffers Maven Plugin

2009-12-01 Thread Kenton Varda
You can feel free to move the "tools" directory from the branch into the trunk at any time, since its presence won't affect anything else. Any changes outside "tools" (e.g. to make the tools directory be include in the dist) I would like to review carefully, but should be simple. Is there someone