Re: get all enum fields and their possible values

2009-10-02 Thread Kenton Varda
using google::protobuf::Descriptor; using google::protobuf::FieldDescriptor; using google::protobuf::EnumDescriptor; using google::protobuf::EnumValueDescriptor; const Descriptor* descriptor = message.GetDescriptor();for (int i = 0; i descriptor-field_count(); i++) { const FieldDescriptor*

Re: get all enum fields and their possible values

2009-10-02 Thread Tuppy Hamper
and how would this change if the message contained fields that were repeatable or single messages which contained their own ENUMS. I know I would have to have a branch to the IF statement that if type == MESSAGE, then recurse, but would I have to handle single and repeatble message fields

Re: get all enum fields and their possible values

2009-10-02 Thread Kenton Varda
On Fri, Oct 2, 2009 at 1:07 PM, Tuppy Hamper hamp...@gmail.com wrote: and how would this change if the message contained fields that were repeatable or single messages which contained their own ENUMS. I know I would have to have a branch to the IF statement that if type == MESSAGE, then