I am new to protocol buffer and try to follow through the following example 
that can encode different message type:

message OneMessage {
  enum Type { FOO = 1; BAR = 2; BAZ = 3; }

  // Identifies which field is filled in.
  required Type type = 1;

  // One of the following will be filled in.
  optional Foo foo = 2;
  optional Bar bar = 3;
  optional Baz baz = 4;

So the from generated code, I would expect an access method such as 
set_foo() set_bar and set_baz() so that I can connect Foo object to the 
message. But I don't see it at all, there are methods such as has_foo() 
has_bar() and has_baz() etc.

What did I miss? 



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 post to this group, send email to protobuf@googlegroups.com.
Visit this group at http://groups.google.com/group/protobuf?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to