1
0
Fork 0
mirror of https://github.com/HenkKalkwater/harbour-sailfin.git synced 2024-11-24 18:15:16 +00:00
harbour-sailfin/core/codegen/enum_header.hbs

31 lines
521 B
Handlebars

class {{className}}Class {
Q_GADGET
public:
enum Value {
EnumNotSet,
{{#each values as |value|}}
{{value}},
{{/each}}
};
Q_ENUM(Value)
private:
explicit {{className}}Class();
};
using {{className}} = {{className}}Class::Value;
} // NS DTO
namespace Support {
using {{className}} = Jellyfin::DTO::{{className}};
template <>
{{className}} fromJsonValue(const QJsonValue &source, convertType<{{className}}>);
template <>
QJsonValue toJsonValue(const {{className}} &source, convertType<{{className}}>);