diff options
author | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2018-12-14 23:32:16 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-12-14 23:32:16 +0900 |
commit | fcc8d2ca615fce6e42bf1cf6585d60f94a2db926 (patch) | |
tree | b0dd17b632a5c5775f2221fd0b53b21a8c02ce58 /lib/csapi/{{base}}.h.mustache | |
parent | 50571a92b4e9f634c4daf546222fa082120db6c7 (diff) | |
parent | 12a0b95fdcfea15cd0ef313aec8868656629b986 (diff) | |
download | libquotient-fcc8d2ca615fce6e42bf1cf6585d60f94a2db926.tar.gz libquotient-fcc8d2ca615fce6e42bf1cf6585d60f94a2db926.zip |
Merge pull request #263 from QMatrixClient/kitsune-lazy-loading
Lazy loading members
Diffstat (limited to 'lib/csapi/{{base}}.h.mustache')
-rw-r--r-- | lib/csapi/{{base}}.h.mustache | 13 |
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}} |