EduArt Sensor Ring Library 3.0.0
Loading...
Searching...
No Matches
eduart::Version Struct Reference

Semantic version (major, minor, patch) for firmware or board. More...

#include <EnumerationInformation.hpp>

Public Member Functions

std::string toString () const
 Format version as "major.minor.patch".
bool operator== (const Version &other) const noexcept
 Compare two versions for equality.
bool operator< (const Version &other) const noexcept
 Lexicographic less-than comparison (major, minor, patch).

Public Attributes

unsigned int major = 0
 Major version number.
unsigned int minor = 0
 Minor version number.
unsigned int patch = 0
 Patch version number.

Friends

std::ostream & operator<< (std::ostream &os, const Version &v) noexcept
 Stream version as "major.minor.patch".

Detailed Description

Semantic version (major, minor, patch) for firmware or board.

Member Function Documentation

◆ operator<()

bool eduart::Version::operator< ( const Version & other) const
noexcept

Lexicographic less-than comparison (major, minor, patch).

Parameters
[in]otherVersion to compare with.
Returns
true if *this < other.

◆ operator==()

bool eduart::Version::operator== ( const Version & other) const
noexcept

Compare two versions for equality.

Parameters
[in]otherVersion to compare with.
Returns
true if equal.

◆ toString()

std::string eduart::Version::toString ( ) const

Format version as "major.minor.patch".

Returns
Version string.

◆ operator<<

std::ostream & operator<< ( std::ostream & os,
const Version & v )
friend

Stream version as "major.minor.patch".

Parameters
[in]osOutput stream.
[in]vVersion to print.
Returns
Reference to os.

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