summaryrefslogtreecommitdiff
path: root/generator/qtcpp/templates/struct.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'generator/qtcpp/templates/struct.cpp')
-rw-r--r--generator/qtcpp/templates/struct.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/generator/qtcpp/templates/struct.cpp b/generator/qtcpp/templates/struct.cpp
new file mode 100644
index 0000000..94b6ae7
--- /dev/null
+++ b/generator/qtcpp/templates/struct.cpp
@@ -0,0 +1,20 @@
+{# Copyright (c) Pelagicore AB 2016 #}
+{% set ampersand = joiner(" &&") %}
+/****************************************************************************
+** This is an auto-generated file.
+** Do not edit! All changes made to it will be lost.
+****************************************************************************/
+
+#include <{{struct|lower}}.h>
+
+
+{{struct.comment}}
+
+bool {{struct}}::operator==(const {{struct}} &other) const
+{
+ return (
+ {%- for field in struct.fields %}{{ ampersand() }}
+ m_{{field}} == other.m_{{field}}
+ {%- endfor %} );
+}
+