[protobuf] accessor method for message type

2013-04-22 Thread Oliver Wang
hello, 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

Re: [protobuf] accessor method for message type

2013-04-22 Thread Oliver Jowett
On Sat, Apr 20, 2013 at 4:38 PM, Oliver Wang python...@gmail.com wrote: 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()