LogViewer
A modern log viewer with AI-assisted analysis (Qt 6)
Loading...
Searching...
No Matches
Version::Version Struct Reference

#include <Version.hpp>

Collaboration diagram for Version::Version:
Collaboration graph

Public Member Functions

long long asNumber () const
 Converts version to a single numeric representation.
 
std::string asShortStr () const
 Returns short version string representation.
 
std::string asLongStr () const
 Returns detailed version string representation.
 
auto operator<=> (const Version &other) const
 Three-way comparison operator (spaceship operator)
 
bool operator== (const Version &other) const
 Equality operator (compares numeric version; compiler generates != from this)
 
 Version ()
 Creates empty Version object.
 
 Version (long long version)
 

Public Attributes

int major {0}
 Major version number (breaking changes)
 
int minor {0}
 Minor version number (new features, backward compatible)
 
int patch {0}
 Patch version number (bug fixes, backward compatible)
 
std::string type
 Version type (e.g., "alpha", "beta", "rc", "stable")
 
std::string datetime {""}
 Build date and time in ISO format.
 
std::string machine {""}
 Build machine identifier.
 

Constructor & Destructor Documentation

◆ Version() [1/2]

Version::Version::Version ( )

Creates empty Version object.

◆ Version() [2/2]

Version::Version::Version ( long long  version)

Converts number to version object.

Parameters
version- number in format MMMMmmmmpppp (M-Major, m-minor, p-patch)
Returns
Version object

Member Function Documentation

◆ asLongStr()

std::string Version::Version::asLongStr ( ) const

Returns detailed version string representation.

Includes additional build information such as build date and machine.

Returns
std::string containing the detailed version representation

◆ asNumber()

long long Version::Version::asNumber ( ) const

Converts version to a single numeric representation.

Returns version in one big number with format: MMMMmmmmpppp (M-Major, m-minor, p-patch)

Example: Version 1.2.3 becomes 100020003 (leading zeroes are not displayed)

Returns
long long integer with encoded version information
Note
This method is useful for version comparison operations

◆ asShortStr()

std::string Version::Version::asShortStr ( ) const

Returns short version string representation.

Format: "Major.Minor.Patch VersionType" Example: "1.2.3 beta"

Returns
std::string containing the short version representation
Here is the caller graph for this function:

◆ operator<=>()

auto Version::Version::operator<=> ( const Version &  other) const

Three-way comparison operator (spaceship operator)

Provides complete version ordering with semantic versioning rules. Compiler automatically generates <, >, <=, >=, != from this and operator==.

Comparison order: major → minor → patch → type Pre-release versions (alpha, beta, rc) are considered less than stable.

Parameters
otherThe version to compare against
Returns
Strong ordering comparison result

◆ operator==()

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

Equality operator (compares numeric version; compiler generates != from this)

Member Data Documentation

◆ datetime

std::string Version::Version::datetime {""}

Build date and time in ISO format.

◆ machine

std::string Version::Version::machine {""}

Build machine identifier.

◆ major

int Version::Version::major {0}

Major version number (breaking changes)

◆ minor

int Version::Version::minor {0}

Minor version number (new features, backward compatible)

◆ patch

int Version::Version::patch {0}

Patch version number (bug fixes, backward compatible)

◆ type

std::string Version::Version::type
Initial value:
{
""}

Version type (e.g., "alpha", "beta", "rc", "stable")


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