Isomet Modular Synthesiser (iMS) API  v1.4.2
iMS API
IEventHandler.h
Go to the documentation of this file.
1 /*-----------------------------------------------------------------------------
2 / Title : Event Handler Interface Header
3 / Project : Isomet Modular Synthesiser System
4 /------------------------------------------------------------------------------
5 / File : $URL: http://nutmeg.qytek.lan/svn/sw/trunk/09-Isomet/iMS_SDK/API/EventManager/h/IEventHandler.h $
6 / Author : $Author: dave $
7 / Company : Isomet (UK) Ltd
8 / Created : 2015-04-09
9 / Last update: $Date: 2017-09-11 23:55:34 +0100 (Mon, 11 Sep 2017) $
10 / Platform :
11 / Standard : C++11
12 / Revision : $Rev: 300 $
13 /------------------------------------------------------------------------------
14 / Description:
15 /------------------------------------------------------------------------------
16 / Copyright (c) 2015 Isomet (UK) Ltd. All Rights Reserved.
17 /------------------------------------------------------------------------------
18 / Revisions :
19 / Date Version Author Description
20 / 2015-04-09 1.0 dc Created
21 /
22 /----------------------------------------------------------------------------*/
23 
34 
35 #ifndef IMS_EVENT_HANDLER_H__
36 #define IMS_EVENT_HANDLER_H__
37 
39 #if defined _WIN32 || defined __CYGWIN__
40  #ifdef __GNUC__
41  #define DLL_EXPORT __attribute__ ((dllexport))
42  #define DLL_IMPORT __attribute__ ((dllimport))
43  #else
44  #define DLL_EXPORT __declspec(dllexport) // Note: actually gcc seems to also supports this syntax.
45  #define DLL_IMPORT __declspec(dllimport) // Note: actually gcc seems to also supports this syntax.
46  #endif
47  #define DLL_LOCAL
48 #else
49  #if __GNUC__ >= 4
50  #define DLL_EXPORT __attribute__ ((visibility ("default")))
51  #define DLL_IMPORT __attribute__ ((visibility ("default")))
52  #define DLL_LOCAL __attribute__ ((visibility ("hidden")))
53  #else
54  #define DLL_EXPORT
55  #define DLL_IMPORT
56  #define DLL_LOCAL
57  #endif
58 #endif
59 
60 #if defined(_EXPORTING_IMS)
61  #define LIBSPEC DLL_EXPORT
62  #define LIBLOCAL DLL_LOCAL
63  #define EXPIMP_TEMPLATE
64 #elif defined(_STATIC_IMS)
65  #define LIBSPEC
66  #define LIBLOCAL
67  #define EXPIMP_TEMPLATE
68 #else
69  #define LIBSPEC DLL_IMPORT
70  #define LIBLOCAL DLL_LOCAL
71  #define EXPIMP_TEMPLATE extern
72 #endif
73 
75 #include <vector>
76 #include <cstdint>
77 
78 namespace iMS {
146  class LIBSPEC IEventHandler
147  {
148  public:
150  IEventHandler();
152  virtual ~IEventHandler();
155  bool operator == (const IEventHandler e);
156 
159 
160  virtual void EventAction(void* sender, const int message, const int param = 0);
186  virtual void EventAction(void* sender, const int message, const int param, const int param2);
199  virtual void EventAction(void* sender, const int message, const double param);
213  virtual void EventAction(void* sender, const int message, const int param, const std::vector<std::uint8_t> data);
215  private:
216  int mID;
217  static int mIDCount;
218  };
219 
220 }
221 
222 #undef EXPIMP_TEMPLATE
223 #undef LIBSPEC
224 #endif
The entire API is encapsulated by the iMS namespace.
Definition: Auxiliary.h:95
Interface Class for an Event Handler to be defined in User Code and subscribed to library events...
Definition: IEventHandler.h:146