21 return std::to_string(version)
22 +
"." + std::to_string(release)
23 +
"." + std::to_string(revision);
25 return std::to_string(version)
26 +
"." + std::to_string(release)
27 +
"." + std::to_string(revision)
28 +
"." + std::to_string(patch);
33 auto versionStringParts = wxSplit(versionString,
'.');
37 const auto size = versionStringParts.size();
38 if (size < 2 || size > 4)
46 auto currentField = fields.begin();
48 for (
auto& v : versionStringParts)
50 if (v.empty() || !v.IsNumber())
53 **currentField = std::stoi(v.ToStdString());
73 return !(*
this == other);
84 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.
bool operator<(const VersionId &other)
static wxString MakeString(int version, int release, int revision, int patch)
Creates version string like "1.2.3" by parameters.