semlanik / qtprotobuf

Protobuf generator and bindings for Qt framework
https://semlanik.github.io/qtprotobuf
MIT License
169 stars 38 forks source link

Support enum field for Oneof #257

Open tnodir opened 2 years ago

tnodir commented 2 years ago

Problem description Generator doesn't create enum for Oneof cases.

Suggestion/solution Generator should create enum field for Oneof cases. And (de)serializer should fill the field.

Additional context See the docs, how standard CPP generator supports it.

Eijebong commented 2 years ago

Am I reading correctly in that there currently no way of knowing which variant of a oneof is populated?