Loading...
Searching...
No Matches
IOstreamOption::versionNumber Class Reference

Representation of a major/minor version number. More...

#include <IOstreamOption.H>

Public Member Functions

constexpr versionNumber () noexcept
 Default construct current version. The value (2.0) corresponds to the current version.
constexpr versionNumber (int major, int minor) noexcept
 Construct from major, number.
constexpr versionNumber (const float ver) noexcept
 Construct from floating-point version number.
 versionNumber (const std::string &verNum)
 Construct by parsing string "major.minor".
 versionNumber (const token &tok)
 Construct from token (float, word, string).
 versionNumber (const word &key, const dictionary &dict)
 Failsafe construct from dictionary lookup.
std::string str () const
 A string representation as major.minor.
int canonical () const noexcept
 From version to canonical integer value.
int compare (const versionNumber &other) const noexcept
 Compare differences in the versions.

Static Public Member Functions

static versionNumber canonical (int verNum) noexcept
 From canonical integer value to version.

Detailed Description

Representation of a major/minor version number.

Definition at line 123 of file IOstreamOption.H.

Constructor & Destructor Documentation

◆ versionNumber() [1/6]

versionNumber ( )
inlineconstexprnoexcept

Default construct current version. The value (2.0) corresponds to the current version.

Definition at line 138 of file IOstreamOption.H.

References Foam::noexcept.

Referenced by canonical(), compare(), versionNumber(), versionNumber(), and versionNumber().

Here is the caller graph for this function:

◆ versionNumber() [2/6]

versionNumber ( int major,
int minor )
inlineconstexprnoexcept

Construct from major, number.

Definition at line 146 of file IOstreamOption.H.

References Foam::noexcept.

◆ versionNumber() [3/6]

versionNumber ( const float ver)
inlineexplicitconstexprnoexcept

Construct from floating-point version number.

Definition at line 154 of file IOstreamOption.H.

References Foam::noexcept.

◆ versionNumber() [4/6]

versionNumber ( const std::string & verNum)
explicit

Construct by parsing string "major.minor".

Definition at line 206 of file IOstreamOption.C.

References versionNumber().

Here is the call graph for this function:

◆ versionNumber() [5/6]

versionNumber ( const token & tok)
explicit

Construct from token (float, word, string).

Definition at line 212 of file IOstreamOption.C.

References if(), token::isNumber(), token::isStringType(), and versionNumber().

Here is the call graph for this function:

◆ versionNumber() [6/6]

versionNumber ( const word & key,
const dictionary & dict )

Failsafe construct from dictionary lookup.

Definition at line 235 of file IOstreamOption.C.

References dict, keyType::LITERAL, and versionNumber().

Here is the call graph for this function:

Member Function Documentation

◆ str()

std::string str ( ) const
inline

A string representation as major.minor.

Definition at line 180 of file IOstreamOption.H.

◆ canonical() [1/2]

int canonical ( ) const
inlinenoexcept

From version to canonical integer value.

Definition at line 193 of file IOstreamOption.H.

References Foam::noexcept.

Referenced by decomposedBlockData::readBlocks(), and decomposedBlockData::writeData().

Here is the caller graph for this function:

◆ canonical() [2/2]

versionNumber canonical ( int verNum)
inlinestaticnoexcept

From canonical integer value to version.

Definition at line 201 of file IOstreamOption.H.

References versionNumber().

Here is the call graph for this function:

◆ compare()

int compare ( const versionNumber & other) const
inlinenoexcept

Compare differences in the versions.

Negative when 'this' is less than other. Positive when 'this' is greater than other.

Definition at line 213 of file IOstreamOption.H.

References versionNumber().

Referenced by Foam::operator!=(), Foam::operator<(), Foam::operator<=(), Foam::operator==(), Foam::operator>(), and Foam::operator>=().

Here is the call graph for this function:
Here is the caller graph for this function:

The documentation for this class was generated from the following files: