CsSignal  2.0.0
cs_macro.h
1 /***********************************************************************
2 *
3 * Copyright (c) 2016-2025 Barbara Geller
4 * Copyright (c) 2016-2025 Ansel Sermersheim
5 *
6 * This file is part of CsSignal.
7 *
8 * CsSignal is free software which is released under the BSD 2-Clause license.
9 * For license details refer to the LICENSE provided with this project.
10 *
11 * CsSignal is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
14 *
15 * https://opensource.org/licenses/BSD-2-Clause
16 *
17 ***********************************************************************/
18 
19 #ifndef LIB_CS_MACRO_H
20 #define LIB_CS_MACRO_H
21 
22 #if defined(WIN32) || defined(_WIN32) || defined(__WIN32__)
23 
24 #ifdef BUILDING_LIB_CS_SIGNAL
25 # define LIB_SIG_EXPORT __declspec(dllexport)
26 
27 #else
28 # define LIB_SIG_EXPORT __declspec(dllimport)
29 
30 #endif
31 
32 #else
33 # define LIB_SIG_EXPORT
34 
35 #endif
36 
37 
38 // ** signal macros
39 #define SIGNAL_1(...)
40  __VA_ARGS__ {
41 // do not remove the "{", this is required for part two of the macro
42 
43 #define SIGNAL_2(signalName, ...)
44  activate(*this, &std::remove_reference<decltype(*this)>::type::signalName, ##__VA_ARGS__);
45  }
46 
47 
48 #endif