plugify  1.0.0.0
Public Member Functions | List of all members
plugify::Version Class Referencefinal

Represents a version number with major, minor, patch, and tweak components. More...

#include <version.hpp>

Public Member Functions

 Version (uint8_t major, uint8_t minor, uint8_t patch, uint8_t tweak) noexcept
 Constructor to initialize a Version object with individual components. More...
 
 Version (uint32_t version) noexcept
 Explicit constructor to initialize a Version object from a packed 32-bit version number. More...
 
Versionoperator= (uint32_t version) noexcept
 Assignment operator to set the Version object from a packed 32-bit version number. More...
 
 operator uint32_t () const noexcept
 Conversion operator to retrieve the packed 32-bit version number. More...
 
auto operator<=> (const Version &rhs) const noexcept
 Comparison operator (<=>) for comparing two Version objects. More...
 
std::string ToString () const
 Get a string representation of the Version object. More...
 

Detailed Description

Represents a version number with major, minor, patch, and tweak components.

Definition at line 10 of file version.hpp.

Constructor & Destructor Documentation

◆ Version() [1/2]

plugify::Version::Version ( uint8_t  major,
uint8_t  minor,
uint8_t  patch,
uint8_t  tweak 
)
noexcept

Constructor to initialize a Version object with individual components.

Parameters
majorThe major version component.
minorThe minor version component.
patchThe patch version component.
tweakThe tweak version component.

◆ Version() [2/2]

plugify::Version::Version ( uint32_t  version)
explicitnoexcept

Explicit constructor to initialize a Version object from a packed 32-bit version number.

Parameters
versionThe packed 32-bit version number.

Member Function Documentation

◆ operator uint32_t()

plugify::Version::operator uint32_t ( ) const
noexcept

Conversion operator to retrieve the packed 32-bit version number.

Returns
The packed 32-bit version number.

◆ operator<=>()

auto plugify::Version::operator<=> ( const Version rhs) const
noexcept

Comparison operator (<=>) for comparing two Version objects.

Parameters
rhsThe right-hand side Version object for comparison.
Returns
The result of the comparison.

◆ operator=()

Version& plugify::Version::operator= ( uint32_t  version)
noexcept

Assignment operator to set the Version object from a packed 32-bit version number.

Parameters
versionThe packed 32-bit version number.
Returns
Reference to the modified Version object.

◆ ToString()

std::string plugify::Version::ToString ( ) const

Get a string representation of the Version object.

Returns
A string representing the Version object.

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