objectbox-generator icon indicating copy to clipboard operation
objectbox-generator copied to clipboard

Support enums in .fbs

Open vaind opened this issue 4 years ago • 1 comments

Example FBS that should be supported, with appropriate enum generated in c/c++ code:

enum Flags: uint(bit_flags) {
    FlagA = 0,
    FlagB = 1,
}

table Table {
    id: ulong;
    flags: Flags;
}

vaind avatar Apr 02 '21 18:04 vaind

Something to consider (especially for non bit flags): in C++ most people prefer enum classes.

greenrobot avatar Apr 03 '21 05:04 greenrobot