Overte C++ Documentation
ApplicationVersion.h
1 //
2 // ApplicationVersion.h
3 // libraries/shared/src
4 //
5 // Created by Stephen Birarda on 6/8/18.
6 // Copyright 2018 High Fidelity, Inc.
7 //
8 // Distributed under the Apache License, Version 2.0.
9 // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
10 //
11 
12 #ifndef hifi_ApplicationVersion_h
13 #define hifi_ApplicationVersion_h
14 
15 #include <QtCore/QString>
16 
17 class ApplicationVersion {
18 public:
19  ApplicationVersion(const QString& versionString);
20 
21  bool operator==(const ApplicationVersion& other) const;
22  bool operator!=(const ApplicationVersion& other) const { return !(*this == other); }
23 
24  bool operator <(const ApplicationVersion& other) const;
25  bool operator >(const ApplicationVersion& other) const;
26 
27  bool operator >=(const ApplicationVersion& other) const { return (*this == other) || (*this > other); }
28  bool operator <=(const ApplicationVersion& other) const { return (*this == other) || (*this < other); }
29 
30  int major = -1;
31  int minor = -1;
32  int patch = -1;
33 
34  int build = -1;
35 
36  bool isSemantic { false };
37 
38  QString versionString;
39 };
40 
41 #endif // hifi_ApplicationVersion_h