[protobuf] Set field onof type message using reflection in protobuf

2019-06-22 Thread Gaurav Bhosale
I am trying to set field of protobuf message. My proto message look like, package message; message Packet { required int32 header = 1; oneof payload { Home home = 2; Door door = 3; } } message Home { required int32 id = 1; } message Door { required int32

[protobuf] Protobuf3 shared library crash exe

2019-11-08 Thread Gaurav Bhosale
I am creating exe with protobuf3 shared library. I am getting this error at runtime. Libprotobuf Fatal ../src/../descriptor.cc:1358 check failed: generateddatabase()->Add(encoded) Anyone aware of this issue? Can you suggest me steps to handle this? -- You received this message because you

[protobuf] Set all fields of nested message in protobuf c++

2019-10-16 Thread Gaurav Bhosale
I have proto file ( target for C++ ) message Test1 { message Test2 { required double x = 1; } required double y = 1; } I want initialize Test1 message without using mutable_ Or Without using set fields function in C++ Means, is it possible that, Test1 test_message;

Re: [protobuf] Set all fields of nested message in protobuf c++

2019-10-16 Thread Gaurav Bhosale
Yes. I an able to do that with reflection but I want to initialize all fields to zero without reflection. Is that possible? So idea is to access all fields if Test1 message. Currently, when I do Test1 test_message; test_message = new Test1(); I am not able to access its fields x and so on. I

Re: [protobuf] Set all fields of nested message in protobuf c++

2019-10-16 Thread Gaurav Bhosale
Okay. Thanks for your feedback. -- You received this message because you are subscribed to the Google Groups "Protocol Buffers" group. To unsubscribe from this group and stop receiving emails from it, send an email to protobuf+unsubscr...@googlegroups.com. To view this discussion on the web