VersionInformation provides version information about a specific instance, for example a plugin. More...
#include <VersionInformation.h>
Public Member Functions | |
| void | addSupportedVersion (const VersionNumber &version_number) |
| Adds a version number to the list of supported version. | |
| bool | hasSupportedVersions () const |
| Indicates if supported versions are available. | |
| bool | isSupportedVersion (const VersionNumber &version_number) const |
| Indicates if a specific version number is supported by this VersionInformation object. | |
| bool | isSupportedVersion (const QString &version_string, const QString &seperator=".") const |
| Indicates if a specific version number is supported by this VersionInformation object by providing a version string. | |
| VersionInformation & | operator<< (const VersionNumber &version_number) |
| Overload << operator so more supported versions can be streamed easily. | |
| QList< VersionNumber > | supportedVersions () const |
| Returns the supported versions by this version. | |
| QStringList | supportedVersionString () const |
| Returns a QStringList with the string representations of all supported versions. | |
| VersionNumber | version () const |
| Returns the current version. | |
VersionInformation provides version information about a specific instance, for example a plugin.
The goal of VersionInformation is to design a lightweigth class which can be used to specify version related information easier.
For example we can create information about a specific version, say v1.0.3 like this:
A range of functions are provided to work with supported versions: hasSupportedVersion(), addSupportedVersion(), isSupportedVersion() etc. The Qtilities::ExtensionSystem::Intefaces::IPlugin interface is a practical example where VersionInformation is used in the way shown above.
This class was added in Qtilities v1.0.
| bool Qtilities::Core::VersionInformation::isSupportedVersion | ( | const QString & | version_string, |
| const QString & | seperator = "." |
||
| ) | const |
Indicates if a specific version number is supported by this VersionInformation object by providing a version string.
This function will construct a VersionNumber object from the string and check if it is supported.
| Qtilities : Reference Documentation | Back to top |
Copyright © 2009-2013, Jaco Naudé
|