diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2015-04-12 16:35:37 +0200 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2015-04-12 16:35:37 +0200 |
commit | 5e5b1e77252ae1417b339a01bba3ed1fe5705629 (patch) | |
tree | e104b4ae85f1e2f55cb6482c031f0785bbe716c2 /common/domainadaptor.h | |
parent | b9e5ac84bd7f81473a87eee9dad6c75fdda7e62e (diff) | |
download | sink-5e5b1e77252ae1417b339a01bba3ed1fe5705629.tar.gz sink-5e5b1e77252ae1417b339a01bba3ed1fe5705629.zip |
Further simplify writing of buffer adaptors.
Still not quite there but we're avoiding the bulk of duplication by now.
Diffstat (limited to 'common/domainadaptor.h')
-rw-r--r-- | common/domainadaptor.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/common/domainadaptor.h b/common/domainadaptor.h index e356692..d07a2bd 100644 --- a/common/domainadaptor.h +++ b/common/domainadaptor.h | |||
@@ -79,10 +79,15 @@ private: | |||
79 | 79 | ||
80 | /** | 80 | /** |
81 | * Defines how to convert qt primitives to flatbuffer ones | 81 | * Defines how to convert qt primitives to flatbuffer ones |
82 | * TODO: rename to createProperty or so? | ||
83 | */ | 82 | */ |
84 | template <class T> | 83 | template <class T> |
85 | flatbuffers::uoffset_t extractProperty(const QVariant &, flatbuffers::FlatBufferBuilder &fbb); | 84 | flatbuffers::uoffset_t variantToProperty(const QVariant &, flatbuffers::FlatBufferBuilder &fbb); |
85 | |||
86 | /** | ||
87 | * Defines how to convert flatbuffer primitives to qt ones | ||
88 | */ | ||
89 | template <typename T> | ||
90 | QVariant propertyToVariant(const flatbuffers::String *); | ||
86 | 91 | ||
87 | /** | 92 | /** |
88 | * Create a buffer from a domain object using the provided mappings | 93 | * Create a buffer from a domain object using the provided mappings |