Sese Framework  2.3.0
A cross-platform framework
Loading...
Searching...
No Matches
sese::Version Class Reference

Version Class. More...

#include <Version.h>

Public Member Functions

 Version (uint16_t major, uint16_t minor, uint16_t patch, uint16_t revision)
 
uint16_t getMajor () const
 
void setMajor (uint16_t major)
 
uint16_t getMinor () const
 
void setMinor (uint16_t minor)
 
uint16_t getPatch () const
 
void setPatch (uint16_t patch)
 
uint16_t getRevision () const
 
void setRevision (uint16_t revision)
 
std::string toString () const
 
std::string toShortString () const
 
bool operator== (const Version &other) const
 
bool operator< (const Version &other) const
 
bool operator> (const Version &other) const
 
bool operator<= (const Version &other) const
 
bool operator>= (const Version &other) const
 
bool operator!= (const Version &other) const
 

Static Public Member Functions

static std::optional< Versionparse (const std::string &version)
 

Private Attributes

uint16_t major_
 
uint16_t minor_
 
uint16_t patch_
 
uint16_t revision_
 

Detailed Description

Version Class.

Constructor & Destructor Documentation

◆ Version()

Version::Version ( uint16_t major,
uint16_t minor,
uint16_t patch,
uint16_t revision )

Referenced by parse().

Member Function Documentation

◆ getMajor()

uint16_t sese::Version::getMajor ( ) const
inlinenodiscard

References major_.

◆ getMinor()

uint16_t sese::Version::getMinor ( ) const
inlinenodiscard

References minor_.

◆ getPatch()

uint16_t sese::Version::getPatch ( ) const
inlinenodiscard

References patch_.

◆ getRevision()

uint16_t sese::Version::getRevision ( ) const
inlinenodiscard

References revision_.

◆ operator!=()

bool Version::operator!= ( const Version & other) const

References major_, minor_, patch_, and revision_.

◆ operator<()

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

References major_, minor_, patch_, and revision_.

◆ operator<=()

bool Version::operator<= ( const Version & other) const

References major_, minor_, patch_, and revision_.

◆ operator==()

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

References major_, minor_, patch_, and revision_.

◆ operator>()

bool Version::operator> ( const Version & other) const

References major_, minor_, patch_, and revision_.

◆ operator>=()

bool Version::operator>= ( const Version & other) const

References major_, minor_, patch_, and revision_.

◆ parse()

std::optional< Version > Version::parse ( const std::string & version)
static

References Version().

◆ setMajor()

void sese::Version::setMajor ( uint16_t major)
inline

References major_.

◆ setMinor()

void sese::Version::setMinor ( uint16_t minor)
inline

References minor_.

◆ setPatch()

void sese::Version::setPatch ( uint16_t patch)
inline

References patch_.

◆ setRevision()

void sese::Version::setRevision ( uint16_t revision)
inline

References revision_.

◆ toShortString()

std::string Version::toShortString ( ) const
nodiscard

Get the short version string, containing only non-zero parts, e.g., "0.2.3", "1.2"

Returns
Short version string

References count(), major_, minor_, patch_, and revision_.

◆ toString()

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

Get the full version string

Returns
Full version string

References major_, minor_, patch_, and revision_.

Member Data Documentation

◆ major_

uint16_t sese::Version::major_
private

◆ minor_

uint16_t sese::Version::minor_
private

◆ patch_

uint16_t sese::Version::patch_
private

◆ revision_

uint16_t sese::Version::revision_
private

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