Lunchbox  1.17.0
Multi-threaded C++ toolbox library for all application developers creating high-performance multi-threaded programs.
version.h
Go to the documentation of this file.
1 // generated by CommonLibrary.cmake, do not edit.
2 
8 #ifndef LUNCHBOX_VERSION_H
9 #define LUNCHBOX_VERSION_H
10 
11 #include <lunchbox/api.h>
12 #include <string>
13 
14 namespace lunchbox
15 {
17 # define LUNCHBOX_VERSION_MAJOR 1
18 
20 # define LUNCHBOX_VERSION_MINOR 17
21 
23 # define LUNCHBOX_VERSION_PATCH 0
24 
26 # define LUNCHBOX_VERSION_REVISION 0x3231f29
27 
29 # define LUNCHBOX_VERSION_ABI 10ull
30 
32 # define LUNCHBOX_VERSION_STRING \
33  "1.17.0"
34 
36 # define LUNCHBOX_REV_STRING \
37  "1.17.0.0x3231f29"
38 
40 # define LUNCHBOX_VERSION_GT( MAJOR, MINOR, PATCH ) \
41  ( (LUNCHBOX_VERSION_MAJOR>MAJOR) || \
42  (LUNCHBOX_VERSION_MAJOR==MAJOR && (LUNCHBOX_VERSION_MINOR>MINOR || \
43  (LUNCHBOX_VERSION_MINOR==MINOR && LUNCHBOX_VERSION_PATCH>PATCH))))
44 
46 # define LUNCHBOX_VERSION_GE( MAJOR, MINOR, PATCH ) \
47  ( (LUNCHBOX_VERSION_MAJOR>MAJOR) || \
48  (LUNCHBOX_VERSION_MAJOR==MAJOR && (LUNCHBOX_VERSION_MINOR>MINOR || \
49  (LUNCHBOX_VERSION_MINOR==MINOR && LUNCHBOX_VERSION_PATCH>=PATCH))))
50 
52 # define LUNCHBOX_VERSION_LT( MAJOR, MINOR, PATCH ) \
53  ( (LUNCHBOX_VERSION_MAJOR<MAJOR) || \
54  (LUNCHBOX_VERSION_MAJOR==MAJOR && (LUNCHBOX_VERSION_MINOR<MINOR || \
55  (LUNCHBOX_VERSION_MINOR==MINOR && LUNCHBOX_VERSION_PATCH<PATCH))))
56 
58 # define LUNCHBOX_VERSION_LE( MAJOR, MINOR, PATCH ) \
59  ( (LUNCHBOX_VERSION_MAJOR<MAJOR) || \
60  (LUNCHBOX_VERSION_MAJOR==MAJOR && (LUNCHBOX_VERSION_MINOR<MINOR || \
61  (LUNCHBOX_VERSION_MINOR==MINOR && LUNCHBOX_VERSION_PATCH<=PATCH))))
62 
64 class LUNCHBOX_API Version
65 {
66 public:
68  static int getMajor();
69 
71  static int getMinor();
72 
74  static int getPatch();
75 
77  static std::string getString();
78 
80  static unsigned long long getRevision();
81 
83  static int getABI();
84 
86  static std::string getRevString();
87 
96  static bool check()
97  {
98  return getMajor()==LUNCHBOX_VERSION_MAJOR &&
99  getMinor()==LUNCHBOX_VERSION_MINOR;
100  }
101 
103  static std::string getSchema()
104  {
105  return R"(
106  {
107  "title": "Version",
108  "type": "object",
109  "description": "Version information of the running application",
110  "properties": {
111  "major": { "type": "integer" },
112  "minor": { "type": "integer" },
113  "patch": { "type": "integer" },
114  "abi": { "type": "integer" },
115  "revision": { "type": "string" }
116  }
117  }
118  )";
119  }
120 
122  static std::string toJSON()
123  {
124  return R"(
125  {
126  "major": 1,
127  "minor": 17,
128  "patch": 0,
129  "abi": 10,
130  "revision": "3231f29"
131  }
132  )";
133  }
134 };
135 
136 }
137 
138 #endif
Defines export visibility macros for library Lunchbox.
static std::string toJSON()
Definition: version.h:122
static bool check()
Runtime check for ABI compatibility.
Definition: version.h:96
static std::string getSchema()
Definition: version.h:103
#define LUNCHBOX_VERSION_MAJOR
The current major version.
Definition: version.h:17
Abstraction layer and common utilities for multi-threaded programming.
Definition: algorithm.h:29
#define LUNCHBOX_VERSION_MINOR
The current minor version.
Definition: version.h:20
Information about the current Lunchbox version.
Definition: version.h:64