10#include <fsdk/IRefCounted.h>
11#include <fsdk/Types.h>
21 struct ISettingsProvider;
46 virtual bool write(
const void* data,
size_t size) = 0;
54 virtual bool read(
void* data,
size_t size) = 0;
151 return "Signature error";
153 return "Error during archive reading";
155 return "Input archive is nullptr";
157 return "Error during archive writing";
159 return "Unknown error";
SDK namespace.
Definition IAGSEstimator.h:8
Archive interface.
Definition IObject.h:38
virtual void setSizeHint(size_t hint)
Set size hint.
Definition IObject.h:60
virtual bool write(const void *data, size_t size)=0
Write bytes to archive.
virtual bool read(void *data, size_t size)=0
Read bytes from archive.
Data storage object interface helper.
Definition IObject.h:167
virtual IRefCounted * getParentObject() const noexcept=0
Get parent object (one that has created this).
virtual void clear() noexcept=0
Clear object data.
Base strong reference counted object interface.
Definition IRefCounted.h:37
Serializable object interface.
Definition IObject.h:71
virtual void getSize(Sizer &sizer, uint32_t flags=Default) const noexcept=0
Estimate size of this object binary data.
Error
Serialization nerror codes.
Definition IObject.h:76
@ ArchiveRead
Error during archive reading,.
@ ArchiveWrite
Error during archive writing,.
@ Signature
Invalid signature.
@ InputArchive
Input archive is nullptr.
virtual Result< Error > save(IArchive *archive, uint32_t flags=Default) const =0
Save object to archive.
virtual Result< Error > load(IArchive *archive, uint32_t flags=Default)=0
Load object from archive.
Flags
Serialization flags.
Definition IObject.h:91
@ Default
Default serialization mode.
Definition IObject.h:94
@ NoSignature
Omit object signature.
Definition IObject.h:103
A structure that encapsulates an action result enumeration.
Definition Result.h:27
Helper entity to measure size of dynamic objects in memory.
Definition Sizer.h:9