Isomet Modular Synthesiser (iMS) API  v1.4.2
iMS API
LibVersion.h
Go to the documentation of this file.
1 /*-----------------------------------------------------------------------------
2 / Title : Version Header
3 / Project : Isomet Modular Synthesiser System
4 /------------------------------------------------------------------------------
5 / File : $URL: http://nutmeg.qytek.lan/svn/sw/trunk/09-Isomet/iMS_SDK/API/Other/h/LibVersion.h $
6 / Author : $Author: dave $
7 / Company : Isomet (UK) Ltd
8 / Created : 2015-04-09
9 / Last update: $Date: 2017-10-06 15:33:32 +0100 (Fri, 06 Oct 2017) $
10 / Platform :
11 / Standard : C++11
12 / Revision : $Rev: 302 $
13 /------------------------------------------------------------------------------
14 / Description:
15 /------------------------------------------------------------------------------
16 / Copyright (c) 2015 Isomet (UK) Ltd. All Rights Reserved.
17 /
18 /------------------------------------------------------------------------------
19 / Revisions :
20 / Date Version Author Description
21 / 2015-04-09 1.0 dc Created
22 /
23 /----------------------------------------------------------------------------*/
24 
35 
36 
37 #ifndef IMS_LIBVERSION_H__
38 #define IMS_LIBVERSION_H__
39 
40 #include <string>
41 
43 #if defined _WIN32 || defined __CYGWIN__
44  #ifdef __GNUC__
45  #define DLL_EXPORT __attribute__ ((dllexport))
46  #define DLL_IMPORT __attribute__ ((dllimport))
47  #else
48  #define DLL_EXPORT __declspec(dllexport) // Note: actually gcc seems to also supports this syntax.
49  #define DLL_IMPORT __declspec(dllimport) // Note: actually gcc seems to also supports this syntax.
50  #endif
51  #define DLL_LOCAL
52 #else
53  #if __GNUC__ >= 4
54  #define DLL_EXPORT __attribute__ ((visibility ("default")))
55  #define DLL_IMPORT __attribute__ ((visibility ("default")))
56  #define DLL_LOCAL __attribute__ ((visibility ("hidden")))
57  #else
58  #define DLL_EXPORT
59  #define DLL_IMPORT
60  #define DLL_LOCAL
61  #endif
62 #endif
63 
64 #if defined(_EXPORTING_IMS)
65  #define LIBSPEC DLL_EXPORT
66  #define LIBLOCAL DLL_LOCAL
67  #define EXPIMP_TEMPLATE
68 #elif defined(_STATIC_IMS)
69  #define LIBSPEC
70  #define LIBLOCAL
71  #define EXPIMP_TEMPLATE
72 #else
73  #define LIBSPEC DLL_IMPORT
74  #define LIBLOCAL DLL_LOCAL
75  #define EXPIMP_TEMPLATE extern
76 #endif
77 
80 
81 #define IMS_API_MAJOR 1
87 #define IMS_API_MINOR 4
93 #define IMS_API_PATCH 2
99 
100 
107 namespace iMS
108 {
126  class LIBSPEC LibVersion
127  {
128  public:
130 
131  static int GetMajor();
142  static int GetMinor();
148  static int GetPatch();
149 
155  static std::string GetVersion();
157 
159 
160  static bool IsAtLeast(int major, int minor, int patch);
177 
179 
180  static bool HasFeature(const std::string &name);
193  };
194 }
195 
196 #undef EXPIMP_TEMPLATE
197 #undef LIBSPEC
198 #endif
Access the version information for the API.
Definition: LibVersion.h:126
The entire API is encapsulated by the iMS namespace.
Definition: Auxiliary.h:95