#include <VersionInformation.h>
Public Types | |
| typedef boost::uintmax_t | VersionNumber |
Public Member Functions | |
| VersionInformation (VersionNumber const majorVersion, VersionNumber const minorVersion, VersionNumber const maintenanceVersion, std::string const buildType="") | |
| VersionInformation (VersionNumber const majorVersion, VersionNumber const minorVersion, VersionNumber const maintenanceVersion, VersionNumber const revisionVersion, std::string const buildType="") | |
| VersionNumber const | getMajorVersion () const |
| VersionNumber const | getMinorVersion () const |
| VersionNumber const | getMaintenanceVersion () const |
| VersionNumber const | getRevisionNumber () const |
| std::string const & | getBuildType () const |
| void | setMajorVersion (VersionNumber const versionNumber) |
| Sets the major version number. | |
| void | setMinorVersion (VersionNumber const versionNumber) |
| Sets the minor version number. | |
| void | setMaintenanceVersion (VersionNumber const versionNumber) |
| Sets the maintenance version number. | |
| void | setRevisionNumber (VersionNumber const versionNumber) |
| Sets the revision number. | |
| void | setBuildType (std::string const &buildType) |
| Sets the build type. | |
| bool const | operator== (VersionInformation const &other) const |
| Tests if two versions are equal by checking each version number and the build type. | |
| bool const | operator!= (VersionInformation const &other) const |
| Tests if two versions are not equal by checking each version number and the build type. | |
| bool const | operator< (VersionInformation const &other) const |
| Tests if a version is less than another version. | |
| bool const | operator<= (VersionInformation const &other) const |
| Tests if a version is less than or equal to another version. | |
| bool const | operator> (VersionInformation const &other) const |
| Tests if a version is greater than another version. | |
| bool const | operator>= (VersionInformation const &other) const |
| Tests if a version is greater than or equal to another version. | |
| VersionInformation & | operator= (VersionInformation const &other) |
Copies over all version information from other such that the two object will be equal when compared. | |
| std::string const | getVersionString (bool const useRevisionNumber=false) const |
Static Public Attributes | |
| static std::string const | BT_ALPHA |
| Default build type string for alpha builds. Defaults to "alpha". | |
| static std::string const | BT_BETA |
| Default build type string for beta builds. Defaults to "beta". | |
| static std::string const | BT_RELEASE_CANDIDATE |
| Default build type string for release candidate builds. Defaults to "rc". | |
| static std::string const | BT_RELEASE |
| Default build type string for final builds. Defaults to "". | |
VersionInformation object can be compared using the standard comparison operators.
When checked for equality, all four of the version numbers and the build type must match to be considered equal.
A VersionInformation object is considered less than another VersionInformation object if any of the following conditions are true.
Note that the build type is not compared in the list above. This is because only the user of the class knows how to compare build types, since they can be customized.
| typedef boost::uintmax_t PWToolBox::VersionInformation::VersionNumber |
| PWToolBox::VersionInformation::VersionInformation | ( | VersionNumber const | majorVersion, | |
| VersionNumber const | minorVersion, | |||
| VersionNumber const | maintenanceVersion, | |||
| std::string const | buildType = "" | |||
| ) | [inline] |
This version of the constructor sets the revision version to 0.
| majorVersion | The major version number | |
| minorVersion | The minor version number | |
| maintenanceVersion | The maintenance version number | |
| buildType | The build type - the additional version number should be specified as part of this parameter |
| PWToolBox::VersionInformation::VersionInformation | ( | VersionNumber const | majorVersion, | |
| VersionNumber const | minorVersion, | |||
| VersionNumber const | maintenanceVersion, | |||
| VersionNumber const | revisionVersion, | |||
| std::string const | buildType = "" | |||
| ) | [inline] |
| majorVersion | The major version number | |
| minorVersion | The minor version number | |
| maintenanceVersion | The maintenance version number | |
| revisionVersion | The revision version number | |
| buildType | The build type - the additional version number should be specified as part of this parameter |
| VersionNumber const PWToolBox::VersionInformation::getMajorVersion | ( | ) | const [inline] |
| VersionNumber const PWToolBox::VersionInformation::getMinorVersion | ( | ) | const [inline] |
| VersionNumber const PWToolBox::VersionInformation::getMaintenanceVersion | ( | ) | const [inline] |
| VersionNumber const PWToolBox::VersionInformation::getRevisionNumber | ( | ) | const [inline] |
| std::string const& PWToolBox::VersionInformation::getBuildType | ( | ) | const [inline] |
| void PWToolBox::VersionInformation::setMajorVersion | ( | VersionNumber const | versionNumber | ) | [inline] |
Sets the major version number.
| versionNumber | The major version number |
| void PWToolBox::VersionInformation::setMinorVersion | ( | VersionNumber const | versionNumber | ) | [inline] |
Sets the minor version number.
| versionNumber | The minor version number |
| void PWToolBox::VersionInformation::setMaintenanceVersion | ( | VersionNumber const | versionNumber | ) | [inline] |
Sets the maintenance version number.
| versionNumber | The maintenance version number |
| void PWToolBox::VersionInformation::setRevisionNumber | ( | VersionNumber const | versionNumber | ) | [inline] |
Sets the revision number.
| versionNumber | The revision version number |
| void PWToolBox::VersionInformation::setBuildType | ( | std::string const & | buildType | ) | [inline] |
Sets the build type.
| buildType | A string containing additional information about the build type, such as "alpha", "beta", "rc", or "". |
| bool const PWToolBox::VersionInformation::operator== | ( | VersionInformation const & | other | ) | const [inline] |
Tests if two versions are equal by checking each version number and the build type.
| other | The version to check for equality with. |
true if this is equal to other | bool const PWToolBox::VersionInformation::operator!= | ( | VersionInformation const & | other | ) | const [inline] |
Tests if two versions are not equal by checking each version number and the build type.
| other | The version to check for non-equality with. |
true if this is not equal to other | bool const PWToolBox::VersionInformation::operator< | ( | VersionInformation const & | other | ) | const [inline] |
Tests if a version is less than another version.
| other | The version to check for less-than with. |
true if this is less than other | bool const PWToolBox::VersionInformation::operator<= | ( | VersionInformation const & | other | ) | const [inline] |
Tests if a version is less than or equal to another version.
| other | The version to check for <= with. |
true if this is less than other | bool const PWToolBox::VersionInformation::operator> | ( | VersionInformation const & | other | ) | const [inline] |
Tests if a version is greater than another version.
| other | The version to check for greater-than with. |
true if this is greater than other | bool const PWToolBox::VersionInformation::operator>= | ( | VersionInformation const & | other | ) | const [inline] |
Tests if a version is greater than or equal to another version.
| other | The version to check for >= with. |
true if this is greater than or equal to other | VersionInformation& PWToolBox::VersionInformation::operator= | ( | VersionInformation const & | other | ) | [inline] |
Copies over all version information from other such that the two object will be equal when compared.
| other | The VersionInformation to copy |
this | std::string const PWToolBox::VersionInformation::getVersionString | ( | bool const | useRevisionNumber = false |
) | const |
| useRevisionNumber | If true, the revision version will be included in the string. |
std::string const PWToolBox::VersionInformation::BT_ALPHA [static] |
Default build type string for alpha builds. Defaults to "alpha".
std::string const PWToolBox::VersionInformation::BT_BETA [static] |
Default build type string for beta builds. Defaults to "beta".
std::string const PWToolBox::VersionInformation::BT_RELEASE_CANDIDATE [static] |
Default build type string for release candidate builds. Defaults to "rc".
std::string const PWToolBox::VersionInformation::BT_RELEASE [static] |
Default build type string for final builds. Defaults to "".
1.5.1