aboutsummaryrefslogtreecommitdiff
path: root/lib/csapi/gtad.yaml
diff options
context:
space:
mode:
authorKitsune Ral <Kitsune-Ral@users.sf.net>2019-08-03 17:29:52 +0900
committerGitHub <noreply@github.com>2019-08-03 17:29:52 +0900
commit66e116b7b1e848e80577a0229c8995db0a54932e (patch)
tree763340439a0f4034e9c829d76cb1ffe9766b83c5 /lib/csapi/gtad.yaml
parent5b236dfe895c7766002559570aa29c9033009228 (diff)
parentc05ade838f0fce81f2bbe80a3295618a8a26ff52 (diff)
downloadlibquotient-66e116b7b1e848e80577a0229c8995db0a54932e.tar.gz
libquotient-66e116b7b1e848e80577a0229c8995db0a54932e.zip
Merge pull request #295 from marcdeop/140_impose_coding_standard
140 impose coding standard
Diffstat (limited to 'lib/csapi/gtad.yaml')
-rw-r--r--lib/csapi/gtad.yaml12
1 files changed, 10 insertions, 2 deletions
diff --git a/lib/csapi/gtad.yaml b/lib/csapi/gtad.yaml
index a44f803a..301ee0b6 100644
--- a/lib/csapi/gtad.yaml
+++ b/lib/csapi/gtad.yaml
@@ -118,24 +118,32 @@ mustache:
# _rightQuote: '"'
# _joinChar: ',' # The character used by {{_join}} - not working yet
_comment: '//'
+ copyrightName: Kitsune Ral
+ copyrightEmail: <kitsune-ral@users.sf.net>
+
partials:
_typeRenderer: "{{#scope}}{{scopeCamelCase}}Job::{{/scope}}{{>name}}"
omittedValue: '{}' # default value to initialize omitted parameters with
initializer: '{{defaultValue}}'
cjoin: '{{#hasMore}}, {{/hasMore}}'
+
openOmittable: "{{^required?}}{{#useOmittable}}{{^defaultValue}}Omittable<{{/defaultValue}}{{/useOmittable}}{{/required?}}"
closeOmittable: "{{^required?}}{{#useOmittable}}{{^defaultValue}}>{{/defaultValue}}{{/useOmittable}}{{/required?}}"
+
maybeOmittableType: "{{>openOmittable}}{{dataType.name}}{{>closeOmittable}}"
qualifiedMaybeOmittableType: "{{>openOmittable}}{{dataType.qualifiedName}}{{>closeOmittable}}"
+
maybeCrefType: "{{#avoidCopy}}const {{/avoidCopy}}{{>maybeOmittableType}}{{#avoidCopy}}&{{/avoidCopy}}{{#moveOnly}}&&{{/moveOnly}}"
qualifiedMaybeCrefType:
"{{#avoidCopy}}const {{/avoidCopy}}{{>qualifiedMaybeOmittableType}}{{#avoidCopy}}&{{/avoidCopy}}{{#moveOnly}}&&{{/moveOnly}}"
+
+ maybeCrefJsonObject: "{{^propertyMap}}const QJsonObject&{{/propertyMap}}{{#propertyMap}}QJsonObject{{/propertyMap}}"
+ takeOrValue: "{{#propertyMap}}take{{/propertyMap}}{{^propertyMap}}value{{/propertyMap}}"
+
initializeDefaultValue: "{{#defaultValue}}{{>initializer}}{{/defaultValue}}{{^defaultValue}}{{>omittedValue}}{{/defaultValue}}"
joinedParamDecl: '{{>maybeCrefType}} {{paramName}}{{^required?}} = {{>initializeDefaultValue}}{{/required?}}{{>cjoin}}'
joinedParamDef: '{{>maybeCrefType}} {{paramName}}{{>cjoin}}'
passQueryParams: '{{#queryParams}}{{paramName}}{{>cjoin}}{{/queryParams}}'
- copyrightName: Kitsune Ral
- copyrightEmail: <kitsune-ral@users.sf.net>
templates:
- "{{base}}.h.mustache"