#include <Version.h>
Public Types | |
enum | EVersionQuality { QUALITY_DEV, QUALITY_ALPHA, QUALITY_BETA, QUALITY_RELEASE_CANDIDATE, QUALITY_GAMMA = QUALITY_RELEASE_CANDIDATE, QUALITY_STABLE, MAX_QUALITY } |
Quality information on the version (alpha, beta, RC...). More... | |
Public Member Functions | |
Version (UINT majorNumber=0, UINT minorNumber=0, UINT revision=0, UINT build=0, EVersionQuality quality=QUALITY_STABLE) | |
Version (const Version &v) | |
Version (const std::string &str) | |
Constructs a Version object direclty from a string reprenstation (using fromString()). | |
std::string | toString () const |
Writes a string representation of the version. | |
std::string | toShortString () const |
Writes a string representation of the version, limited to 2 numbers. | |
bool | fromString (const std::string &str) |
Parses a version text like "1.0.1.23" and stores the result into version array {1, 0, 1, 23}. | |
void | reset () |
Sets the version to be "0.0.0.0" and QUALITY_STABLE. | |
Version & | operator= (const Version &v) |
bool | operator== (const Version &v) const |
Equality does not test quality . | |
bool | operator< (const Version &v) const |
Less-than does not test quality . | |
Public Attributes | |
UINT | majorNumber |
Major (first) version number. | |
UINT | minorNumber |
Minor (second) version number. | |
UINT | revision |
Revision (third) number. | |
UINT | build |
Build (fourth) number. | |
EVersionQuality | quality |
Quality indicator. |
Definition at line 39 of file Version.h.
Version::Version | ( | UINT | majorNumber = 0 , |
|
UINT | minorNumber = 0 , |
|||
UINT | revision = 0 , |
|||
UINT | build = 0 , |
|||
EVersionQuality | quality = QUALITY_STABLE | |||
) | [inline] |
Version::Version | ( | const std::string & | str | ) | [inline] |
Constructs a Version object direclty from a string reprenstation (using fromString()).
bool Version::fromString | ( | const std::string & | str | ) |
Parses a version text like "1.0.1.23" and stores the result into version
array {1, 0, 1, 23}.
true
if parsing succeded. Definition at line 69 of file Version.cpp.
References build, majorNumber, minorNumber, reset(), and revision.
bool Version::operator< | ( | const Version & | v | ) | const [inline] |
Less-than does not test quality
.
Definition at line 82 of file Version.h.
References build, majorNumber, minorNumber, and revision.
Definition at line 71 of file Version.h.
References build, majorNumber, minorNumber, quality, and revision.
bool Version::operator== | ( | const Version & | v | ) | const [inline] |
Equality does not test quality
.
Definition at line 80 of file Version.h.
References build, majorNumber, minorNumber, and revision.
void Version::reset | ( | ) | [inline] |
Sets the version to be "0.0.0.0" and QUALITY_STABLE.
Definition at line 69 of file Version.h.
Referenced by fromString().
std::string Version::toShortString | ( | ) | const |
Writes a string representation of the version, limited to 2 numbers.
Definition at line 65 of file Version.cpp.
References format_str, majorNumber, minorNumber, quality, and VERSION_QUALITY_SHORT_STRS.
std::string Version::toString | ( | ) | const |
Writes a string representation of the version.
Definition at line 61 of file Version.cpp.
References build, format_str, majorNumber, minorNumber, quality, revision, and VERSION_QUALITY_SHORT_STRS.
Build (fourth) number.
Definition at line 92 of file Version.h.
Referenced by fromString(), operator<(), operator=(), operator==(), and toString().
Major (first) version number.
Definition at line 89 of file Version.h.
Referenced by fromString(), operator<(), operator=(), operator==(), toShortString(), and toString().
Minor (second) version number.
Definition at line 90 of file Version.h.
Referenced by fromString(), operator<(), operator=(), operator==(), toShortString(), and toString().
Quality indicator.
Definition at line 94 of file Version.h.
Referenced by operator=(), toShortString(), and toString().
Revision (third) number.
Definition at line 91 of file Version.h.
Referenced by fromString(), operator<(), operator=(), operator==(), and toString().