ACF $AcfVersion:0$
CBitMemoryReadArchive.h
Go to the documentation of this file.
1// SPDX-License-Identifier: LGPL-2.1-or-later OR GPL-2.0-or-later OR GPL-3.0-or-later OR LicenseRef-ACF-Commercial
2#pragma once
3
4
5// Qt includes
6#include <QtCore/QVector>
7
8// ACF includes
10
11
12namespace iser
13{
14
15
22{
23public:
25
29 CBitMemoryReadArchive(const QVector<quint8>& data, bool serializeHeader = true);
30
32 const void* bufferPtr,
33 int bufferSize,
34 bool serializeHeader = true);
35
37 const CMemoryWriteArchive& writeArchive,
38 bool serializeHeader = true);
39
43 virtual quint32 ReadValue(int bits);
44
45 // reimplemented (iser::IArchive)
46 virtual bool ProcessData(void* data, int size) override;
47 virtual bool ProcessBits(void* dataPtr, int bitsCount, int bytesCount) override;
48
49 // reimplemented (iser::CMemoryReadArchive)
50 virtual void ResetPosition() override;
51 virtual bool IsValid() const override;
52
53protected:
55};
56
57
58
59} // namespace iser
60
61
62
This class provides bitwise access to the byte data.
virtual bool ProcessBits(void *dataPtr, int bitsCount, int bytesCount) override
Process binary data block.
virtual bool IsValid() const override
Returns true if the archive is in valid state and internal position cursor has not reached end of arc...
CBitMemoryReadArchive(const CMemoryWriteArchive &writeArchive, bool serializeHeader=true)
CBitMemoryReadArchive(const void *bufferPtr, int bufferSize, bool serializeHeader=true)
virtual quint32 ReadValue(int bits)
Gets the value of the next bits in the stream.
CBitMemoryReadArchive(const QVector< quint8 > &data, bool serializeHeader=true)
Constructs a bit stream from a vector of bytes.
virtual bool ProcessData(void *data, int size) override
Process binary data block.
virtual void ResetPosition() override
Seeks internal cursor to the begin of data.
Implementation of archive using memory buffer to read the persistent objects.
Implementation of archive using memory buffer to store the persistent objects.
Contains general persistence mechanism with basic archives implementations.