25 lines
524 B
C++
25 lines
524 B
C++
#pragma once
|
|
|
|
#include <optional>
|
|
#include <string>
|
|
#include <string_view>
|
|
|
|
namespace dts {
|
|
|
|
struct SpineVersion {
|
|
int major = 0;
|
|
int minor = 0;
|
|
int patch = 0;
|
|
bool hasPatch = false;
|
|
|
|
[[nodiscard]] static std::optional<SpineVersion> parse(std::string_view text);
|
|
[[nodiscard]] std::string line() const;
|
|
[[nodiscard]] std::string toString() const;
|
|
[[nodiscard]] bool isSupported() const;
|
|
|
|
friend bool operator==(const SpineVersion&, const SpineVersion&) = default;
|
|
};
|
|
|
|
} // namespace dts
|
|
|