/** * Json <-> DDS conversion routines * $Id$ * $HeadURL$ * $Author$ * Created by Christian Ehrlicher, SLSE, 2017-11-30 */ {% autoescape off %} // filename: {{ namespace_abbr }}_json.h #pragma once #include "{{ namespace_abbr }}.hpp" #include "{{ namespace_abbr }}_export.h" #include #include namespace {{ namespace }} { template struct type{}; template T fromJson(const QJsonValue &val, type); template T fromJson(const QJsonValue &val) { return fromJson(val, type{}); } {% for dt in jsonTopics %} // {{ dt.name }} {{ namespace_abbr_upper }}_COMMON_EXPORT QJsonObject toJson(const {{ dt.name }} &element); template<> {{ namespace_abbr_upper }}_COMMON_EXPORT {{ dt.name }} fromJson(const QJsonValue &val, type<{{ dt.name }}>); {{ namespace_abbr_upper }}_COMMON_EXPORT QJsonValue toJson(const std::vector< {{ dt.name }} > &element); template<> {{ namespace_abbr_upper }}_COMMON_EXPORT std::vector<{{ dt.name }}> fromJson(const QJsonValue &value, type< std::vector< {{ dt.name }} > >); {% endfor %} // // extensions to support sequence of seqence of Non-POD : // } // namespace {{ namespace }} {% endautoescape %}