C API Documentation
rrVersionInfo.h
1 #ifndef rrVersionInfoH
2 #define rrVersionInfoH
3 #include "rrExporter.h"
4 #include <string>
5 
6 namespace rr {
7 
8 #ifndef SWIG
9 
10 #define RR_STRINGIZE2(s) #s
11 #define RR_STRINGIZE(s) RR_STRINGIZE2(s)
12 
13 #define RR_VERSION_MAJOR 2
14 #define RR_VERSION_MINOR 0
15 #define RR_VERSION_PATCH 5
16 #define RR_VERSION_STR RR_STRINGIZE(RR_VERSION_MAJOR) "." \
17  RR_STRINGIZE(RR_VERSION_MINOR) "." \
18  RR_STRINGIZE(RR_VERSION_PATCH)
19 
20 
21 #if defined(__llvm__)
22  #define RR_COMPILER "clang " RR_STRINGIZE(__clang_version__)
23 #endif
24 
25 #if defined(__GNUC__) && !defined(__llvm__)
26  #define RR_COMPILER "gcc " RR_STRINGIZE(__GNUC__) "." RR_STRINGIZE(__GNUC_MINOR__) "." RR_STRINGIZE(__GNUC_PATCHLEVEL__)
27 #endif
28 
29 #if defined (_MSC_VER)
30  #if (_MSC_VER == 1800)
31  #define RR_COMPILER "Microsoft Visual Studio 2013"
32  #elif (_MSC_VER == 1900)
33  #define RR_COMPILER "Microsoft Visual Studio 2015"
34  #elif (_MSC_VER == 1700)
35  #define RR_COMPILER "Microsoft Visual Studio 2012"
36  #elif (_MSC_VER == 1600)
37  #define RR_COMPILER "Microsoft Visual Studio 2010"
38  #elif (_MSC_VER == 1500)
39  #define RR_COMPILER "Microsoft Visual Studio 2008"
40  #elif (_MSC_VER == 1400)
41  #define RR_COMPILER "Microsoft Visual Studio 2005"
42  #elif (_MSC_VER == 1310)
43  #define RR_COMPILER "Microsoft Visual Studio 2003"
44  #else
45  #define RR_COMPILER "Microsoft Visual Studio Unknown Version"
46  #endif
47 #endif
48 
49 #if defined (__BORLANDC__)
50  #define RR_COMPILER "Borland"
51 #endif
52 
53 #if !defined(RR_COMPILER)
54  #define RR_COMPILER "Unknown, but evidently working compiler"
55 #endif
56 
57 #endif // SWIG
58 
62 enum VersionStrOptions
63 {
67  VERSIONSTR_BASIC = (0x1 << 0),
68 
72  VERSIONSTR_COMPILER = (0x1 << 1),
73 
77  VERSIONSTR_DATE = (0x1 << 2),
78 
82  VERSIONSTR_LIBSBML = (0x1 << 3),
83 
84  VERSIONSTR_JITCOMPILER = (0x1 << 4),
85 
89  VERSIONSTR_GIT_BRANCH = (0x1 << 5),
90 
94  VERSIONSTR_GIT_COMMIT = (0x1 << 6)
95 };
96 
105 RR_DECLSPEC std::string getVersionStr(unsigned options = VERSIONSTR_BASIC
106  | VERSIONSTR_COMPILER | VERSIONSTR_LIBSBML | VERSIONSTR_JITCOMPILER | VERSIONSTR_DATE);
107 
108 
112 RR_DECLSPEC std::string getCopyrightStr();
113 
114 
115 }
116 
117 #endif
C_DECL_SPEC char *rrcCallConv getVersionStr()