IArchive.h
Go to the documentation of this file.
1 #ifndef iser_IArchive_included
2 #define iser_IArchive_included
3 
4 
5 // Qt includes
6 #include <QtCore/QByteArray>
7 
8 // Qt includes
9 #include <QtCore/QString>
10 
11 
12 // ACF includes
13 #include <istd/IPolymorphic.h>
14 
15 
16 namespace iser
17 {
18 
19 
20 class IVersionInfo;
21 class CArchiveTag;
22 
23 
30 class IArchive: virtual public istd::IPolymorphic
31 {
32 public:
33  enum MessageId
34  {
35  MI_TAG_ERROR = 0x3f320a0,
37  };
38 
42  virtual bool IsStoring() const = 0;
43 
48  virtual bool IsTagSkippingSupported() const = 0;
49 
56  virtual const IVersionInfo& GetVersionInfo() const = 0;
57 
63  virtual bool BeginTag(const CArchiveTag& tag) = 0;
64 
76  virtual bool BeginMultiTag(const CArchiveTag& tag, const CArchiveTag& subTag, int& count) = 0;
77 
84  virtual bool EndTag(const CArchiveTag& tag) = 0;
85 
89  virtual bool Process(bool& value) = 0;
90 
94  virtual bool Process(char& value) = 0;
95 
99  virtual bool Process(quint8& value) = 0;
100 
104  virtual bool Process(qint8& value) = 0;
105 
109  virtual bool Process(quint16& value) = 0;
110 
114  virtual bool Process(qint16& value) = 0;
115 
119  virtual bool Process(quint32& value) = 0;
120 
124  virtual bool Process(qint32& value) = 0;
125 
129  virtual bool Process(quint64& value) = 0;
130 
134  virtual bool Process(qint64& value) = 0;
135 
139  virtual bool Process(float& value) = 0;
140 
144  virtual bool Process(double& value) = 0;
145 
149  virtual bool Process(QByteArray& value) = 0;
150 
154  virtual bool Process(QString& value) = 0;
155 
161  virtual bool ProcessData(void* dataPtr, int size) = 0;
162 
169  virtual bool ProcessBits(void* dataPtr, int bitsCount, int bytesCount) = 0;
170 };
171 
172 
173 } // namespace iser
174 
175 
176 #endif // !iser_IArchive_included
177 
Provides access to version information.
Definition: IVersionInfo.h:22
virtual bool IsStoring() const =0
Check if this archive is loading or storing.
virtual bool Process(bool &value)=0
Process primitive type.
virtual bool ProcessBits(void *dataPtr, int bitsCount, int bytesCount)=0
Process binary data block.
virtual bool BeginTag(const CArchiveTag &tag)=0
Begin of archive tag.
virtual bool BeginMultiTag(const CArchiveTag &tag, const CArchiveTag &subTag, int &count)=0
Begin of archive tag containing set of subelements of the same type.
Represent input/output persistence archive.
Definition: IArchive.h:30
Base interface for all used interfaces and implementations.
Definition: IPolymorphic.h:17
virtual const IVersionInfo & GetVersionInfo() const =0
Get version of archived stream for specific versioning type.
virtual bool ProcessData(void *dataPtr, int size)=0
Process binary data block.
Process tag used to group data in archive stream.
Definition: CArchiveTag.h:21
virtual bool EndTag(const CArchiveTag &tag)=0
End of archive tag.
virtual bool IsTagSkippingSupported() const =0
Check if skiping to the end of tag on EndTag is supported.

© 2007-2017 Witold Gantzke and Kirill Lepskiy