Get list of option from enum

30 views
Skip to first unread message

Fabio Ravera

unread,
Jan 9, 2023, 7:34:07 PM1/9/23
to Protocol Buffers
Hi everyone!
I have a message containing an enum and I would like to extract the values in order to provide the user with the list of available options. Is it something that can be done or should I choose another approach?
I am using C++ and protobuf 3

Many thanks in advance!
Cheers,
Fabio

Michael Ngarimu

unread,
Jan 15, 2023, 4:22:19 AM1/15/23
to Protocol Buffers
You should be able to get these values from the EnumDescriptor::value() method.

Reply all
Reply to author
Forward
0 new messages