Audacity 3.2.0
VersionId.h
Go to the documentation of this file.
1/*!********************************************************************
2 Audacity: A Digital Audio Editor
3
4 @file VersionId.h
5 @brief Declare a class with version number manipulation.
6
7 Anton Gerasimov
8 **********************************************************************/
9#pragma once
10
11#include <wx/arrstr.h>
12
14
18class VersionId final
19{
20public:
22 VersionId() = default;
23 VersionId(int version, int release, int revision, int patch = 0);
24
26 static wxString MakeString(int version, int release, int revision, int patch);
28 static VersionId ParseFromString(wxString& versionString);
29
31 wxString GetString() const;
32
33 bool operator== (const VersionId& other);
34 bool operator!= (const VersionId& other);
35
36 bool operator< (const VersionId& other);
37 bool operator> (const VersionId& other);
38
39private:
40 int mVersion{ 0 };
41 int mRelease{ 0 };
42 int mRevision{ 0 };
43 int mPatch { 0 };
44};
45
48{
49 return VersionId { AUDACITY_VERSION, AUDACITY_RELEASE, AUDACITY_REVISION,
50 AUDACITY_MODLEVEL };
51}
static VersionId CurrentBuildVersion()
Return version (VersionId) object with current Audacity build version.
Definition: VersionId.h:47
A class, that supports base manipulation with version number.
Definition: VersionId.h:19
bool operator!=(const VersionId &other)
Definition: VersionId.cpp:71
bool operator==(const VersionId &other)
Definition: VersionId.cpp:65
static VersionId ParseFromString(wxString &versionString)
Parse and return version object from version string like "1.2.3".
Definition: VersionId.cpp:31
wxString GetString() const
Make string with version by MakeString() from instance values.
Definition: VersionId.cpp:60
bool operator>(const VersionId &other)
Definition: VersionId.cpp:82
int mRevision
Definition: VersionId.h:42
int mRelease
Definition: VersionId.h:41
VersionId()=default
Creates an zero version object.
int mVersion
Definition: VersionId.h:40
int mPatch
Definition: VersionId.h:43
bool operator<(const VersionId &other)
Definition: VersionId.cpp:76
static wxString MakeString(int version, int release, int revision, int patch)
Creates version string like "1.2.3" by parameters.
Definition: VersionId.cpp:18