2023-10-07 22:27:06 +02:00
|
|
|
#include <cstdint>
|
|
|
|
#include <optional>
|
2024-11-27 20:44:36 +01:00
|
|
|
#include <string>
|
2023-10-07 22:27:06 +02:00
|
|
|
|
|
|
|
class WUPSVersion {
|
|
|
|
public:
|
2024-11-27 20:44:36 +01:00
|
|
|
WUPSVersion(int major, int minor, int revision);
|
2023-10-07 22:27:06 +02:00
|
|
|
|
2024-11-27 20:44:36 +01:00
|
|
|
static std::optional<WUPSVersion> createFromString(const std::string &versionStr);
|
2023-10-07 22:27:06 +02:00
|
|
|
|
2024-11-27 20:44:36 +01:00
|
|
|
std::strong_ordering operator<=>(const WUPSVersion &other) const;
|
2023-10-07 22:27:06 +02:00
|
|
|
|
2024-11-27 20:44:36 +01:00
|
|
|
[[nodiscard]] std::string toString() const;
|
2023-10-07 22:27:06 +02:00
|
|
|
|
|
|
|
private:
|
2024-11-27 20:44:36 +01:00
|
|
|
uint32_t mMajor;
|
|
|
|
uint32_t mMinor;
|
|
|
|
uint32_t mRevision;
|
2023-10-07 22:27:06 +02:00
|
|
|
};
|