version class
More...
#include <version.hpp>
|
| Version () |
| Empty Version constructor. This will contruct a Version object having major and minor versions set to 0, no revision number and no build number. More...
|
|
| Version (const Version &o) |
|
| Version (const char *version, const char *format="%M.%m%|.%r%|.%b") |
| Parse a version string. More...
|
|
| Version (unsigned long version) |
| Build a version object from an unsigned long The format of the number is MMmmrrbbb. More...
|
|
| Version (unsigned short M, unsigned short m) |
|
| Version (unsigned short M, unsigned short m, unsigned short r) |
|
| Version (unsigned short M, unsigned short m, unsigned short r, unsigned b) |
|
unsigned short | Major () const |
| Returns the major number of the version. More...
|
|
unsigned short | Minor () const |
| Returns the minor number of the version. More...
|
|
unsigned short | Revision () const |
| Returns the revision number of the version. More...
|
|
unsigned | Build () const |
| Returns the build number of the version. More...
|
|
bool | operator== (const Version &other) const |
|
bool | operator!= (const Version &other) const |
|
bool | operator> (const Version &other) const |
|
bool | operator>= (const Version &other) const |
|
bool | operator< (const Version &other) const |
|
bool | operator<= (const Version &other) const |
|
bool | isCompatible (const Version &other) const |
|
std::string | toString () const |
| Print the version in 'major.minor.revision.build' format. More...
|
|
std::string | toString (const char *format) const |
| Print the version using custom format. More...
|
|
unsigned long | toNumber () const |
| Output the version as an unsigned long The format of the output is MMmmrrbbb. More...
|
|
_Wolframe::Version::Version |
( |
| ) |
|
|
inline |
Empty Version constructor. This will contruct a Version object having major and minor versions set to 0, no revision number and no build number.
_Wolframe::Version::Version |
( |
const Version & |
o | ) |
|
|
inline |
_Wolframe::Version::Version |
( |
const char * |
version, |
|
|
const char * |
format = "%M.%m%|.%r%|.%b" |
|
) |
| |
|
explicit |
Parse a version string.
- Parameters
-
[in] | version | the version string to parse |
[in] | format | the format string of the version:
- M = Major version
- m = Minor version
- r = revision
- b = build number
- %% = %
- %| = Accepted end of version string (if the version string ends here, the input is accepted. If not parsing is continued with the rest of the format string as pattern)
|
_Wolframe::Version::Version |
( |
unsigned long |
version | ) |
|
Build a version object from an unsigned long The format of the number is MMmmrrbbb.
_Wolframe::Version::Version |
( |
unsigned short |
M, |
|
|
unsigned short |
m |
|
) |
| |
_Wolframe::Version::Version |
( |
unsigned short |
M, |
|
|
unsigned short |
m, |
|
|
unsigned short |
r |
|
) |
| |
_Wolframe::Version::Version |
( |
unsigned short |
M, |
|
|
unsigned short |
m, |
|
|
unsigned short |
r, |
|
|
unsigned |
b |
|
) |
| |
unsigned _Wolframe::Version::Build |
( |
| ) |
const |
|
inline |
Returns the build number of the version.
bool _Wolframe::Version::isCompatible |
( |
const Version & |
other | ) |
const |
Test if the other version is compatible with this version using the usual OSS versioning schemas
unsigned short _Wolframe::Version::Major |
( |
| ) |
const |
|
inline |
Returns the major number of the version.
unsigned short _Wolframe::Version::Minor |
( |
| ) |
const |
|
inline |
Returns the minor number of the version.
bool _Wolframe::Version::operator!= |
( |
const Version & |
other | ) |
const |
|
inline |
bool _Wolframe::Version::operator< |
( |
const Version & |
other | ) |
const |
|
inline |
bool _Wolframe::Version::operator<= |
( |
const Version & |
other | ) |
const |
|
inline |
bool _Wolframe::Version::operator== |
( |
const Version & |
other | ) |
const |
bool _Wolframe::Version::operator> |
( |
const Version & |
other | ) |
const |
bool _Wolframe::Version::operator>= |
( |
const Version & |
other | ) |
const |
|
inline |
unsigned short _Wolframe::Version::Revision |
( |
| ) |
const |
|
inline |
Returns the revision number of the version.
unsigned long _Wolframe::Version::toNumber |
( |
| ) |
const |
Output the version as an unsigned long The format of the output is MMmmrrbbb.
- Note
- All numbers (major, minor...) will be cut to the 2 most significant decimal digits except for the build number which will be cut to 3 decimal digits
std::string _Wolframe::Version::toString |
( |
| ) |
const |
Print the version in 'major.minor.revision.build' format.
std::string _Wolframe::Version::toString |
( |
const char * |
format | ) |
const |
Print the version using custom format.
- Parameters
-
unsigned _Wolframe::Version::m_build |
|
private |
bool _Wolframe::Version::m_hasBuild |
|
private |
Is build number present ?
bool _Wolframe::Version::m_hasRevision |
|
private |
unsigned short _Wolframe::Version::m_major |
|
private |
unsigned short _Wolframe::Version::m_minor |
|
private |
unsigned short _Wolframe::Version::m_revision |
|
private |
The documentation for this class was generated from the following file: