diff options
Diffstat (limited to 'common/entitybuffer.h')
-rw-r--r-- | common/entitybuffer.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/common/entitybuffer.h b/common/entitybuffer.h index 474a619..24f0b6b 100644 --- a/common/entitybuffer.h +++ b/common/entitybuffer.h | |||
@@ -8,7 +8,8 @@ | |||
8 | namespace Sink { | 8 | namespace Sink { |
9 | struct Entity; | 9 | struct Entity; |
10 | 10 | ||
11 | class SINK_EXPORT EntityBuffer { | 11 | class SINK_EXPORT EntityBuffer |
12 | { | ||
12 | public: | 13 | public: |
13 | EntityBuffer(const void *dataValue, int size); | 14 | EntityBuffer(const void *dataValue, int size); |
14 | EntityBuffer(const QByteArray &data); | 15 | EntityBuffer(const QByteArray &data); |
@@ -25,9 +26,10 @@ public: | |||
25 | * We can't use union's either (which would allow to have a field that stores a selection of tables), as we don't want to modify | 26 | * We can't use union's either (which would allow to have a field that stores a selection of tables), as we don't want to modify |
26 | * the entity schema for each resource's buffers. | 27 | * the entity schema for each resource's buffers. |
27 | */ | 28 | */ |
28 | static void assembleEntityBuffer(flatbuffers::FlatBufferBuilder &fbb, void const *metadataData, size_t metadataSize, void const *resourceData, size_t resourceSize, void const *localData, size_t localSize); | 29 | static void assembleEntityBuffer( |
29 | static flatbuffers::Offset<flatbuffers::Vector<uint8_t> > appendAsVector(flatbuffers::FlatBufferBuilder &fbb, void const *data, size_t size); | 30 | flatbuffers::FlatBufferBuilder &fbb, void const *metadataData, size_t metadataSize, void const *resourceData, size_t resourceSize, void const *localData, size_t localSize); |
30 | template<typename T> | 31 | static flatbuffers::Offset<flatbuffers::Vector<uint8_t>> appendAsVector(flatbuffers::FlatBufferBuilder &fbb, void const *data, size_t size); |
32 | template <typename T> | ||
31 | static const T *readBuffer(const uint8_t *data, int size) | 33 | static const T *readBuffer(const uint8_t *data, int size) |
32 | { | 34 | { |
33 | flatbuffers::Verifier verifier(data, size); | 35 | flatbuffers::Verifier verifier(data, size); |
@@ -37,7 +39,7 @@ public: | |||
37 | return nullptr; | 39 | return nullptr; |
38 | } | 40 | } |
39 | 41 | ||
40 | template<typename T> | 42 | template <typename T> |
41 | static const T *readBuffer(const flatbuffers::Vector<uint8_t> *data) | 43 | static const T *readBuffer(const flatbuffers::Vector<uint8_t> *data) |
42 | { | 44 | { |
43 | if (data) { | 45 | if (data) { |
@@ -50,6 +52,4 @@ public: | |||
50 | private: | 52 | private: |
51 | const Entity *mEntity; | 53 | const Entity *mEntity; |
52 | }; | 54 | }; |
53 | |||
54 | } | 55 | } |
55 | |||