LMDBAL 0.6.0
LMDB (Lightning Memory-Mapped Database Manager) Abstraction Layer
|
Public Member Functions | |
Serializer (const uint8_t &p_value) | |
uint8_t | deserialize (const MDB_val &data) |
void | deserialize (const MDB_val &data, uint8_t &result) |
MDB_val | setData (const uint8_t &data) |
MDB_val | getData () |
void | clear () |
Serializer () | |
Creates an empty Serializer. | |
Serializer (const uint8_t &value) | |
Creates a Serializer with some data in it. | |
~Serializer () | |
Destoys the serializer. | |
uint8_t | deserialize (const MDB_val &value) |
Deserializes value. | |
void | deserialize (const MDB_val &value, uint8_t &result) |
Deserializes value. | |
MDB_val | setData (const uint8_t &value) |
Sets the data to the seriazer. | |
MDB_val | getData () |
Returns the data if it already was serialized. | |
void | clear () |
Clears the state of serializer. | |
LMDBAL::Serializer< uint8_t >::Serializer | ( | const uint8_t & | value | ) |
Creates a Serializer with some data in it.
The data automatically gets serialized
[in] | value | - a value that is assigned to the serializer |
void LMDBAL::Serializer< uint8_t >::clear | ( | ) |
Clears the state of serializer.
Normally you don't need to call this function
uint8_t LMDBAL::Serializer< uint8_t >::deserialize | ( | const MDB_val & | value | ) |
Deserializes value.
This is a normal way to deseriaze value
[in] | value | - a value you want to deserialize |
void LMDBAL::Serializer< uint8_t >::deserialize | ( | const MDB_val & | value, |
uint8_t & | result ) |
Deserializes value.
This is a normal way to deseriaze value
[in] | value | - a value you want to deserialize |
[out] | result | - deserialized value |
MDB_val LMDBAL::Serializer< uint8_t >::getData | ( | ) |
Returns the data if it already was serialized.
Normally you don't need to call this function
This may be usefull if you called LMDBAL::Serilizer::setData() but lost the result
MDB_val LMDBAL::Serializer< uint8_t >::setData | ( | const uint8_t & | value | ) |
Sets the data to the seriazer.
This is a normal way to seriaze value
[in] | value | - a value you want to serialize |