qt5cpp.model-header.mustache Maven / Gradle / Ivy
{{>licenseInfo}}
{{#models}}{{#model}}/*
* {{classname}}.h
*
* {{description}}
*/
#ifndef {{classname}}_H_
#define {{classname}}_H_
#include
{{/model}}{{/models}}
{{#imports}}{{{import}}}
{{/imports}}
#include "{{prefix}}Object.h"
{{#models}}
{{#model}}
{{#cppNamespaceDeclarations}}
namespace {{this}} {
{{/cppNamespaceDeclarations}}
class {{classname}}: public {{prefix}}Object {
public:
{{classname}}();
{{classname}}(QString json);
~{{classname}}();
void init();
void cleanup();
QString asJson () override;
QJsonObject asJsonObject() override;
void fromJsonObject(QJsonObject json) override;
{{classname}}* fromJson(QString jsonString) override;
{{#vars}}
{{{datatype}}} {{getter}}();
void {{setter}}({{{datatype}}} {{name}});
{{/vars}}
virtual bool isSet() override;
private:
{{#vars}}
{{{datatype}}} {{name}};
bool m_{{name}}_isSet;
{{/vars}}
};
{{#cppNamespaceDeclarations}}
}
{{/cppNamespaceDeclarations}}
#endif /* {{classname}}_H_ */
{{/model}}
{{/models}}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy