19 return std::to_string(version)
20 +
"." + std::to_string(release)
21 +
"." + std::to_string(revision);
26 auto versionStringParts = wxSplit(versionString,
'.');
30 if (versionStringParts.size() != 3)
33 for (
auto& v : versionStringParts)
35 if (v.empty() || !v.IsNumber())
40 std::stoi(versionStringParts[0].ToStdString()),
41 std::stoi(versionStringParts[1].ToStdString()),
42 std::stoi(versionStringParts[2].ToStdString())
59 return !(*
this == other);
70 return !(*
this < other) && (*
this != other);
Declare a class with version number manipulation.
A class, that supports base manipulation with version number.
bool operator!=(const VersionId &other)
bool operator==(const VersionId &other)
static VersionId ParseFromString(wxString &versionString)
Parse and return version object from version string like "1.2.3".
wxString GetString() const
Make string with version by MakeString() from instance values.
bool operator>(const VersionId &other)
VersionId()=default
Creates an zero version object.
static wxString MakeString(int version, int release, int revision)
Creates version string like "1.2.3" by parameters.
bool operator<(const VersionId &other)