CWriteArchiveBase.h
Go to the documentation of this file.
1 #ifndef iser_CWriteArchiveBase_included
2 #define iser_CWriteArchiveBase_included
3 
4 
5 // ACF includes
6 #include <iser/IVersionInfo.h>
7 #include <iser/CArchiveBase.h>
8 
9 
10 namespace iser
11 {
12 
13 
20 {
21 public:
22  // reimplemented (iser::IArchive)
23  virtual bool IsStoring() const;
24  virtual const IVersionInfo& GetVersionInfo() const;
25  virtual bool ProcessBits(void* dataPtr, int bitsCount, int bytesCount);
26 
27 protected:
33  explicit CWriteArchiveBase(const IVersionInfo* versionInfoPtr);
34 
39  bool SerializeAcfHeader();
40 
41  class EmptyVersionInfo: virtual public IVersionInfo
42  {
43  public:
44  // reimplemented (iser::IVersionInfo)
45  virtual bool GetVersionNumber(int versionId, quint32& result) const;
46  virtual QString GetVersionIdDescription(int versionId) const;
47  virtual VersionIds GetVersionIds() const;
48  virtual QString GetEncodedVersionName(int versionId, quint32 versionNumber) const;
49  };
50 
51 private:
52  const IVersionInfo* m_versionInfoPtr;
53 
54  // static attributes
55  static EmptyVersionInfo s_emptyVersionInfo;
56 };
57 
58 
59 } // namespace iser
60 
61 
62 #endif // !iser_CWriteArchiveBase_included
63 
64 
QSet< int > VersionIds
Definition: IVersionInfo.h:45
CWriteArchiveBase(const IVersionInfo *versionInfoPtr)
Constructor.
Provides access to version information.
Definition: IVersionInfo.h:22
virtual VersionIds GetVersionIds() const
Get list of version ID's.
virtual bool ProcessBits(void *dataPtr, int bitsCount, int bytesCount)
Process binary data block.
virtual bool GetVersionNumber(int versionId, quint32 &result) const
Get version of archived stream for specific versioning type.
virtual bool IsStoring() const
Check if this archive is loading or storing.
Basic implementation of an abstract archive for data writting.
Base implementation of iser::IArchive interface.
Definition: CArchiveBase.h:20
virtual QString GetVersionIdDescription(int versionId) const
Get description of version ID.
virtual const IVersionInfo & GetVersionInfo() const
Get version of archived stream for specific versioning type.
virtual QString GetEncodedVersionName(int versionId, quint32 versionNumber) const
Encode version number to human readable form.
bool SerializeAcfHeader()
Serialize standard header.

© 2007-2017 Witold Gantzke and Kirill Lepskiy