![]() |
ImFusion SDK 4.3
|
#include <ImFusion/Base/BinarySerializable.h>
Interface for class which can be serialized and deserialized. More...
Interface for class which can be serialized and deserialized.
Make sure to ensure platform independence, for instance by using fixed-sized types for binary serialization such as int32_t.
Public Member Functions | |
virtual size_t | saveBufferSize () const =0 |
Returns the total amount of bytes required for serialization. | |
virtual void | loadFromBuffer (const char *buffer, size_t len)=0 |
Restores the state of this object from a memory buffer, using maximum len bytes. | |
virtual void | saveToBuffer (char *buffer) const =0 |
Saves the state of this object into a memory buffer, using maximum saveBufferSize() bytes. | |
std::string | saveToString () const |
Saves the state of this object into a string. Internally uses saveToBuffer. | |
void | loadFromString (const std::string &str) |
Restores the state of this object from a string, internally using loadFromBuffer. | |
|
pure virtual |
Returns the total amount of bytes required for serialization.
Implemented in TimestampDataComponent, TrackingInstrumentFiducialsData, and VitalsDataComponent::TimeSeries.
|
pure virtual |
Restores the state of this object from a memory buffer, using maximum len
bytes.
Implemented in TimestampDataComponent, TrackingInstrumentFiducialsData, and VitalsDataComponent::TimeSeries.
|
pure virtual |
Saves the state of this object into a memory buffer, using maximum saveBufferSize() bytes.
Implemented in TimestampDataComponent, TrackingInstrumentFiducialsData, and VitalsDataComponent::TimeSeries.