Thermal Camera SDK 11.3.0
SDK for Optris Thermal Cameras
Loading...
Searching...
No Matches
optris::Version Class Reference

Represent a version with major, minor and patch version numbers. More...

#include <Version.h>

Collaboration diagram for optris::Version:
Collaboration graph

Public Member Functions

OTC_SDK_API Version () noexcept
 Constructor.
 
OTC_SDK_API Version (int major, int minor, int patch) noexcept
 Constructor.
 
int getMajor () const noexcept
 Returns the major version number.
 
int getMinor () const noexcept
 Returns the minor version number.
 
int getPatch () const noexcept
 Returns the patch version number.
 
OTC_SDK_API std::string toString () const noexcept
 Returns a string representation of the version.
 
OTC_SDK_API bool isValid () const noexcept
 Returns whether the stored version is valid.
 
OTC_SDK_API operator bool () const noexcept
 Returns whether the stored version is valid.
 
OTC_SDK_API int compare (const Version &rhs) const noexcept
 Compares the provided version with the stored one.
 
OTC_SDK_API int compare (int major, int minor, int patch) const noexcept
 Compares the provided version numbers with the stored ones.
 
bool operator== (const Version &rhs) const noexcept
 Return whether the provided version equals the stored one.
 
bool operator!= (const Version &rhs) const noexcept
 Return whether the provided version is not equal to the stored one.
 
bool operator< (const Version &rhs) const noexcept
 Return whether the stored version is lower than the provided one.
 
bool operator<= (const Version &rhs) const noexcept
 Return whether the stored version is lower than or equal to the provided one.
 
bool operator> (const Version &rhs) const noexcept
 Return whether the stored version is higher than to the provided one.
 
bool operator>= (const Version &rhs) const noexcept
 Return whether the stored version is higher than or equal to the provided one.
 

Detailed Description

Represent a version with major, minor and patch version numbers.

Constructor & Destructor Documentation

◆ Version()

OTC_SDK_API optris::Version::Version ( int major,
int minor,
int patch )
noexcept

Constructor.

Parameters
[in]majorversion number.
[in]minorversion number.
[in]patchversion number.

Member Function Documentation

◆ compare() [1/2]

OTC_SDK_API int optris::Version::compare ( const Version & rhs) const
noexcept

Compares the provided version with the stored one.

Parameters
[in]rhsversion to compare with.
Returns
0 if both versions are equal. -1 if the stored version is less than the provided one. +1 if the stored version is greater than the provide one.

◆ compare() [2/2]

OTC_SDK_API int optris::Version::compare ( int major,
int minor,
int patch ) const
noexcept

Compares the provided version numbers with the stored ones.

Parameters
[in]majorversion number to compare with.
[in]minorversion number to compare with.
[in]patchversion number to compare with.
Returns
0 if both versions are equal. -1 if the stored version is less than the provided one. +1 if the stored version is greater than the provide one.

◆ getMajor()

int optris::Version::getMajor ( ) const
inlinenoexcept

Returns the major version number.

Returns
major version number.

◆ getMinor()

int optris::Version::getMinor ( ) const
inlinenoexcept

Returns the minor version number.

Returns
minor version number.

◆ getPatch()

int optris::Version::getPatch ( ) const
inlinenoexcept

Returns the patch version number.

Returns
patch version number.

◆ isValid()

OTC_SDK_API bool optris::Version::isValid ( ) const
noexcept

Returns whether the stored version is valid.

The version is considered invalid, if all version numbers are zero.

Returns
true, if the version is valid. False otherwise.

◆ operator bool()

OTC_SDK_API optris::Version::operator bool ( ) const
noexcept

Returns whether the stored version is valid.

The version is considered invalid, if all version numbers are zero.

Returns
true, if ther version is valid. False otherwise.

◆ operator!=()

bool optris::Version::operator!= ( const Version & rhs) const
inlinenoexcept

Return whether the provided version is not equal to the stored one.

Parameters
[in]rhsversion to compare with.
Returns
true, if the versions are not equal. False, otherwise.

◆ operator<()

bool optris::Version::operator< ( const Version & rhs) const
inlinenoexcept

Return whether the stored version is lower than the provided one.

Parameters
[in]rhsversion to compare with.
Returns
true, if the stored version is lower than the provided one. False otherwise.

◆ operator<=()

bool optris::Version::operator<= ( const Version & rhs) const
inlinenoexcept

Return whether the stored version is lower than or equal to the provided one.

Parameters
[in]rhsversion to compare with.
Returns
true, if the stored version is lower than or equal to the provided one. False otherwise.

◆ operator==()

bool optris::Version::operator== ( const Version & rhs) const
inlinenoexcept

Return whether the provided version equals the stored one.

Parameters
[in]rhsversion to compare with.
Returns
true, if the versions are equal. False, otherwise.

◆ operator>()

bool optris::Version::operator> ( const Version & rhs) const
inlinenoexcept

Return whether the stored version is higher than to the provided one.

Parameters
[in]rhsversion to compare with.
Returns
true, if the stored version is higher than the provided one. False otherwise.

◆ operator>=()

bool optris::Version::operator>= ( const Version & rhs) const
inlinenoexcept

Return whether the stored version is higher than or equal to the provided one.

Parameters
[in]rhsversion to compare with.
Returns
true, if the stored version is higher than or equal to the provided one. False otherwise.

◆ toString()

OTC_SDK_API std::string optris::Version::toString ( ) const
noexcept

Returns a string representation of the version.

Returns
string representation of the version.

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