hwsd  1.1.1
 All Classes Files Functions Variables Enumerations Enumerator Pages
version.h
1 /* Copyright (c) 2014 Stefan.Eilemann@epfl.ch */
2 
3 #ifndef HWSD_VERSION_H
4 #define HWSD_VERSION_H
5 
6 #include <hwsd/api.h>
7 #include <string>
8 
9 namespace hwsd
10 {
12 # define HWSD_VERSION_MAJOR 1
13 
15 # define HWSD_VERSION_MINOR 1
16 
18 # define HWSD_VERSION_PATCH 1
19 
21 # define HWSD_VERSION_REVISION 0x878f4a8
22 
24 # define HWSD_VERSION_ABI 2
25 
27 # define HWSD_VERSION_GT( MAJOR, MINOR, PATCH ) \
28  ( (HWSD_VERSION_MAJOR>MAJOR) || \
29  (HWSD_VERSION_MAJOR==MAJOR && (HWSD_VERSION_MINOR>MINOR || \
30  (HWSD_VERSION_MINOR==MINOR && HWSD_VERSION_PATCH>PATCH))))
31 
33 # define HWSD_VERSION_GE( MAJOR, MINOR, PATCH ) \
34  ( (HWSD_VERSION_MAJOR>MAJOR) || \
35  (HWSD_VERSION_MAJOR==MAJOR && (HWSD_VERSION_MINOR>MINOR || \
36  (HWSD_VERSION_MINOR==MINOR && HWSD_VERSION_PATCH>=PATCH))))
37 
39 # define HWSD_VERSION_LT( MAJOR, MINOR, PATCH ) \
40  ( (HWSD_VERSION_MAJOR<MAJOR) || \
41  (HWSD_VERSION_MAJOR==MAJOR && (HWSD_VERSION_MINOR<MINOR || \
42  (HWSD_VERSION_MINOR==MINOR && HWSD_VERSION_PATCH<PATCH))))
43 
45 # define HWSD_VERSION_LE( MAJOR, MINOR, PATCH ) \
46  ( (HWSD_VERSION_MAJOR<MAJOR) || \
47  (HWSD_VERSION_MAJOR==MAJOR && (HWSD_VERSION_MINOR<MINOR || \
48  (HWSD_VERSION_MINOR==MINOR && HWSD_VERSION_PATCH<=PATCH))))
49 
51 class HWSD_API Version
52 {
53 public:
55  static int getMajor();
56 
58  static int getMinor();
59 
61  static int getPatch();
62 
64  static std::string getString();
65 
67  static int getRevision();
68 
70  static int getABI();
71 
73  static std::string getRevString();
74 
83  static bool check()
84  {
85  return getMajor()==HWSD_VERSION_MAJOR &&
86  getMinor()==HWSD_VERSION_MINOR;
87  }
88 };
89 
90 }
91 
92 #endif
Defines export visibility macros for hwsd.
Information about the current hwsd version.
Definition: version.h:51
static bool check()
Runtime check for ABI compatibility.
Definition: version.h:83