#include <VersionNumber.hpp>
◆ VersionNumber() [1/8]
Vsdk::Utils::VersionNumber::VersionNumber |
( |
| ) |
|
|
defaultnoexcept |
◆ VersionNumber() [2/8]
VersionNumber::VersionNumber |
( |
int |
major, |
|
|
std::string const & |
suffix = "" |
|
) |
| |
◆ VersionNumber() [3/8]
VersionNumber::VersionNumber |
( |
int |
major, |
|
|
int |
minor, |
|
|
std::string const & |
suffix = "" |
|
) |
| |
◆ VersionNumber() [4/8]
VersionNumber::VersionNumber |
( |
int |
major, |
|
|
int |
minor, |
|
|
int |
micro, |
|
|
std::string const & |
suffix = "" |
|
) |
| |
◆ VersionNumber() [5/8]
VersionNumber::VersionNumber |
( |
std::initializer_list< int > |
args, |
|
|
std::string const & |
suffix = "" |
|
) |
| |
◆ VersionNumber() [6/8]
VersionNumber::VersionNumber |
( |
std::vector< int > |
segments, |
|
|
std::string const & |
suffix = "" |
|
) |
| |
|
explicit |
◆ VersionNumber() [7/8]
VersionNumber::VersionNumber |
( |
std::string const & |
str | ) |
|
◆ VersionNumber() [8/8]
VersionNumber::VersionNumber |
( |
const char * |
str | ) |
|
◆ isNormalized()
bool VersionNumber::isNormalized |
( |
| ) |
const |
◆ isNull()
bool VersionNumber::isNull |
( |
| ) |
const |
◆ isPrefixOf()
bool VersionNumber::isPrefixOf |
( |
VersionNumber const & |
other | ) |
const |
Returns true if the current version number is contained in the other version number, otherwise returns false.
◆ majorVersion()
int VersionNumber::majorVersion |
( |
| ) |
const |
◆ minorVersion()
int VersionNumber::minorVersion |
( |
| ) |
const |
◆ microVersion()
int VersionNumber::microVersion |
( |
| ) |
const |
◆ suffix()
auto VersionNumber::suffix |
( |
| ) |
const -> std::string |
◆ normalized()
Returns an equivalent version number but with all trailing zeros removed.
To check if two numbers are equivalent, use normalized() on both version numbers before performing the compare.
◆ segmentAt()
int VersionNumber::segmentAt |
( |
int |
index | ) |
const |
◆ segmentCount()
int VersionNumber::segmentCount |
( |
| ) |
const |
◆ segments()
auto VersionNumber::segments |
( |
| ) |
const -> std::vector<int> const & |
◆ toString()
auto VersionNumber::toString |
( |
bool |
withSuffix = false | ) |
const -> std::string |
◆ commonPrefix()
◆ compare()
Compares v1 with v2 and returns an integer less than, equal to, or greater than zero, depending on whether v1 is less than, equal to, or greater than v2, respectively.
Comparisons are performed by comparing the segments of v1 and v2 starting at index 0 and working towards the end of the longer list.
◆ fromString()
auto VersionNumber::fromString |
( |
std::string const & |
str | ) |
-> VersionNumber |
|
static |