diff options
Diffstat (limited to 'tools/qscxmlc/cppdatamodel.t')
-rw-r--r-- | tools/qscxmlc/cppdatamodel.t | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/tools/qscxmlc/cppdatamodel.t b/tools/qscxmlc/cppdatamodel.t new file mode 100644 index 0000000..524571b --- /dev/null +++ b/tools/qscxmlc/cppdatamodel.t @@ -0,0 +1,42 @@ +QString ${datamodel}::evaluateToString(QScxmlExecutableContent::EvaluatorId id, bool *ok) +{ + *ok = true; + switch (id) { +${evaluateToStringCases} default: + Q_UNREACHABLE(); + *ok = false; + return QString(); + } +} + +bool ${datamodel}::evaluateToBool(QScxmlExecutableContent::EvaluatorId id, bool *ok) +{ + *ok = true; + switch (id) { +${evaluateToBoolCases} default: + Q_UNREACHABLE(); + *ok = false; + return false; + } +} + +QVariant ${datamodel}::evaluateToVariant(QScxmlExecutableContent::EvaluatorId id, bool *ok) +{ + *ok = true; + switch (id) { +${evaluateToVariantCases} default: + Q_UNREACHABLE(); + *ok = false; + return QVariant(); + } +} + +void ${datamodel}::evaluateToVoid(QScxmlExecutableContent::EvaluatorId id, bool *ok) +{ + *ok = true; + switch (id) { +${evaluateToVoidCases} default: + Q_UNREACHABLE(); + *ok = false; + } +} |