Archive interface.
More...
#include <IObject.h>
|
virtual bool | write (const void *data, size_t size)=0 |
| Write bytes to archive. More...
|
|
virtual bool | read (void *data, size_t size)=0 |
| Read bytes from archive. More...
|
|
virtual void | setSizeHint (size_t hint) |
| Set size hint. More...
|
|
Archive interface.
Archives abstract data storage and IO operations.
- Note
- IArchive is not derived from IRefCounted and does not force any lifetime control. It is up to user to implement it.
-
SDK ojects that use IArchive for serialization purposes do call only write() (during saving) or only read() (during loading) but never both during the same process unless otherwise is explicitly stated.
-
During saving or loading SDK objects are free to write or read their data in chunks; e.g. there may be several sequential calls to write() in scope of a single serialization request. Any IArchive implementation should be aware of this.
virtual bool fsdk::IArchive::read |
( |
void * |
data, |
|
|
size_t |
size |
|
) |
| |
|
pure virtual |
Read bytes from archive.
- Parameters
-
[in] | data | pointer to memory to read to. |
[in] | size | data size. |
- Returns
- true if succeeded, false otherwise.
virtual void fsdk::IArchive::setSizeHint |
( |
size_t |
hint | ) |
|
|
inlinevirtual |
Set size hint.
- Parameters
-
virtual bool fsdk::IArchive::write |
( |
const void * |
data, |
|
|
size_t |
size |
|
) |
| |
|
pure virtual |
Write bytes to archive.
- Parameters
-
[in] | data | pointer to memory to write. |
[in] | size | data size. |
- Returns
- true if succeeded, false otherwise.
The documentation for this struct was generated from the following file: