Quark
0.1
|
A class representing an interface version number. More...
#include <Version.h++>
Public Member Functions | |
Version (const QString &version) | |
Constructs a new Version from the specified string representation. More... | |
Version (uint current=0, uint revision=0, uint age=0) | |
Constructs a new Version for the given components. More... | |
Version (const Version &other) | |
Copy constructor. More... | |
~Version () | |
Destructor. More... | |
bool | satisfies (const Version &requested) const |
Determines if an interface with this version satisfies a request for an interface with a specific requested version (i.e., if it is API-compatible with the requested interface). More... | |
bool | satisfiedBy (const Version &available) const |
Determines if a requested interface with this version is satisfied by a specific available version (i.e., if the available interface is API-compatible with the requested version of the interface). More... | |
uint | current () const |
Returns the current component of the version. More... | |
uint | revision () const |
Returns the revision component of the version. More... | |
uint | age () const |
Returns the age component of the version. More... | |
void | interfacesAdded () |
Adjusts the version to reflect the addition of new interfaces. More... | |
void | interfacesRemoved () |
Adjusts the version to reflect the removal of existing interfaces. More... | |
void | interfacesChanged () |
Adjusts the version to reflect non-backward-compatible changes to the interfaces. More... | |
void | implementationChanged () |
Adjusts the version to reflect internal implementation changes. More... | |
QString | toString () const |
Returns a string representation of the version, in C-A.A.R form. More... | |
QString | toCRAString () const |
Returns a string representation of the version, in C:R:A form. More... | |
bool | fromString (const QString &version) |
Parses the verison from a string. More... | |
bool | operator== (const Version &other) const |
Equality operator. More... | |
bool | operator!= (const Version &other) const |
Inequality operator. More... | |
bool | operator< (const Version &other) const |
Determines if this Version is older than another version. More... | |
bool | operator<= (const Version &other) const |
Determines if this Version is older than or equal to another version. More... | |
bool | operator> (const Version &other) const |
Determines if this Version is newer than another version. More... | |
bool | operator>= (const Version &other) const |
Determines if this Version is newer than or equal to another version. More... | |
Version & | operator= (const Version &other) |
Assignment operator. More... | |
A class representing an interface version number.
The version number consists of three components:
These three components are not to be interpreted as major version, minor version, and build number.
A version begins at 0:0:0. The version number changes according to the following rules:
Version | ( | const QString & | version | ) |
Constructs a new Version from the specified string representation.
version | The string representation of a version, in the form C:R:A or C-A.A.R. For example, 9:0:6 and 3.6.0 are equivalent. |
Version | ( | uint | current = 0 , |
uint | revision = 0 , |
||
uint | age = 0 |
||
) |
Constructs a new Version for the given components.
current | The current component. |
revision | The revision component. |
age | The age component, which must always be less than or equal to current; if an invalid age is specified, the value of current is used for age. |
~Version | ( | ) |
Destructor.
|
inline |
Returns the age component of the version.
|
inline |
Returns the current component of the version.
bool fromString | ( | const QString & | version | ) |
Parses the verison from a string.
void implementationChanged | ( | ) |
Adjusts the version to reflect internal implementation changes.
void interfacesAdded | ( | ) |
Adjusts the version to reflect the addition of new interfaces.
void interfacesChanged | ( | ) |
Adjusts the version to reflect non-backward-compatible changes to the interfaces.
void interfacesRemoved | ( | ) |
Adjusts the version to reflect the removal of existing interfaces.
|
inline |
Inequality operator.
bool operator< | ( | const Version & | other | ) | const |
Determines if this Version is older than another version.
|
inline |
Determines if this Version is older than or equal to another version.
bool operator== | ( | const Version & | other | ) | const |
Equality operator.
bool operator> | ( | const Version & | other | ) | const |
Determines if this Version is newer than another version.
|
inline |
Determines if this Version is newer than or equal to another version.
|
inline |
Returns the revision component of the version.
bool satisfiedBy | ( | const Version & | available | ) | const |
Determines if a requested interface with this version is satisfied by a specific available version (i.e., if the available interface is API-compatible with the requested version of the interface).
available | The version that is available. |
bool satisfies | ( | const Version & | requested | ) | const |
Determines if an interface with this version satisfies a request for an interface with a specific requested version (i.e., if it is API-compatible with the requested interface).
requested | The requested version. |
QString toCRAString | ( | ) | const |
Returns a string representation of the version, in C:R:A form.
QString toString | ( | ) | const |
Returns a string representation of the version, in C-A.A.R form.