[protobuf] Conversion from protobuf-c object to Protobuf C++ message

2019-07-11 Thread Kiran Kumar
I have written a C++ class for comparing two Google Protocol Buffer messages. It takes two GPB objects and returns whether the two GPB messages are exactly same or not. This class also has another API which returns even the attributes that got modified between the two messages. The C++ API (s

Re: [protobuf] has() methods in Java

2019-07-11 Thread Ilia Mirkin
These are gone in proto3. The has* stuff is available with proto2. On Thu, Jul 11, 2019 at 4:54 PM Janac Meena wrote: > > Hello, > > I see in the documentation that there is a way to check for the existence of > a field in a message, i.e. > > message Foo { > string name = 1; > } > > In my Java

[protobuf] has() methods in Java

2019-07-11 Thread Janac Meena
Hello, I see in the documentation that there is a way to check for the existence of a field in a message, i.e. message Foo { string name = 1; } In my Java code, I was hoping to do // Assuming object "foo" has been initialized if (foo.hasName()) { // do stuff } But I am unable to find the

[protobuf] Re: Linking error with protobuf 2.6.1 while building ignition-messages0 on ubuntu 16.04

2019-07-11 Thread rishabh lal
Solved this by linking with protobuf 3.7, just linked in cmakelists.txt , Generator.cc with "protobuf::libprotoc protobuf::libprotobuf". On Tuesday, July 9, 2019 at 2:15:37 PM UTC+5:30, rishabh lal wrote: > > I am trying to build ign-msgs (version 0) from source which is a > dependency for ignit

Re: [protobuf] Modify the payload of a dynamic generated message

2019-07-11 Thread Mihai Muraru
Hi all. Problem solved. I have used Reflection->GetMutableMessage(_modified_msg, field_descriptor, index) to get a not const message which then I've passed it to the recursive function ParseProtobufMessage(_proto_msg.get(), _modified_msg, _proto_msg-> GetTypeName()); Thanks! On Wednesday, Jul

Re: [protobuf] protobuf encoding with FIX prtocol

2019-07-11 Thread Marc Gravell
That definition is simply adding metadata to the field definitions; they won't directly impact protobuf if you're using the default tools, but if you're using custom tools, or a layer on top of protobuf that knows how to inspect metadata, it can do additional things with the information. The metada

[protobuf] protobuf encoding with FIX prtocol

2019-07-11 Thread abdelrahman hamdy
can anyone help me understanding this block of code and haw file have this value in the same line, example in FIX protocol tage = value so deliver companyID tage=value is 128 = IBM for example. i need help please . string deliver_to_comp_id = 3 [(fix.tag)=128, (fix.type)= DATATYPE_STRING,