Compliant to semver.
More...
|
| Version () |
|
| Version (int32_t major, int32_t minor, int32_t patch, const char *preRelease, const char *build=nullptr) |
|
| Version (int32_t major, int32_t minor, int32_t patch, const std::string &preRelease="", const std::string &build="") |
|
| Version (const char *str) |
|
| Version (const std::string &str) |
|
void | set (int32_t major, int32_t minor, int32_t patch, const char *preRelease, const char *build=nullptr) |
|
void | set (int32_t major, int32_t minor, int32_t patch, const std::string &preRelease="", const std::string &build="") |
|
void | set (const char *str) |
|
void | set (const std::string &str) |
|
int32_t | major () const |
|
int32_t | minor () const |
|
int32_t | patch () const |
|
omw::string | preRelease () const |
|
const omw::stringVector_t & | preReleaseIdentifiers () const |
|
omw::string | build () const |
|
const omw::stringVector_t & | buildIdentifiers () const |
|
int | compare (const omw::Version &b) const |
|
omw::string | toString () const |
|
bool | hasBuild () const |
|
bool | isPreRelease () const |
|
bool | isValid () const |
|
|
int32_t | m_maj |
|
int32_t | m_min |
|
int32_t | m_pat |
|
omw::stringVector_t | m_preRelease |
|
omw::stringVector_t | m_build |
|
Compliant to semver.
#include <omw/version.h>
Compliant to Semantic Versioning 2.0.0.
◆ Version()
omw::Version::Version |
( |
| ) |
|
Creates an object with version 0.0.0
.
◆ compare()
Compares according to the semver rules.
Result | Return Value |
*this < b | <0 |
*this == b | 0 |
*this > b | >0 |
◆ hasBuild()
bool omw::Version::hasBuild |
( |
| ) |
const |
Returns true
if the version has build identifiers, otherwise false
.
◆ isPreRelease()
bool omw::Version::isPreRelease |
( |
| ) |
const |
Returns true
if the version has pre-release identifiers, otherwise false
.
◆ isValid()
bool omw::Version::isValid |
( |
| ) |
const |
Checks if the member values are compliant to semver. See omw::Version
.
The documentation for this class was generated from the following files: