|
jaffarCommon
|
#include <base.hpp>

Public Member Functions | |
| Base (void *__restrict outputDataBuffer, const size_t outputDataBufferSize) | |
| virtual void | push (const void *const __restrict inputDataBuffer=nullptr, const size_t inputDataSize=0)=0 |
| virtual void | pushContiguous (const void *const __restrict inputDataBuffer=nullptr, const size_t inputDataSize=0)=0 |
| __JAFFAR_COMMON__INLINE__ size_t | getOutputSize () const |
| __JAFFAR_COMMON__INLINE__ uint8_t * | getOutputDataBuffer () const |
Protected Attributes | |
| uint8_t *__restrict const | _outputDataBuffer |
| const size_t | _outputDataBufferSize |
| size_t | _outputDataBufferPos = 0 |
Base class for serializers
A serializer receives a output data buffer upon creation, and allows the user to fill it up with different elements (e.g. attributes of a class) by repeated calls to the different 'push' functions.
|
inline |
Default constructor for the serializer classes
| [in] | outputDataBuffer | The input buffer from whence to read the input data |
| [in] | outputDataBufferSize | The size of the input buffer |
|
inline |
The internally-stored output data buffer size
|
inline |
The internally-stored output data buffer size
|
pure virtual |
Serializes the specified number of bytes onto the output data buffer, pushing the information from the input data buffer
| [out] | inputDataBuffer | The contiguous output buffer from which data is serialized. Passing nullptr is allowed and can be used to determine the required output buffer size |
| [in] | inputDataSize | The number of bytes from the input data buffer to serialize |
Implemented in jaffarCommon::serializer::Differential, and jaffarCommon::serializer::Contiguous.
|
pure virtual |
Serializes the specified number of contiguous bytes onto the output data buffer, pushing the information from the input buffer
| [out] | inputDataBuffer | The contiguous output buffer from which data is serialized. Passing nullptr is allowed and can be used to determine the required output buffer size |
| [in] | inputDataSize | The number of bytes from the input data buffer to serialize |
Implemented in jaffarCommon::serializer::Differential, and jaffarCommon::serializer::Contiguous.
|
protected |
The write-only internally stored output data buffer
|
protected |
The current header position of the output data buffer (how much was used)
|
protected |
The size of the output data buffer