diff options
Diffstat (limited to 'common/propertymapper.h')
-rw-r--r-- | common/propertymapper.h | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/common/propertymapper.h b/common/propertymapper.h index efde72c..57202ab 100644 --- a/common/propertymapper.h +++ b/common/propertymapper.h | |||
@@ -19,6 +19,7 @@ | |||
19 | 19 | ||
20 | #pragma once | 20 | #pragma once |
21 | 21 | ||
22 | #include "sink_export.h" | ||
22 | #include <QVariant> | 23 | #include <QVariant> |
23 | #include <QByteArray> | 24 | #include <QByteArray> |
24 | #include <functional> | 25 | #include <functional> |
@@ -28,17 +29,17 @@ | |||
28 | * Defines how to convert qt primitives to flatbuffer ones | 29 | * Defines how to convert qt primitives to flatbuffer ones |
29 | */ | 30 | */ |
30 | template <class T> | 31 | template <class T> |
31 | flatbuffers::uoffset_t variantToProperty(const QVariant &, flatbuffers::FlatBufferBuilder &fbb); | 32 | flatbuffers::uoffset_t SINK_EXPORT variantToProperty(const QVariant &, flatbuffers::FlatBufferBuilder &fbb); |
32 | 33 | ||
33 | /** | 34 | /** |
34 | * Defines how to convert flatbuffer primitives to qt ones | 35 | * Defines how to convert flatbuffer primitives to qt ones |
35 | */ | 36 | */ |
36 | template <typename T> | 37 | template <typename T> |
37 | QVariant propertyToVariant(const flatbuffers::String *); | 38 | QVariant SINK_EXPORT propertyToVariant(const flatbuffers::String *); |
38 | template <typename T> | 39 | template <typename T> |
39 | QVariant propertyToVariant(uint8_t); | 40 | QVariant SINK_EXPORT propertyToVariant(uint8_t); |
40 | template <typename T> | 41 | template <typename T> |
41 | QVariant propertyToVariant(const flatbuffers::Vector<uint8_t> *); | 42 | QVariant SINK_EXPORT propertyToVariant(const flatbuffers::Vector<uint8_t> *); |
42 | 43 | ||
43 | 44 | ||
44 | /** | 45 | /** |
@@ -52,6 +53,8 @@ template<typename BufferType> | |||
52 | class ReadPropertyMapper | 53 | class ReadPropertyMapper |
53 | { | 54 | { |
54 | public: | 55 | public: |
56 | virtual ~ReadPropertyMapper(){}; | ||
57 | |||
55 | virtual QVariant getProperty(const QByteArray &key, BufferType const *buffer) const | 58 | virtual QVariant getProperty(const QByteArray &key, BufferType const *buffer) const |
56 | { | 59 | { |
57 | if (mReadAccessors.contains(key)) { | 60 | if (mReadAccessors.contains(key)) { |
@@ -106,6 +109,8 @@ template<typename BufferBuilder> | |||
106 | class WritePropertyMapper | 109 | class WritePropertyMapper |
107 | { | 110 | { |
108 | public: | 111 | public: |
112 | virtual ~WritePropertyMapper(){}; | ||
113 | |||
109 | virtual void setProperty(const QByteArray &key, const QVariant &value, QList<std::function<void(BufferBuilder &)> > &builderCalls, flatbuffers::FlatBufferBuilder &fbb) const | 114 | virtual void setProperty(const QByteArray &key, const QVariant &value, QList<std::function<void(BufferBuilder &)> > &builderCalls, flatbuffers::FlatBufferBuilder &fbb) const |
110 | { | 115 | { |
111 | if (mWriteAccessors.contains(key)) { | 116 | if (mWriteAccessors.contains(key)) { |