Hi,
Currently I am writing a convertor from proto format to ttcn3 format.
Messages which I have defined has some custom Field options. How can I
check whether a field has custom options or not.
syntax="proto3";
import "google/protobuf/descriptor.proto"
extend google.protobuf.FieldOptions{
t. The details depend on the language you are using, though.
>
> On Thu, Dec 5, 2019 at 12:26 PM LakshmiKanth Gupta > wrote:
>
>> Hi,
>>
>> Currently I am writing a convertor from proto format to ttcn3 format.
>>
>> Messages which I have defined has some custo
: How do I know the attributes of FieldOptions.
On Friday, December 6, 2019 at 5:01:49 AM UTC+1, LakshmiKanth Gupta wrote:
>
> Yes.I am developing protoc plugin using c++.But I didn't find any function
> to do that. Could somebody help me with that. Also couldn't find the
>
https://github.com/protocolbuffers/protobuf/blob/2220670ed97fb5d52868a0316054748e6354b6aa/src/google/protobuf/descriptor.proto#L509
>>
>> On Fri, Dec 6, 2019 at 5:33 AM LakshmiKanth Gupta > > wrote:
>>
>>> Finally I have figured out whether a field has options or not.
>>>
syntax="proto3";
import "google/protobuf/descriptor.proto"
extend google.protobuf.FieldOptions{
bool presence=50001;
}
message Mymessage
{
int32 foo=1[(presence)=true];
string bar=2;
}
I wrote following code and encoded:
Mymessage l_message;
l_message.set_foo(1);
required"
> in proto2, which doesn't appear to be the case), or b) create a new
> EmployeeDataMinimal message that *doesn't have a salary*, and serialize that
>
> (I can't comment on 2; not a C++ person)
>
> On Mon, 28 Nov 2022 at 08:14, LakshmiKanth Gupta
> wrote:
>
>
Hello All,
message EmployeeData
{
string name =1;
string address = 2;
integer salary =3;
}
1.
When I transmit the EmployeeData., I would like to skip "salary" from
encoding.
Is that possible?
2.
Is it possible to tag a void pointer with employeedata object in c++ code?
Some
message MyRec1
{
int32 a=1;
}
message MyRec
{
MyRec1 rec = 1;
}
auto *rec= google::protobuf::Arena::Create(arena);
rec->mutable_rec()->set_a(100);
mtable_rec() is creating memory using new...Arena which I have used for
creating MyRec is not used.
Please help.
--
You received this