aboutsummaryrefslogtreecommitdiff
path: root/lib/csapi/{{base}}.h.mustache
diff options
context:
space:
mode:
Diffstat (limited to 'lib/csapi/{{base}}.h.mustache')
-rw-r--r--lib/csapi/{{base}}.h.mustache13
1 files changed, 6 insertions, 7 deletions
diff --git a/lib/csapi/{{base}}.h.mustache b/lib/csapi/{{base}}.h.mustache
index 147c8607..a9c3a63a 100644
--- a/lib/csapi/{{base}}.h.mustache
+++ b/lib/csapi/{{base}}.h.mustache
@@ -18,14 +18,13 @@ namespace QMatrixClient
{{/vars}}{{#propertyMap}}{{#description}} /// {{_}}
{{/description}} {{>maybeOmittableType}} {{nameCamelCase}};
{{/propertyMap}} };
-{{#in?}}
- QJsonObject toJson(const {{name}}& pod);
-{{/in?}}{{#out?}}
- template <> struct FromJsonObject<{{name}}>
+ template <> struct JsonObjectConverter<{{name}}>
{
- {{name}} operator()({{^propertyMap}}const QJsonObject&{{/propertyMap}}{{#propertyMap}}QJsonObject{{/propertyMap}} jo) const;
- };
-{{/ out?}}{{/model}}
+ {{#in?}}static void dumpTo(QJsonObject& jo, const {{name}}& pod);
+ {{/in?}}{{#out?}}static void fillFrom({{^propertyMap}}const QJsonObject&{{/propertyMap
+ }}{{#propertyMap}}QJsonObject{{/propertyMap}} jo, {{name}}& pod);
+{{/out?}} };
+{{/model}}
{{/models}}{{#operations}} // Operations
{{# operation}}{{#summary}}
/// {{summary}}{{#description?}}{{!add a linebreak between summary and description if both exist}}