All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Pages
Public Member Functions
Qtilities::Core::VersionInformation Class Reference

VersionInformation provides version information about a specific instance, for example a plugin. More...

#include <VersionInformation.h>

List of all members.

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.
VersionInformationoperator<< (const VersionNumber &version_number)
 Overload << operator so more supported versions can be streamed easily.
QList< VersionNumbersupportedVersions () 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.

Detailed Description

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:

VersionInformation version_info(1,0,3);
// We can now add versions that this version depend on. For exmaple if you have
// a plugin that depends on a specific version of an application, say v2.0.0, its specified like this:
version_info << VersionNumber(2,0,0);

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.

See also:
VersionNumber

This class was added in Qtilities v1.0.


Member Function Documentation

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é