2021-03-19 22:01:29 +00:00
|
|
|
{{#each userImports as |userClass|}}
|
|
|
|
{{#if userClass != className}}
|
|
|
|
class {{className}};
|
|
|
|
|
|
|
|
{{/if}}
|
|
|
|
{{/each}}
|
|
|
|
|
2021-03-20 02:30:50 +00:00
|
|
|
class {{className}} {
|
2021-03-19 22:01:29 +00:00
|
|
|
public:
|
2021-03-24 19:04:03 +00:00
|
|
|
|
|
|
|
{{className}}();
|
|
|
|
|
|
|
|
{{className}}(const {{className}} &other);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Replaces the data being hold by this class with that of the other.
|
|
|
|
*/
|
|
|
|
void replaceData({{className}} &other);
|
|
|
|
|
2021-03-20 02:30:50 +00:00
|
|
|
static {{className}} fromJson(QJsonObject source);
|
|
|
|
void setFromJson(QJsonObject source);
|
2021-03-28 02:00:00 +00:00
|
|
|
QJsonObject toJson() const;
|
2021-03-19 22:01:29 +00:00
|
|
|
|
|
|
|
// Properties
|
|
|
|
|
|
|
|
{{#each properties as |p|}}
|
|
|
|
{{#if p.description.length > 0}}
|
|
|
|
/**
|
|
|
|
* @brief {{p.description}}
|
|
|
|
|
|
|
|
*/
|
|
|
|
{{/if}}
|
|
|
|
|
|
|
|
{{p.typeNameWithQualifiers}} {{p.name}}() const;
|
|
|
|
|
2021-03-20 02:30:50 +00:00
|
|
|
{{#if p.description.length > 0}}
|
|
|
|
/**
|
|
|
|
* @brief {{p.description}}
|
2021-03-19 22:01:29 +00:00
|
|
|
|
2021-03-20 02:30:50 +00:00
|
|
|
*/
|
|
|
|
{{/if}}
|
2021-03-19 22:01:29 +00:00
|
|
|
|
2021-03-20 02:30:50 +00:00
|
|
|
void set{{p.writeName}}({{p.typeNameWithQualifiers}} new{{p.writeName}});
|
2021-03-19 22:01:29 +00:00
|
|
|
|
2021-03-20 02:30:50 +00:00
|
|
|
{{#if p.isNullable}}
|
2021-03-24 19:04:03 +00:00
|
|
|
bool {{p.name}}Null() const;
|
2021-03-20 02:30:50 +00:00
|
|
|
void set{{p.writeName}}Null();
|
2021-03-24 19:04:03 +00:00
|
|
|
|
2021-03-20 02:30:50 +00:00
|
|
|
{{/if}}
|
2021-03-24 19:04:03 +00:00
|
|
|
|
2021-03-20 02:30:50 +00:00
|
|
|
{{/each}}
|
2021-03-19 22:01:29 +00:00
|
|
|
|
|
|
|
protected:
|
|
|
|
|
|
|
|
{{#each properties as |p|}}
|
|
|
|
{{#if p.defaultInitializer.length > 0}}
|
|
|
|
{{p.typeNameWithQualifiers}} {{p.memberName}} = {{p.defaultInitializer}};
|
|
|
|
{{else}}
|
|
|
|
{{p.typeNameWithQualifiers}} {{p.memberName}};
|
|
|
|
{{/if}}
|
|
|
|
|
|
|
|
{{/each}}
|
|
|
|
};
|
2021-03-28 02:00:00 +00:00
|
|
|
|
|
|
|
} // 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}}>);
|