CBitMemoryReadArchive.h
Go to the documentation of this file.
1 #ifndef iser_CBitMemoryReadArchive_included
2 #define iser_CBitMemoryReadArchive_included
3 
4 
5 // Qt includes
6 #include <QtCore/QVector>
7 
8 // ACF includes
10 
11 
12 namespace iser
13 {
14 
15 
22 {
23 public:
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);
47  virtual bool ProcessBits(void* dataPtr, int bitsCount, int bytesCount);
48 
49  // reimplemented (iser::CMemoryReadArchive)
50  virtual void ResetPosition();
51  virtual bool IsValid() const;
52 
53 protected:
55 };
56 
57 
58 
59 } // namespace iser
60 
61 
62 #endif // !iser_CBitMemoryReadArchive_included
63 
virtual bool ProcessData(void *data, int size)
Process binary data block.
CBitMemoryReadArchive(const QVector< quint8 > &data, bool serializeHeader=true)
Constructs a bit stream from a vector of bytes.
virtual bool IsValid() const
Returns true if the archive is in valid state and internal position cursor has not reached end of arc...
virtual quint32 ReadValue(int bits)
Gets the value of the next bits in the stream.
Implementation of archive using memory buffer to read the persistent objects.
virtual bool ProcessBits(void *dataPtr, int bitsCount, int bytesCount)
Process binary data block.
virtual void ResetPosition()
Seeks internal cursor to the begin of data.
This class provides bitwise access to the byte data.
Implementation of archive using memory buffer to store the persistent objects.

© 2007-2017 Witold Gantzke and Kirill Lepskiy