Simple version number class containing a version number either being defined explicit or derived from a string.
More...
#include <VersionNumber.hpp>
|
| constexpr | VersionNumber () noexcept |
| | Default ctor for zero version.
|
| |
| constexpr | VersionNumber (const VersionNumber &) noexcept=default |
| |
| constexpr | VersionNumber (int majorRev, int minorRev, int subMinorRev) noexcept |
| | Explicit version number instantiation, with all components defined explicitly excluding git.
|
| |
| constexpr | VersionNumber (int majorRev, int minorRev, int subMinorRev, int gitCommits, uint64_t gitSSHA, bool gitDirty) noexcept |
| | Explicit version number instantiation, with all components defined explicitly including git.
|
| |
| constexpr | VersionNumber (VersionNumber &&) noexcept=default |
| |
| constexpr int | git_commits () const noexcept |
| |
| constexpr bool | git_dirty () const noexcept |
| |
| constexpr uint64_t | git_ssha () const noexcept |
| |
| constexpr bool | hasGitInfo () const noexcept |
| | Returns true, if the optional git information is defined explicitly, otherwise false.
|
| |
| constexpr std::size_t | hash () const noexcept |
| |
| constexpr bool | hasMajor () const noexcept |
| | Returns true, if the major component is defined explicitly, otherwise false.
|
| |
| constexpr bool | hasMinor () const noexcept |
| | Returns true, if the optional minor component is defined explicitly, otherwise false.
|
| |
| constexpr bool | hasSub () const noexcept |
| | Returns true, if the optional sub component is defined explicitly, otherwise false.
|
| |
| constexpr bool | isZero () const noexcept |
| | Returns true, if all version components are zero, otherwise false.
|
| |
| constexpr int | major () const noexcept |
| |
| constexpr int | minor () const noexcept |
| |
| constexpr std::strong_ordering | operator<=> (const VersionNumber &vo) const noexcept |
| | Three way std::strong_ordering comparison operator.
|
| |
| constexpr VersionNumber & | operator= (const VersionNumber &) noexcept=default |
| |
| constexpr VersionNumber & | operator= (VersionNumber &&) noexcept=default |
| |
| constexpr bool | operator== (const VersionNumber &vo) const noexcept |
| | Two way comparison operator.
|
| |
| constexpr int | sub () const noexcept |
| |
| std::string | toString () const noexcept |
| |
|
| constexpr | VersionNumber (int majorRev, int minorRev, int subMinorRev, int gitCommits, uint64_t gitSSHA, bool gitDirty, uint16_t _state) noexcept |
| |
|
| static constexpr const bool | DBG_OUT = false |
| |
| static constexpr const uint16_t | HAS_GIT_INFO = 1U << 3 |
| |
| static constexpr const uint16_t | HAS_MAJOR = 1U << 0 |
| |
| static constexpr const uint16_t | HAS_MINOR = 1U << 1 |
| |
| static constexpr const uint16_t | HAS_SUB = 1U << 2 |
| |
Simple version number class containing a version number either being defined explicit or derived from a string.
For the latter case, you can query whether a component has been defined explicitly by the given versionString, via hasMajor(), hasMinor() and hasSub().
The state whether a component is defined explicitly is not considered in the hashCode(), equals(Object) or compareTo(Object) methods, since the version number itself is treated regardless.
Definition at line 52 of file VersionNumber.hpp.
◆ VersionNumber() [1/6]
| jau::util::VersionNumber::VersionNumber |
( |
int | majorRev, |
|
|
int | minorRev, |
|
|
int | subMinorRev, |
|
|
int | gitCommits, |
|
|
uint64_t | gitSSHA, |
|
|
bool | gitDirty, |
|
|
uint16_t | _state ) |
|
inlineconstexprprotectednoexcept |
◆ VersionNumber() [2/6]
| jau::util::VersionNumber::VersionNumber |
( |
int | majorRev, |
|
|
int | minorRev, |
|
|
int | subMinorRev, |
|
|
int | gitCommits, |
|
|
uint64_t | gitSSHA, |
|
|
bool | gitDirty ) |
|
inlineconstexprnoexcept |
◆ VersionNumber() [3/6]
| jau::util::VersionNumber::VersionNumber |
( |
int | majorRev, |
|
|
int | minorRev, |
|
|
int | subMinorRev ) |
|
inlineconstexprnoexcept |
◆ VersionNumber() [4/6]
| jau::util::VersionNumber::VersionNumber |
( |
| ) |
|
|
inlineconstexprnoexcept |
◆ VersionNumber() [5/6]
| jau::util::VersionNumber::VersionNumber |
( |
const VersionNumber & | | ) |
|
|
constexprdefaultnoexcept |
◆ VersionNumber() [6/6]
◆ operator=() [1/2]
◆ operator=() [2/2]
◆ isZero()
| bool jau::util::VersionNumber::isZero |
( |
| ) |
const |
|
inlineconstexprnoexcept |
Returns true, if all version components are zero, otherwise false.
Definition at line 115 of file VersionNumber.hpp.
◆ hasMajor()
| bool jau::util::VersionNumber::hasMajor |
( |
| ) |
const |
|
inlineconstexprnoexcept |
Returns true, if the major component is defined explicitly, otherwise false.
Undefined components has the value 0.
Definition at line 120 of file VersionNumber.hpp.
◆ hasMinor()
| bool jau::util::VersionNumber::hasMinor |
( |
| ) |
const |
|
inlineconstexprnoexcept |
Returns true, if the optional minor component is defined explicitly, otherwise false.
Undefined components has the value 0.
Definition at line 122 of file VersionNumber.hpp.
◆ hasSub()
| bool jau::util::VersionNumber::hasSub |
( |
| ) |
const |
|
inlineconstexprnoexcept |
Returns true, if the optional sub component is defined explicitly, otherwise false.
Undefined components has the value 0.
Definition at line 124 of file VersionNumber.hpp.
◆ hasGitInfo()
| bool jau::util::VersionNumber::hasGitInfo |
( |
| ) |
const |
|
inlineconstexprnoexcept |
Returns true, if the optional git information is defined explicitly, otherwise false.
Definition at line 126 of file VersionNumber.hpp.
◆ major()
| int jau::util::VersionNumber::major |
( |
| ) |
const |
|
inlineconstexprnoexcept |
◆ minor()
| int jau::util::VersionNumber::minor |
( |
| ) |
const |
|
inlineconstexprnoexcept |
◆ sub()
| int jau::util::VersionNumber::sub |
( |
| ) |
const |
|
inlineconstexprnoexcept |
◆ git_commits()
| int jau::util::VersionNumber::git_commits |
( |
| ) |
const |
|
inlineconstexprnoexcept |
◆ git_ssha()
| uint64_t jau::util::VersionNumber::git_ssha |
( |
| ) |
const |
|
inlineconstexprnoexcept |
◆ git_dirty()
| bool jau::util::VersionNumber::git_dirty |
( |
| ) |
const |
|
inlineconstexprnoexcept |
◆ operator==()
| bool jau::util::VersionNumber::operator== |
( |
const VersionNumber & | vo | ) |
const |
|
inlineconstexprnoexcept |
◆ operator<=>()
| std::strong_ordering jau::util::VersionNumber::operator<=> |
( |
const VersionNumber & | vo | ) |
const |
|
inlineconstexprnoexcept |
Three way std::strong_ordering comparison operator.
Definition at line 142 of file VersionNumber.hpp.
◆ hash()
| std::size_t jau::util::VersionNumber::hash |
( |
| ) |
const |
|
inlineconstexprnoexcept |
◆ toString()
| std::string jau::util::VersionNumber::toString |
( |
| ) |
const |
|
inlinenoexcept |
◆ m_major
| int jau::util::VersionNumber::m_major |
|
protected |
◆ m_minor
| int jau::util::VersionNumber::m_minor |
|
protected |
◆ m_sub
| int jau::util::VersionNumber::m_sub |
|
protected |
◆ m_git_commits
| int jau::util::VersionNumber::m_git_commits |
|
protected |
◆ m_git_ssha
| uint64_t jau::util::VersionNumber::m_git_ssha |
|
protected |
◆ m_git_dirty
| bool jau::util::VersionNumber::m_git_dirty |
|
protected |
◆ m_state
| uint16_t jau::util::VersionNumber::m_state |
|
protected |
◆ DBG_OUT
| const bool jau::util::VersionNumber::DBG_OUT = false |
|
staticconstexprprotected |
◆ HAS_MAJOR
| const uint16_t jau::util::VersionNumber::HAS_MAJOR = 1U << 0 |
|
staticconstexprprotected |
◆ HAS_MINOR
| const uint16_t jau::util::VersionNumber::HAS_MINOR = 1U << 1 |
|
staticconstexprprotected |
◆ HAS_SUB
| const uint16_t jau::util::VersionNumber::HAS_SUB = 1U << 2 |
|
staticconstexprprotected |
◆ HAS_GIT_INFO
| const uint16_t jau::util::VersionNumber::HAS_GIT_INFO = 1U << 3 |
|
staticconstexprprotected |
The documentation for this class was generated from the following file: