[protobuf] Add code generator plugin helpers (issue912042)

2010-04-14 Thread t . broyer
Reviewers: kenton, Description: In C++, writing a code generator plugin is as easy as implementing CodeGenerator and passing an instance to google::protobuf::compiler::PluginMain; it shouldn't be any harder in Java (or Python BTW). This patch adds a JavaHelpers class which is just a port of

[protobuf] Importing one proto file in another

2010-04-14 Thread DK
Hi, I have a proto file (first.proto) in folder abc and package abc. I need to create a new proto file (second.proto) in another folder xyz and new package, which needs to include first.proto I have tried import abc/fist.proto == Doesn't work. Proto Compiler errors import ../sbc/first.proto ==

Re: [protobuf] Importing one proto file in another

2010-04-14 Thread Jason Hsueh
When you invoke the proto compiler are you passing a value for -I (the import path) such that abc/first.proto can be found? It defaults to the current working directory. On Wed, Apr 14, 2010 at 9:20 AM, DK deepakkumar.si...@gmail.com wrote: Hi, I have a proto file (first.proto) in folder abc

Re: [protobuf] Importing one proto file in another

2010-04-14 Thread Deepak Kumar Singh
Yes. I had wrong -I flag. Thanks much. On Wed, Apr 14, 2010 at 11:54 AM, Jason Hsueh jas...@google.com wrote: When you invoke the proto compiler are you passing a value for -I (the import path) such that abc/first.proto can be found? It defaults to the current working directory. On Wed,

[protobuf] RepeatedPtrFieldstd::string::iterator ?

2010-04-14 Thread Andrew Kimpton
Do I have a typo (or some other misunderstanding) or is there no support for iterators with RepeatedPtrFields ? Iterators are only available in RepeatedFields ? google::protobuf::RepeatedPtrFieldstd::string::iterator it = message-locations().begin() Gave me a compilation error that there was no

Re: [protobuf] RepeatedPtrFieldstd::string::iterator ?

2010-04-14 Thread Jason Hsueh
On Wed, Apr 14, 2010 at 1:15 PM, Andrew Kimpton awkimp...@gmail.com wrote: Do I have a typo (or some other misunderstanding) or is there no support for iterators with RepeatedPtrFields ? Iterators are only available in RepeatedFields ? google::protobuf::RepeatedPtrFieldstd::string::iterator

Re: [protobuf] RepeatedPtrFieldstd::string::iterator ?

2010-04-14 Thread Andrew Kimpton
On Wed, Apr 14, 2010 at 4:19 PM, Jason Hsueh jas...@google.com wrote: On Wed, Apr 14, 2010 at 1:15 PM, Andrew Kimpton awkimp...@gmail.comwrote: Do I have a typo (or some other misunderstanding) or is there no support for iterators with RepeatedPtrFields ? Iterators are only available in

[protobuf] Re: compile issue with import statements having path info

2010-04-14 Thread CB
I understand your explanation, and have changed my automake to; $(PROTOC) --cpp_out=$(top_srcdir) -I$(top_srcdir) $(PROTOC_FLAGS) $ which seems to handle it. However, there is still one point we're not connecting on, which is this. It seems that when a.proto compiles, the name for