CArchiveHeaderInfo.h
Go to the documentation of this file.
1 #ifndef iser_CArchiveHeaderInfo_included
2 #define iser_CArchiveHeaderInfo_included
3 
4 
5 // Qt includes
6 #include <QtCore/QMap>
7 
8 // ACF includes
9 #include <iser/IVersionInfo.h>
10 
11 
12 namespace iser
13 {
14 
15 
16 class IArchive;
17 
18 
25 class CArchiveHeaderInfo: virtual public IVersionInfo
26 {
27 public:
29  {
31  };
32 
36  void Reset();
44  bool InsertVersionId(int versionId, quint32 versionNumber, const QString& description);
49  bool RemoveVersionId(int versionId);
50 
51  bool SerializeArchiveHeader(IArchive& archive);
52  static bool WriteArchiveHeader(IArchive& archive, const IVersionInfo* versionInfoPtr);
53 
54  // reimplemented (iser::IVersionInfo)
55  virtual VersionIds GetVersionIds() const;
56  virtual bool GetVersionNumber(int versionId, quint32& result) const;
57  virtual QString GetVersionIdDescription(int versionId) const;
58  virtual QString GetEncodedVersionName(int versionId, quint32 versionNumber) const;
59 
60  // reimplemented (istd::IChangeable)
61  virtual bool CopyFrom(const istd::IChangeable& object, CompatibilityMode mode = CM_WITHOUT_REFS);
62 
63 protected:
65  {
66  quint32 versionNumber;
67  QString description;
68  };
69 
70 private:
71  typedef QMap<int, VersionIdElement> VersionElements;
72 
73  VersionElements m_versionIdList;
74 };
75 
76 
77 } // namespace iser
78 
79 
80 #endif // !iser_CArchiveHeaderInfo_included
81 
82 
QSet< int > VersionIds
Definition: IVersionInfo.h:45
Represents functions related to ACF header.
External references are simple ignored.
Definition: IChangeable.h:197
CompatibilityMode
Control how relationship betweeen objects are interpreted.
Definition: IChangeable.h:186
void Reset()
Remove all stored version infos.
bool InsertVersionId(int versionId, quint32 versionNumber, const QString &description)
Insert new version id with its actual version number and its description.
Provides access to version information.
Definition: IVersionInfo.h:22
bool SerializeArchiveHeader(IArchive &archive)
virtual QString GetVersionIdDescription(int versionId) const
Get description of version ID.
virtual bool GetVersionNumber(int versionId, quint32 &result) const
Get version of archived stream for specific versioning type.
Represent input/output persistence archive.
Definition: IArchive.h:30
Common interface for data model objects, which can be changed.
Definition: IChangeable.h:24
static bool WriteArchiveHeader(IArchive &archive, const IVersionInfo *versionInfoPtr)
virtual bool CopyFrom(const istd::IChangeable &object, CompatibilityMode mode=CM_WITHOUT_REFS)
Copy this object from another one.
bool RemoveVersionId(int versionId)
Remove single version info.
virtual QString GetEncodedVersionName(int versionId, quint32 versionNumber) const
Encode version number to human readable form.
virtual VersionIds GetVersionIds() const
Get list of version ID's.

© 2007-2017 Witold Gantzke and Kirill Lepskiy