Representation of a major/minor version number. More...
Public Member Functions | |
constexpr | versionNumber () noexcept |
Default construct current version. The value (2.0) corresponds to the current version. More... | |
constexpr | versionNumber (int major, int minor) noexcept |
Construct from major, number. More... | |
constexpr | versionNumber (const float ver) noexcept |
Construct from floating-point version number. More... | |
versionNumber (const std::string &verNum) | |
Construct by parsing string "major.minor". More... | |
versionNumber (const token &tok) | |
Construct from token (float, word, string) More... | |
versionNumber (const word &keyword, const dictionary &dict) | |
Failsafe construct from dictionary lookup. More... | |
std::string | str () const |
A string representation as major.minor. More... | |
int | canonical () const noexcept |
From version to canonical integer value. More... | |
int | compare (const versionNumber &other) const noexcept |
Compare differences in the versions. More... | |
Static Public Member Functions | |
static versionNumber | canonical (int verNum) noexcept |
From canonical integer value to version. More... | |
Representation of a major/minor version number.
Definition at line 107 of file IOstreamOption.H.
|
inlinenoexcept |
Default construct current version. The value (2.0) corresponds to the current version.
Definition at line 122 of file IOstreamOption.H.
Referenced by IOstreamOption::versionNumber::canonical(), and IOstreamOption::versionNumber::versionNumber().
|
inlinenoexcept |
Construct from major, number.
Definition at line 130 of file IOstreamOption.H.
|
inlineexplicitnoexcept |
Construct from floating-point version number.
Definition at line 138 of file IOstreamOption.H.
|
explicit |
Construct by parsing string "major.minor".
Definition at line 137 of file IOstreamOption.C.
|
explicit |
Construct from token (float, word, string)
Definition at line 143 of file IOstreamOption.C.
References token::info(), token::isNumber(), token::isStringType(), Foam::nl, token::number(), token::stringToken(), IOstreamOption::versionNumber::versionNumber(), and WarningInFunction.
versionNumber | ( | const word & | keyword, |
const dictionary & | dict | ||
) |
Failsafe construct from dictionary lookup.
Definition at line 167 of file IOstreamOption.C.
References dict, Foam::glTF::key(), and keyType::LITERAL.
|
inline |
A string representation as major.minor.
Definition at line 164 of file IOstreamOption.H.
|
inlinenoexcept |
From version to canonical integer value.
Definition at line 177 of file IOstreamOption.H.
Referenced by decomposedBlockData::readBlocks(), and decomposedBlockData::writeData().
|
inlinestaticnoexcept |
From canonical integer value to version.
Definition at line 185 of file IOstreamOption.H.
References IOstreamOption::versionNumber::versionNumber().
|
inlinenoexcept |
Compare differences in the versions.
Negative when 'this' is less than other. Positive when 'this' is greater than other.
Definition at line 197 of file IOstreamOption.H.
Referenced by Foam::operator!=(), Foam::operator<(), Foam::operator<=(), Foam::operator==(), Foam::operator>(), and Foam::operator>=().
Copyright © 2011-2018 OpenFOAM | OPENFOAM® is a registered trademark of OpenCFD Ltd.