[protobuf] Re: Using the assignment operator in C++

2011-07-22 Thread JonnyDee
Thank you very much for your fast response :) Best regards, Jonny On Jul 22, 8:04 pm, Jason Hsueh wrote: > The assignment operator simply wraps CopyFrom, so the behavior is exactly > the same. Stylistically we prefer to use CopyFrom over =, because it can be > an expensive operation and = makes

Re: [protobuf] Java - DynamicMessage and FileDescriptorProto

2011-07-22 Thread Pherl Liu
Take a look at com.google.protobuf.Descriptors and com.google.protobuf.DynamicMessage On Mon, Jul 18, 2011 at 8:20 AM, yoave wrote: > Hi all, > > I've got 2 questions: > > 1. how do I generate a Descriptor from a FileDescriptorProto in Java? > In cpp, I'm using DescriptorPool class's 'BuildFil

[protobuf] Issue 316 in protobuf: TextFormat should have an option to ignore unknown fields

2011-07-22 Thread protobuf
Status: New Owner: liuj...@google.com Labels: Type-Defect Priority-Medium New issue 316 by sathy...@gmail.com: TextFormat should have an option to ignore unknown fields http://code.google.com/p/protobuf/issues/detail?id=316 [Same as issue 229 - http://code.google.com/p/protobuf/issues/detail?

Re: [protobuf] Re: New types?

2011-07-22 Thread Jason Hsueh
Apologies for the delay. I don't, but the basic sketch would be: - define a custom option by extending google.protobuf.FieldOptions - Implement a code generator that opens the files generated by the main generators - Modify your build system to execute protoc with both the language specific target

Re: [protobuf] Using the assignment operator in C++

2011-07-22 Thread Jason Hsueh
The assignment operator simply wraps CopyFrom, so the behavior is exactly the same. Stylistically we prefer to use CopyFrom over =, because it can be an expensive operation and = makes it look deceptively simple. The operator= overload primarily exists for compatibility with STL, but of course you'