LMDBAL 0.6.0
LMDB (Lightning Memory-Mapped Database Manager) Abstraction Layer
Loading...
Searching...
No Matches
LMDBAL::Serializer< int32_t > Class Reference

Public Member Functions

 Serializer (const int32_t &p_value)
 
int32_t deserialize (const MDB_val &data)
 
void deserialize (const MDB_val &data, int32_t &result)
 
MDB_val setData (const int32_t &data)
 
MDB_val getData ()
 
void clear ()
 
 Serializer ()
 Creates an empty Serializer.
 
 Serializer (const int32_t &value)
 Creates a Serializer with some data in it.
 
 ~Serializer ()
 Destoys the serializer.
 
int32_t deserialize (const MDB_val &value)
 Deserializes value.
 
void deserialize (const MDB_val &value, int32_t &result)
 Deserializes value.
 
MDB_val setData (const int32_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.
 

Constructor & Destructor Documentation

◆ Serializer()

LMDBAL::Serializer< int32_t >::Serializer ( const int32_t & value)

Creates a Serializer with some data in it.

The data automatically gets serialized

Parameters
[in]value- a value that is assigned to the serializer

Member Function Documentation

◆ clear()

void LMDBAL::Serializer< int32_t >::clear ( )

Clears the state of serializer.

Normally you don't need to call this function

◆ deserialize() [1/2]

int32_t LMDBAL::Serializer< int32_t >::deserialize ( const MDB_val & value)

Deserializes value.

This is a normal way to deseriaze value

Parameters
[in]value- a value you want to deserialize
Returns
deserialized value

◆ deserialize() [2/2]

void LMDBAL::Serializer< int32_t >::deserialize ( const MDB_val & value,
int32_t & result )

Deserializes value.

This is a normal way to deseriaze value

Parameters
[in]value- a value you want to deserialize
[out]result- deserialized value

◆ getData()

MDB_val LMDBAL::Serializer< int32_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

Returns
Serialized data

◆ setData()

MDB_val LMDBAL::Serializer< int32_t >::setData ( const int32_t & value)

Sets the data to the seriazer.

This is a normal way to seriaze value

Parameters
[in]value- a value you want to serialize
Returns
serialized value

The documentation for this class was generated from the following files: