MCPcopy Create free account
hub / github.com/LMMS/lmms / ProjectVersion

Class ProjectVersion

include/ProjectVersion.h:36–63  ·  view source on GitHub ↗

! \brief Version number parsing and comparison * * Parses and compares version information. i.e. "1.0.3" < "1.0.10" */

Source from the content-addressed store, hash-verified

34 * Parses and compares version information. i.e. "1.0.3" < "1.0.10"
35 */
36class ProjectVersion
37{
38public:
39 enum CompareType { Major, Minor, Release, Stage, Build };
40
41 ProjectVersion(QString version, CompareType c = Build);
42 ProjectVersion(const char * version, CompareType c = Build);
43
44 int getMajor() const { return m_major; }
45 int getMinor() const { return m_minor; }
46 int getRelease() const { return m_release; }
47 QString getStage() const { return m_stage; }
48 int getBuild() const { return m_build; }
49 CompareType getCompareType() const { return m_compareType; }
50 ProjectVersion setCompareType(CompareType compareType) { m_compareType = compareType; return * this; }
51
52 static int compare(const ProjectVersion& a, const ProjectVersion& b, CompareType c);
53 static int compare(ProjectVersion v1, ProjectVersion v2);
54
55private:
56 QString m_version;
57 int m_major;
58 int m_minor;
59 int m_release;
60 QString m_stage;
61 int m_build;
62 CompareType m_compareType;
63} ;
64
65/*
66 * ProjectVersion v. ProjectVersion

Callers 1

ProjectVersionTestClass · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected