jaffarCommon
Loading...
Searching...
No Matches
Public Member Functions | List of all members
jaffarCommon::serializer::Contiguous Class Referencefinal

#include <contiguous.hpp>

Inheritance diagram for jaffarCommon::serializer::Contiguous:
Inheritance graph
[legend]
Collaboration diagram for jaffarCommon::serializer::Contiguous:
Collaboration graph
[legend]

Public Member Functions

 Contiguous (void *__restrict outputDataBuffer=nullptr, const size_t outputDataBufferSize=std::numeric_limits< uint32_t >::max())
 
__JAFFAR_COMMON__INLINE__ void pushContiguous (const void *const __restrict inputDataBuffer=nullptr, const size_t inputDataSize=0) override
 
__JAFFAR_COMMON__INLINE__ void push (const void *const __restrict inputDataBuffer, const size_t inputDataSize) override
 
- Public Member Functions inherited from jaffarCommon::serializer::Base
 Base (void *__restrict outputDataBuffer, const size_t outputDataBufferSize)
 
__JAFFAR_COMMON__INLINE__ size_t getOutputSize () const
 
__JAFFAR_COMMON__INLINE__ uint8_t * getOutputDataBuffer () const
 

Additional Inherited Members

- Protected Attributes inherited from jaffarCommon::serializer::Base
uint8_t *__restrict const _outputDataBuffer
 
const size_t _outputDataBufferSize
 
size_t _outputDataBufferPos = 0
 

Detailed Description

The contiguous serialization class assumes that both the input elements and output buffers are contiguous and haven't been through any compression.

Constructor & Destructor Documentation

◆ Contiguous()

jaffarCommon::serializer::Contiguous::Contiguous ( void *__restrict  outputDataBuffer = nullptr,
const size_t  outputDataBufferSize = std::numeric_limits<uint32_t>::max() 
)
inline

Default constructor for the contiguous serializer class

Parameters
[in]outputDataBufferThe output buffer onto which to write the output data
[in]outputDataBufferSizeThe size of the output buffer (not to be exceeded)

Member Function Documentation

◆ push()

__JAFFAR_COMMON__INLINE__ void jaffarCommon::serializer::Contiguous::push ( const void *const __restrict  inputDataBuffer,
const size_t  inputDataSize 
)
inlineoverridevirtual

Serializes the specified number of bytes onto the output data buffer, pushing the information from the input data buffer

Note
The input buffer may be compressed or non-contiguous
Parameters
[out]inputDataBufferThe contiguous output buffer from which data is serialized. Passing nullptr is allowed and can be used to determine the required output buffer size
[in]inputDataSizeThe number of bytes from the input data buffer to serialize

Implements jaffarCommon::serializer::Base.

◆ pushContiguous()

__JAFFAR_COMMON__INLINE__ void jaffarCommon::serializer::Contiguous::pushContiguous ( const void *const __restrict  inputDataBuffer = nullptr,
const size_t  inputDataSize = 0 
)
inlineoverridevirtual

Serializes the specified number of contiguous bytes onto the output data buffer, pushing the information from the input buffer

Note
This function forces the treatment of the input and output as uncompressed contiguous buffers
Parameters
[out]inputDataBufferThe contiguous output buffer from which data is serialized. Passing nullptr is allowed and can be used to determine the required output buffer size
[in]inputDataSizeThe number of bytes from the input data buffer to serialize

Implements jaffarCommon::serializer::Base.


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