[protobuf] Re: How to use Protobuf with existing ORM(torque)?

2009-11-10 Thread Sankaravadivel S
Thanks. That worked me. On Tue, Nov 10, 2009 at 8:21 AM, Kenton Varda wrote: > Add this to your .proto file: > > option java_multiple_files = true; > > Note that the outer class is still generated, it just doesn't contain the > other classes. You can still change the outer class name with: >

[protobuf] how to resize a repeated field

2009-11-10 Thread Romain François
Hello, For example if I have a repeated int32 field that currently contains 10 elements, and I want to modify the field to only contain 3 elements. Is there a way to achieve this using the methods of the Reflection class, or do I have to first ClearField, and then call AddInt32 three times ?

[protobuf] Re: how to resize a repeated field

2009-11-10 Thread Romain François
On 11/10/2009 11:04 AM, Romain François wrote: > > Hello, > > For example if I have a repeated int32 field that currently contains 10 > elements, and I want to modify the field to only contain 3 elements. > > Is there a way to achieve this using the methods of the Reflection > class, or do I have

[protobuf] Retrieving data with field number and wire type

2009-11-10 Thread rahul prasad
Hi, Is there a facility in protobuf library to retrieve data if the field numbers and wire types are known? If so how to go about this? Regards, Rahul --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Protocol Buffer

[protobuf] Re: Retrieving data with field number and wire type

2009-11-10 Thread Evan Jones
On Nov 10, 2009, at 9:25 , rahul prasad wrote: > Is there a facility in protobuf library to retrieve data if the > field numbers and wire types are known? If so how to go about this? If you don't want to use the generated code that handles this for you for some reason, you want to look at Cod

[protobuf] Difference between protobuf implementations

2009-11-10 Thread rahul prasad
Hi, May i ask whats the difference between these two protobuf implementations? com.google.common.io.protocol.ProtoBuf.java com.google.protobuf package classes and when to use which? Regards, Rahul --~--~-~--~~~---~--~~ You received this message because you are

[protobuf] Re: [Debian] Compilation problem

2009-11-10 Thread Evan Jones
Visionweb wrote: > Hello, > > I have a programm test that I can't compile under Debian, with g++. > The same programm is runing with my Ubuntu, and eclipse. Now, I try to > compile it under Debian, with g++ (command line). But I have this > error: > > g++ -o udp_client udp_client.cpp > /tmp/ccaU

[protobuf] [Debian] Compilation problem

2009-11-10 Thread Visionweb
Hello, I have a programm test that I can't compile under Debian, with g++. The same programm is runing with my Ubuntu, and eclipse. Now, I try to compile it under Debian, with g++ (command line). But I have this error: g++ -o udp_client udp_client.cpp /tmp/ccaUFigk.o: In function `main': udp_cli

[protobuf] Re: Difference between protobuf implementations

2009-11-10 Thread Kenton Varda
On Tue, Nov 10, 2009 at 7:28 AM, rahul prasad wrote: > Hi, > > May i ask whats the difference between these two protobuf implementations? > > com.google.common.io.protocol.ProtoBuf.java > I've never heard of this. Where does it come from? > com.google.protobuf package classes > This is the o

[protobuf] Re: Retrieving data with field number and wire type

2009-11-10 Thread Kenton Varda
On Tue, Nov 10, 2009 at 6:25 AM, rahul prasad wrote: > Hi, > > Is there a facility in protobuf library to retrieve data if the field > numbers and wire types are known? > Write a .proto file with that information. Then you can compile it, or you can use protoc's --decode flag. If you need some

[protobuf] Regd: How do I represent java.util.Date in my .proto definition?

2009-11-10 Thread rahul prasad
How do I represent java.util.Date in my .proto definition? Is this supported, or any other workaround for doing this? Regards, Rahul Prasad --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Protocol Buffers" group. To

[protobuf] Re: Difference between protobuf implementations

2009-11-10 Thread rahul prasad
So, If I am developing for Android, should I use this protobuf library instead of the standard implementation present at com.google.protobuf? Will I encounter any problems mid way due to this switch? Any feedback would be greatly appreciated. Regards, Rahul On Tue, Nov 10, 2009 at 3:56 PM, Henne

[protobuf] Re: Difference between protobuf implementations

2009-11-10 Thread Kenton Varda
You'd have to ask the Android people, as they are the owners of this alternate implementation. IIRC, they have not released the code generator program to go with it, so you probably won't be able to use it. The official protobuf implementation in "lite mode" should work great on Android -- this i

[protobuf] Re: Difference between protobuf implementations

2009-11-10 Thread rahul prasad
I am in a situation, where the .proto files are not present for the Protocol Buffers used in the application I am working on. Since the .proto files need to be created, I was wondering if the following yellow highlighted numbers should correspond to the same fields they stood for in the actual .pro

[protobuf] Re: Difference between protobuf implementations

2009-11-10 Thread Kenton Varda
Yes, the tag numbers have to be the same. If you have code that was generated from the original .proto file, look inside it for comments that look like proto field definitions -- they should include the tag number. Otherwise you're out of luck. On Tue, Nov 10, 2009 at 4:00 PM, rahul prasad wrot

[protobuf] Re: Regd: How do I represent java.util.Date in my .proto definition?

2009-11-10 Thread Dan
I use a dateFormatter to send it as a string. I suppose its also possible to send it as a int64 if you want. Just be wary of timezones. Dan On Nov 10, 3:25 pm, rahul prasad wrote: > How do I represent java.util.Date in my .proto definition? Is this > supported, or any other workaround for doi

[protobuf] Re: Streaming Dynamic Messages

2009-11-10 Thread Dan
Yes! That works, thanks. On Nov 9, 8:37 pm, Kenton Varda wrote: > You want:  com.google.protobuf.Descriptors.FileDescriptor.buildFrom() > > > > On Mon, Nov 9, 2009 at 5:25 PM, Dan wrote: > > > Im trying to write the following client/server exchange using the Java > > Protobuf API: > > > 1) Cl

[protobuf] Re: On SnowLeopard, EXC_CRASH (SIGABRT)

2009-11-10 Thread Ryan Rosario
Hi, I am the fellow that has been dealing with this problem on Snow Leopard. I am left scratching my head as to the cause. I installed VMware in Snow Leopard and loaded Snow Leopard Server onto VMware (not possible to install regular Snow Leopard on it). I wanted to experiment with a clean syste