Hi folks,

given the simple example:

-----------

package Blah.Messages
message IFoo {
  enum Type {
    BAR=0;
    BAZ=1;
  }
  optional Type type = 1 [default = BAR];
}

---------

class Foo {
private:
  Blah::Messages::IFoo my_msg_impl;

public:
  typedef Blah::Messages::IFoo::Type Type;

  void someMethod(int value, Type op);
};

---------


Given the approach above it unfortunately requires a user of Foo to reach 
into IFoo in order to provide an appropriate value, or they have to do 
something like: Foo::Type::Foo_Type_BAR.

If I want something thats not completely crazy do I have to essentially 
manually sync a Type enum in Foo with the IFoo enum definition and cast 
whenever I need to get or set the value on the message class?

Cheers,
Chip

-- 
You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/protobuf/-/kjQ0Sw8tajsJ.
To post to this group, send email to protobuf@googlegroups.com.
To unsubscribe from this group, send email to 
protobuf+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/protobuf?hl=en.

Reply via email to