LogViewer
A modern log viewer with AI-assisted analysis (Qt 6)
Loading...
Searching...
No Matches
Version.hpp
Go to the documentation of this file.
1
8#pragma once
9#include <string>
10#include <compare>
11
16namespace Version
17{
18
30struct Version
31{
32 int major {0};
33 int minor {0};
34 int patch {0};
35 std::string type {
36 ""};
37 std::string datetime {""};
38 std::string machine {""};
39
52 long long asNumber() const;
53
62 std::string asShortStr() const;
63
71 std::string asLongStr() const;
72
85 auto operator<=>(const Version& other) const;
86
88 bool operator==(const Version& other) const;
89
92
100 Version(long long version);
101};
102
107
108} // namespace Version
Contains version-related structures and utilities.
const Version & current()
std::string asShortStr() const
Returns short version string representation.
long long asNumber() const
Converts version to a single numeric representation.
Version()
Creates empty Version object.
std::string asLongStr() const
Returns detailed version string representation.
auto operator<=>(const Version &other) const
Three-way comparison operator (spaceship operator)
Version(long long version)
bool operator==(const Version &other) const
Equality operator (compares numeric version; compiler generates != from this)