36#ifndef IMT_BASE_CORE_SERIALIZATION_SERIALIZER_H 
   37#define IMT_BASE_CORE_SERIALIZATION_SERIALIZER_H 
   51namespace serialization {
 
  250    Serializer& pushString(std::string 
const& 
string);
 
  278    bool checkCapacity(
uint32_t bytesToWrite);
 
Serialization is the process of translating data structures into a binary representation.
 
Serializes various data types into the given byte buffer.
 
uint8_t const * getBuffer() const
Returns the pointer to the byte buffer.
 
Serializer & operator<<(int32_t const data)
Puts a int32_t into the Serializer.
 
Serializer & operator<<(char_t const data)
Puts a character into the Serializer.
 
void setBufferPos(uint32_t const newPos)
Sets the write position to the given position.
 
void reset()
Resets the Serializer.
 
Serializer(uint8_t buffer[], uint32_t const bufferSize) noexcept
Constructor.
 
Serializer & operator<<(char_t const *pData)
Puts a null terminated string into the Serializer.
 
Serializer & operator<<(uint64_t const data)
Puts a uint64_t into the Serializer.
 
bool isReset() const
States if the serializer is reset (getBufferPos == 0).
 
Serializer & operator<<(int64_t const data)
Puts a int64_t into the Serializer.
 
Serializer & operator<<(uint32_t const data)
Puts a uint32_t into the Serializer.
 
Serializer & pushData(void const *const pDataSrc, uint32_t const bytes)
Puts data into the Serializer.
 
Serializer & operator<<(float64_t const data)
Puts a double into the Serializer.
 
uint32_t getUnusedBufferSize() const
Returns the remaining data to write from the current position until the buffer is full.
 
Serializer & operator<<(uint16_t const data)
Puts a uint16_t into the Serializer.
 
Serializer & operator<<(uint8_t const data)
Puts a uint8_t into the Serializer.
 
bool hasOverflow() const
Query if an overflow happend during serialization.
 
Serializer & operator<<(int8_t const data)
Puts a int8_t into the Serializer.
 
uint32_t getBufferSize() const
Returns the size of the byte buffer in number of bytes.
 
Serializer & operator<<(bool const data)
Puts a bool into the Serializer.
 
uint32_t getBufferPos() const
Returns the write position within the byte buffer.
 
uint8_t const & getBufferByte(uint32_t const indexOfByte) const
Returns the byte of the byte buffer at the given index.
 
Serializer & operator<<(int16_t const data)
Puts a int16_t into the Serializer.
 
static void setAssertDebugFunction(AssertDebugFunctionPtr const funcPtr)
Set and replace the default assert-debug function.
 
Serializer & operator<<(float32_t const data)
Puts a float into the Serializer.
 
void(*)(bool const condition, char_t const  *const pMessage) AssertDebugFunctionPtr
Alias for ASSERT_DEBUG function pointer type (as raw function pointer)
 
Serializer & operator<<(SerializableIfc const &data)
Puts data into the Serializer.
 
This is a application specific file which is used to configure Imt.Base.Core.Math.
 
char char_t
The char_t typedef does not indicate size and signedness and is simply included to allow char objects...
 
float float32_t
32 Bits float variable (float)
 
double float64_t
64 Bits float variable (double)
 
unsigned __int16 uint16_t
 
unsigned __int32 uint32_t
 
unsigned __int64 uint64_t