Collage  1.1.2
High-performance C++ library for developing object-oriented distributed applications.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Pages
version.h
1 /* Copyright (c) 2014 Stefan.Eilemann@epfl.ch */
2 
3 #ifndef COLLAGE_VERSION_H
4 #define COLLAGE_VERSION_H
5 
6 #include <co/api.h>
7 #include <string>
8 
9 namespace co
10 {
12 # define CO_VERSION_MAJOR 1
13 
15 # define CO_VERSION_MINOR 1
16 
18 # define CO_VERSION_PATCH 2
19 
21 # define CO_VERSION_REVISION 0xee1a2ac
22 
24 # define CO_VERSION_ABI 2
25 
27 # define CO_VERSION_GT( MAJOR, MINOR, PATCH ) \
28  ( (CO_VERSION_MAJOR>MAJOR) || \
29  (CO_VERSION_MAJOR==MAJOR && (CO_VERSION_MINOR>MINOR || \
30  (CO_VERSION_MINOR==MINOR && CO_VERSION_PATCH>PATCH))))
31 
33 # define CO_VERSION_GE( MAJOR, MINOR, PATCH ) \
34  ( (CO_VERSION_MAJOR>MAJOR) || \
35  (CO_VERSION_MAJOR==MAJOR && (CO_VERSION_MINOR>MINOR || \
36  (CO_VERSION_MINOR==MINOR && CO_VERSION_PATCH>=PATCH))))
37 
39 # define CO_VERSION_LT( MAJOR, MINOR, PATCH ) \
40  ( (CO_VERSION_MAJOR<MAJOR) || \
41  (CO_VERSION_MAJOR==MAJOR && (CO_VERSION_MINOR<MINOR || \
42  (CO_VERSION_MINOR==MINOR && CO_VERSION_PATCH<PATCH))))
43 
45 # define CO_VERSION_LE( MAJOR, MINOR, PATCH ) \
46  ( (CO_VERSION_MAJOR<MAJOR) || \
47  (CO_VERSION_MAJOR==MAJOR && (CO_VERSION_MINOR<MINOR || \
48  (CO_VERSION_MINOR==MINOR && CO_VERSION_PATCH<=PATCH))))
49 
51 class CO_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()==CO_VERSION_MAJOR &&
86  getMinor()==CO_VERSION_MINOR;
87  }
88 };
89 
90 }
91 
92 #endif
Defines export visibility macros for Collage.
static bool check()
Runtime check for ABI compatibility.
Definition: version.h:83
Information about the current Collage version.
Definition: version.h:51