CVersionInfoComp.h
Go to the documentation of this file.
1 #ifndef ibase_CVersionInfoComp_included
2 #define ibase_CVersionInfoComp_included
3 
4 
5 // ACF includes
6 #include <iser/IVersionInfo.h>
7 #include <icomp/CComponentBase.h>
8 
9 
10 namespace ibase
11 {
12 
13 
18 {
19 public:
21 
22  I_BEGIN_COMPONENT(CVersionInfoComp);
23  I_REGISTER_INTERFACE(iser::IVersionInfo);
24  I_ASSIGN(m_versionIdAttrPtr, "VersionId", "Version ID", false, 1024);
25  I_ASSIGN(m_versionNumberAttrPtr, "VersionNumber", "Current version number for VersionId", true, 0);
26  I_ASSIGN(m_versionIdDescriptionAttrPtr, "VersionIdDesc", "Descriptions of version ID's", true, "User Version");
27  I_ASSIGN_MULTI_0(m_knownVersionsAttrPtr, "KnownVersions", "Version numbers for known versions", false);
28  I_ASSIGN_MULTI_0(m_knownVersionNamesAttrPtr, "KnownVersionNames", "Names of known versions", false);
29  I_ASSIGN(m_isExtensionUsedAttrPtr, "IsExtensionUsed", "Enable using of automatic calculated minor version information at the end of encoded version string", true, true);
30  I_ASSIGN(m_slaveVersionInfoCompPtr, "SlaveVersionInfo", "Slave version info, unknown version information requests will be delegated here", false, "SlaveVersionInfo");
31  I_END_COMPONENT;
32 
33  // reimplemented (iser::IVersionInfo)
34  virtual bool GetVersionNumber(int versionId, quint32& result) const;
35  virtual QString GetVersionIdDescription(int versionId) const;
36  virtual VersionIds GetVersionIds() const;
37  virtual QString GetEncodedVersionName(int versionId, quint32 versionNumber) const;
38 
39 private:
40  I_ATTR(int, m_versionIdAttrPtr);
41  I_ATTR(int, m_versionNumberAttrPtr);
42  I_TEXTATTR(m_versionIdDescriptionAttrPtr);
43  I_MULTIATTR(int, m_knownVersionsAttrPtr);
44  I_MULTIATTR(QString, m_knownVersionNamesAttrPtr);
45  I_ATTR(bool, m_isExtensionUsedAttrPtr);
46 
47  I_REF(iser::IVersionInfo, m_slaveVersionInfoCompPtr);
48 };
49 
50 
51 } // namespace ibase
52 
53 
54 #endif // !ibase_CVersionInfoComp_included
55 
56 
QSet< int > VersionIds
Definition: IVersionInfo.h:45
Component for providing of version information.
icomp::CComponentBase BaseClass
Provides access to version information.
Definition: IVersionInfo.h:22
virtual QString GetVersionIdDescription(int versionId) const
Get description of version ID.
Base class for component implementation.
virtual QString GetEncodedVersionName(int versionId, quint32 versionNumber) const
Encode version number to human readable form.
virtual bool GetVersionNumber(int versionId, quint32 &result) const
Get version of archived stream for specific versioning type.
virtual VersionIds GetVersionIds() const
Get list of version ID's.

© 2007-2017 Witold Gantzke and Kirill Lepskiy