diff options
author | Juergen Bocklage-Ryannel <juergen@ryannel.org> | 2019-02-18 11:47:46 +0100 |
---|---|---|
committer | Dominik Holland <dominik.holland@googlemail.com> | 2022-01-27 13:50:04 +0100 |
commit | cee12d7983826661c34e889579f1fd9b7a846bc4 (patch) | |
tree | 3fafb70a6cf5db69950eedfcac81d61a9cfdb4ea | |
parent | 58e0cfa7a4a830729a17161a6e7171e7d00dabf5 (diff) | |
download | qtivi-qface-cee12d7983826661c34e889579f1fd9b7a846bc4.tar.gz |
add new test module
-rw-r--r-- | interfaces/org.qface.test.qface | 55 | ||||
-rw-r--r-- | qface/templates/qface/qtcpp.j2 | 4 |
2 files changed, 59 insertions, 0 deletions
diff --git a/interfaces/org.qface.test.qface b/interfaces/org.qface.test.qface new file mode 100644 index 0000000..50dd6a9 --- /dev/null +++ b/interfaces/org.qface.test.qface @@ -0,0 +1,55 @@ +module org.qface.test 1.0 + +interface Interface1 { +} + +interface Interface2 { + bool v1 + int v2 + real v3 + string v4 + var v5 +} + +interface Interface3 { + list<string> list1 + list<Type1> list2 + + model<string> model1 + model<Type1> model2 + +// map<string> map1 +// map<Type1> map1 +} + +interface Interface4 { + string doSimple(string p1) + Type1 doComplex(Type1 p1) + void doMany(bool p1, int p2, string p3) + + signal notifyPrimitive(string p1) + signal notifyComplex(Type1 p1) +} + + +struct Type1 { + string v1 +} + +struct Type2 { + string v1 + Type1 t1 +} + + + +enum Enumeration { + ZERO, + ONE +} + +flag Flag { + ONE, + TWO, + FOUR +}
\ No newline at end of file diff --git a/qface/templates/qface/qtcpp.j2 b/qface/templates/qface/qtcpp.j2 index 56b81a8..a022e69 100644 --- a/qface/templates/qface/qtcpp.j2 +++ b/qface/templates/qface/qtcpp.j2 @@ -109,6 +109,10 @@ void {{class}}::{{verb}}{{property|upperfirst}}({{ property|qt.parameterType }}) } {%- endmacro %} +{% macro operation_impl_start(class, operation, void=False, doc=True) -%} +{% if not void -%}{{operation|qt.returnType}}{%- else %}void{% endif %} {{class}}::{{operation}}({{operation|qt.parameters}}) +{%- endmacro %} + {% macro operation_decl(operation, ending=";", void=False) -%} {% if void %} virtual void {{operation}}({{operation|qt.parameters}}){{ending}} |