Re: [protobuf] can protobuf3 be used with protobuf2?

2016-05-19 Thread Jeremy Ong
The handling of unknown fields is precisely where the difference lies and sticking to proto2 is indeed the plan. However, because you have many clients forced to stick with proto2, you inevitably bifurcate the users, and implementations are now forced to support two standards. Proto3 was designed

Re: [protobuf] can protobuf3 be used with protobuf2?

2016-05-19 Thread Tim Kientzle
> On May 18, 2016, at 10:01 PM, Jeremy Ong wrote: > > Why does adding JSON require dropping unknown fields? So long as fields are > keyed to field number, I don't see why the JSON encoding requires special > treatment with respect to the binary one. JSON fields aren’t

Re: [protobuf] template/type deduction and 'oneof' in message

2016-05-19 Thread 'Adam Cozzette' via Protocol Buffers
I don't think this kind of type deduction is possible here, because the type of the oneof can't be known until runtime and so the compiler has no way of knowing which function to select. Alex, I believe the convert example at the top of your link works but only because the caller explicitly

Re: [protobuf] template/type deduction and 'oneof' in message

2016-05-19 Thread Alex Shaver
So, the cpprefernce page on template type deduction seemingly suggests you can: http://en.cppreference.com/w/cpp/language/template_argument_deduction On Thu, May 19, 2016, 6:09 PM Feng Xiao wrote: > > > On Thu, May 19, 2016 at 10:31 AM, Alex Shaver >

Re: [protobuf] template/type deduction and 'oneof' in message

2016-05-19 Thread 'Feng Xiao' via Protocol Buffers
On Thu, May 19, 2016 at 10:31 AM, Alex Shaver wrote: > Suppose I have a message: > message Foo{ > oneof b_message { > Bar = 16; > Baz = 17; > } > } > > and I have some C++ handler that is a templated function: > template > void b_handler(const T&); > template

[protobuf] Can i use Protocol Buffers and zeroMQ to be able to replace CORBA in a distributed Application

2016-05-19 Thread Yogesh Fulsunge
Hello, I am working on a Distributed Application involving Large data to be transferred around 15 MB from Java Application to C++ Application. They are using CORBA as middleware but it has performance issues. can I use combination of protocol buffers and zeroMQ for the Replacement of CORBA??

[protobuf] Build 3.0.0-beta-3 sources on AIX 6.1

2016-05-19 Thread Pankaj
I tried building 3.0.0-beta-3 sources on AIX 6.1 with CXX=xlc++ and CXXFLAG=-qtls, I am getting plenty of compiler errors. Compiler version is (output of xlc++ -qversion) IBM XL C/C++ for AIX, V13.1 (5725-C72, 5765-J07) Version: 13.01.. Did anyone successfully build this protobuf version

[protobuf] template/type deduction and 'oneof' in message

2016-05-19 Thread Alex Shaver
Suppose I have a message: message Foo{ oneof b_message { Bar = 16; Baz = 17; } } and I have some C++ handler that is a templated function: template void b_handler(const T&); template void b_handler(const Bar& bar){...} template void b_handler(const Baz& baz){...} What I'd like to

[protobuf] Re: How do I iterate over fields by string field names?

2016-05-19 Thread Jeffrey Getzin
Maybe using the Closure Library's goog.object.getKeys()? http://google.github.io/closure-library/api/namespace_goog_object.html On Thursday, May 19, 2016 at 2:39:14 AM UTC-4, Yan Yan wrote: > > foo.bar1 = 1 > foo.bar2 = 2 > foo.bar3 = 3 > foo["bar1"] = 1 > foo["bar2"] = 2 > foo["bar3"] = 3 >

[protobuf] Unresolved import google.protobuf.text_format as text_format

2016-05-19 Thread Yan Yan
My eclipse has resolved pymongo successfully but not protobuf. What should I change in configurations? Thx.

[protobuf] How do I iterate over fields by string field names?

2016-05-19 Thread Yan Yan
foo.bar1 = 1 foo.bar2 = 2 foo.bar3 = 3 foo["bar1"] = 1 foo["bar2"] = 2 foo["bar3"] = 3 Doing this 20 times is kinda clumsy. And __dict__ doesnt work. -- You received this message because you are subscribed to the Google Groups "Protocol Buffers" group. To unsubscribe from this group and stop