14class CMemoryWriteArchive;
29 const void* bufferPtr,
31 bool serializeHeader =
true);
34 bool serializeHeader =
true);
Base class for archive implementations reading data based on its binary representation.
Implementation of archive using memory buffer to read the persistent objects.
static bool CloneObjectByArchive(const ISerializable &source, ISerializable &result)
Clone serializable objects using iser::CMemoryWriteArchive and iser::CMemoryReadArchive archives.
virtual bool ProcessData(void *data, int size) override
Process binary data block.
int m_readPosition
Current position in the buffer from which data will be read next.
CMemoryReadArchive(const void *bufferPtr, int bufferSize, bool serializeHeader=true)
bool m_isValid
Indicates whether the archive is in valid state.
virtual int GetMaxStringLength() const override
Get maximal allowed string size.
CBinaryReadArchiveBase BaseClass
CMemoryReadArchive(const CMemoryWriteArchive &writeArchive, bool serializeHeader=true)
int m_bufferSize
Size of the memory buffer used for reading data.
int m_startPosition
Start position of actual data in the buffer (after header, if any)
virtual bool IsValid() const
Returns true if the archive is in valid state and internal position cursor has not reached end of arc...
const quint8 * m_bufferPtr
Pointer to the memory buffer used for reading data.
virtual void ResetPosition()
Seeks internal cursor to the begin of data.
Implementation of archive using memory buffer to store the persistent objects.
Common class for all classes which objects can be archived or restored from archive.
Contains general persistence mechanism with basic archives implementations.