KanoopCommonQt 2.1.1
Kanoop foundational Qt utility library
Loading...
Searching...
No Matches
ISerializableToByteArray Class Referenceabstract

Interface for objects that can serialize to and deserialize from a QByteArray. More...

#include <iserializabletobytearray.h>

Public Member Functions

virtual void deserializeFromByteArray (const QByteArray &data)=0
 Populate this object by reading from a raw byte array.
 
virtual QByteArray serializeToByteArray () const =0
 Serialize this object into a raw byte array.
 

Detailed Description

Interface for objects that can serialize to and deserialize from a QByteArray.

Interface for arbitrary binary serialization into a QByteArray.

Implement both serializeToByteArray() and deserializeFromByteArray() to support round-trip encoding in an application-defined binary format.

Definition at line 14 of file iserializabletobytearray.h.

Member Function Documentation

◆ deserializeFromByteArray()

virtual void ISerializableToByteArray::deserializeFromByteArray ( const QByteArray &  data)
pure virtual

Populate this object by reading from a raw byte array.

Parameters
dataPreviously produced by serializeToByteArray()

◆ serializeToByteArray()

virtual QByteArray ISerializableToByteArray::serializeToByteArray ( ) const
pure virtual

Serialize this object into a raw byte array.

Returns
Byte array representation of this object's state

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