23 lines
441 B
C
Raw Normal View History

2024-12-29 17:43:28 +01:00
#pragma once
#include <optional>
2024-11-27 20:44:36 +01:00
#include <string>
2024-12-29 17:43:28 +01:00
#include <cstdint>
class WUPSVersion {
public:
2024-11-27 20:44:36 +01:00
WUPSVersion(int major, int minor, int revision);
2024-11-27 20:44:36 +01:00
static std::optional<WUPSVersion> createFromString(const std::string &versionStr);
2024-11-27 20:44:36 +01:00
std::strong_ordering operator<=>(const WUPSVersion &other) const;
2024-11-27 20:44:36 +01:00
[[nodiscard]] std::string toString() const;
private:
2024-11-27 20:44:36 +01:00
uint32_t mMajor;
uint32_t mMinor;
uint32_t mRevision;
};