Hi,
Can anyone show me how to create a full protobuf object that I could write
in a file. For example Protobuf and Syntax and message objects:
ProtobufFactory factory = ProtobufFactoryImpl.init();
ProtobufPackage protoPackage = ProtobufPackageImpl.init();
Protobuf proto = factory.createProtobuf();
Syntax syntax = factory.createSyntax();
syntax.setName(Syntaxes.PROTO2.toString());
proto.setSyntax(syntax);
I would like to get an object like in the file:
////////////////////////////
*syntax = "proto2";*
*message user {*
* required string name = 1;*
* required string surname = 2;*
*}*
*message exampleStructWithInt {*
* required fixed32 val1 = 1;*
* required fixed32 val2 = 2;*
* required sint32 val3 = 3;*
* required user person = 7;*
* required sfixed64 val4 = 4;*
* required sint64 val5 = 5;*
* required uint32 val6 = 6;*
*}*
////////////////////////////
--
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.