29 Serializer(
const int16_t& p_value):value(p_value) {};
36 void deserialize(
const MDB_val& data, int16_t& result) {
37 std::memcpy(&result, data.mv_data, 2);
39 MDB_val
setData(
const int16_t& data) {
45 result.mv_data = &value;
A class handling serialization/deserialization.
Definition serializer.h:33
~Serializer()
Destoys the serializer.
Definition serializer.hpp:69
Serializer()
Creates an empty Serializer.
Definition serializer.hpp:40
MDB_val getData()
Returns the data if it already was serialized.
Definition serializer.hpp:153
T deserialize(const MDB_val &value)
Deserializes value.
Definition serializer.hpp:99
void clear()
Clears the state of serializer.
Definition serializer.hpp:137
MDB_val setData(const T &value)
Sets the data to the seriazer.
Definition serializer.hpp:83