jaffarCommon
Loading...
Searching...
No Matches
Public Member Functions | Protected Attributes | List of all members
jaffarCommon::deserializer::Base Class Referenceabstract

#include <base.hpp>

Inheritance diagram for jaffarCommon::deserializer::Base:
Inheritance graph
[legend]

Public Member Functions

 Base (const void *__restrict inputDataBuffer, const size_t inputDataBufferSize)
 
virtual void pop (void *const __restrict outputDataBuffer, const size_t outputDataBufferSize)=0
 
virtual void popContiguous (void *const __restrict outputDataBuffer, const size_t outputDataBufferSize)=0
 
__JAFFAR_COMMON__INLINE__ size_t getInputSize () const
 
__JAFFAR_COMMON__INLINE__ const uint8_t * getInputDataBuffer () const
 

Protected Attributes

const uint8_t *__restrict const _inputDataBuffer
 
const size_t _inputDataBufferSize
 
size_t _inputDataBufferPos = 0
 

Detailed Description

Base class for deserializers

A deserializer receives a read-only input data buffer upon creation, and unfolds it onto an actual object element by element, by offering different types of 'pop' operations.

Constructor & Destructor Documentation

◆ Base()

jaffarCommon::deserializer::Base::Base ( const void *__restrict  inputDataBuffer,
const size_t  inputDataBufferSize 
)
inline

Default constructor for the deserializer classes

Parameters
[in]inputDataBufferThe input buffer from whence to read the input data
[in]inputDataBufferSizeThe size of the input buffer

Member Function Documentation

◆ getInputDataBuffer()

__JAFFAR_COMMON__INLINE__ const uint8_t * jaffarCommon::deserializer::Base::getInputDataBuffer ( ) const
inline

Gets a reference to the input data buffer

Returns
The pointer to the input data buffer

◆ getInputSize()

__JAFFAR_COMMON__INLINE__ size_t jaffarCommon::deserializer::Base::getInputSize ( ) const
inline

Get the position of the input buffer header.

Returns
The position of the input buffer header. This value represents the size of the input data at the end of the deserialization process

◆ pop()

virtual void jaffarCommon::deserializer::Base::pop ( void *const __restrict  outputDataBuffer,
const size_t  outputDataBufferSize 
)
pure virtual

Deserializes the specified number of bytes onto the output data buffer, popping the information from the input buffer

Note
The input buffer may be compressed or non-contiguous
Parameters
[out]outputDataBufferThe contiguous output buffer onto which to deserialize.
[in]outputDataBufferSizeThe number of bytes to save onto the output buffer

Implemented in jaffarCommon::deserializer::Contiguous, and jaffarCommon::deserializer::Differential.

◆ popContiguous()

virtual void jaffarCommon::deserializer::Base::popContiguous ( void *const __restrict  outputDataBuffer,
const size_t  outputDataBufferSize 
)
pure virtual

Deserializes the specified number of contiguous bytes onto the output data buffer, popping the information from the input buffer

Note
This function forces the treatment of the input and output as uncompressed contiguous buffers
Parameters
[out]outputDataBufferThe contiguous output buffer onto which to deserialize
[in]outputDataBufferSizeThe number of bytes to save onto the output buffer

Implemented in jaffarCommon::deserializer::Contiguous, and jaffarCommon::deserializer::Differential.

Member Data Documentation

◆ _inputDataBuffer

const uint8_t* __restrict const jaffarCommon::deserializer::Base::_inputDataBuffer
protected

The read-only internally-stored input data buffer

◆ _inputDataBufferPos

size_t jaffarCommon::deserializer::Base::_inputDataBufferPos = 0
protected

The position of the header that iterates over the data buffer

◆ _inputDataBufferSize

const size_t jaffarCommon::deserializer::Base::_inputDataBufferSize
protected

The maximum size of the input data buffer


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