include
sot
core
macros-signal.hh
Go to the documentation of this file.
1
/*
2
* Copyright 2010,
3
* François Bleibel,
4
* Olivier Stasse,
5
*
6
* CNRS/AIST
7
*
8
*/
9
10
/* --- GENERIC MACROS ------------------------------------------------------- */
11
/* --- GENERIC MACROS ------------------------------------------------------- */
12
/* --- GENERIC MACROS ------------------------------------------------------- */
13
14
#define SOT_CALL_SIG(sotName, sotType) \
15
boost::bind(&Signal<sotType, sigtime_t>::access, &sotName, _2)
16
17
/* --- STATIC MACROS -------------------------------------------------------- */
18
/* --- STATIC MACROS -------------------------------------------------------- */
19
/* --- STATIC MACROS -------------------------------------------------------- */
20
21
#define SOT_INIT_SIGNAL_1(sotFunction, sotArg1, sotArg1Type) \
22
boost::bind(&sotFunction, SOT_CALL_SIG(sotArg1, sotArg1Type), _1), sotArg1
23
24
#define SOT_INIT_SIGNAL_2(sotFunction, sotArg1, sotArg1Type, sotArg2, \
25
sotArg2Type) \
26
boost::bind(&sotFunction, SOT_CALL_SIG(sotArg1, sotArg1Type), \
27
SOT_CALL_SIG(sotArg2, sotArg2Type), _1), \
28
sotArg1 << sotArg2
29
#define SOT_INIT_SIGNAL_3(sotFunction, sotArg1, sotArg1Type, sotArg2, \
30
sotArg2Type, sotArg3, sotArg3Type) \
31
boost::bind(&sotFunction, SOT_CALL_SIG(sotArg1, sotArg1Type), \
32
SOT_CALL_SIG(sotArg2, sotArg2Type), \
33
SOT_CALL_SIG(sotArg3, sotArg3Type), _1), \
34
sotArg1 << sotArg2 << sotArg3
35
36
#define SOT_INIT_SIGNAL_4(sotFunction, sotArg1, sotArg1Type, sotArg2, \
37
sotArg2Type, sotArg3, sotArg3Type, sotArg4, \
38
sotArg4Type) \
39
boost::bind(&sotFunction, SOT_CALL_SIG(sotArg1, sotArg1Type), \
40
SOT_CALL_SIG(sotArg2, sotArg2Type), \
41
SOT_CALL_SIG(sotArg3, sotArg3Type), \
42
SOT_CALL_SIG(sotArg4, sotArg4Type), _1), \
43
sotArg1 << sotArg2 << sotArg3 << sotArg4
44
45
#define SOT_INIT_SIGNAL_5(sotFunction, sotArg1, sotArg1Type, sotArg2, \
46
sotArg2Type, sotArg3, sotArg3Type, sotArg4, \
47
sotArg4Type, sotArg5, sotArg5Type) \
48
boost::bind(&sotFunction, SOT_CALL_SIG(sotArg1, sotArg1Type), \
49
SOT_CALL_SIG(sotArg2, sotArg2Type), \
50
SOT_CALL_SIG(sotArg3, sotArg3Type), \
51
SOT_CALL_SIG(sotArg4, sotArg4Type), \
52
SOT_CALL_SIG(sotArg5, sotArg5Type), _1), \
53
sotArg1 << sotArg2 << sotArg3 << sotArg4 << sotArg5
54
55
#define SOT_INIT_SIGNAL_6(sotFunction, sotArg1, sotArg1Type, sotArg2, \
56
sotArg2Type, sotArg3, sotArg3Type, sotArg4, \
57
sotArg4Type, sotArg5, sotArg5Type, sotArg6, \
58
sotArg6Type) \
59
boost::bind( \
60
&sotFunction, SOT_CALL_SIG(sotArg1, sotArg1Type), \
61
SOT_CALL_SIG(sotArg2, sotArg2Type), SOT_CALL_SIG(sotArg3, sotArg3Type), \
62
SOT_CALL_SIG(sotArg4, sotArg4Type), SOT_CALL_SIG(sotArg5, sotArg5Type), \
63
SOT_CALL_SIG(sotArg6, sotArg6Type), _1), \
64
sotArg1 << sotArg2 << sotArg3 << sotArg4 << sotArg5 << sotArg6
65
66
#define SOT_INIT_SIGNAL_7(sotFunction, sotArg1, sotArg1Type, sotArg2, \
67
sotArg2Type, sotArg3, sotArg3Type, sotArg4, \
68
sotArg4Type, sotArg5, sotArg5Type, sotArg6, \
69
sotArg6Type, sotArg7, sotArg7Type) \
70
boost::bind( \
71
&sotFunction, SOT_CALL_SIG(sotArg1, sotArg1Type), \
72
SOT_CALL_SIG(sotArg2, sotArg2Type), SOT_CALL_SIG(sotArg3, sotArg3Type), \
73
SOT_CALL_SIG(sotArg4, sotArg4Type), SOT_CALL_SIG(sotArg5, sotArg5Type), \
74
SOT_CALL_SIG(sotArg6, sotArg6Type), SOT_CALL_SIG(sotArg7, sotArg7Type), \
75
_1), \
76
sotArg1 << sotArg2 << sotArg3 << sotArg4 << sotArg5 << sotArg6 \
77
<< sotArg7
78
79
/* --- MEMBERS MACROS ------------------------------------------------------- */
80
/* --- MEMBERS MACROS ------------------------------------------------------- */
81
/* --- MEMBERS MACROS ------------------------------------------------------- */
82
83
#define SOT_MEMBER_SIGNAL_1(sotFunction, sotArg1, sotArg1Type) \
84
boost::bind(&sotFunction, this, SOT_CALL_SIG(sotArg1, sotArg1Type), _1), \
85
sotArg1
86
87
#define SOT_MEMBER_SIGNAL_2(sotFunction, sotArg1, sotArg1Type, sotArg2, \
88
sotArg2Type) \
89
boost::bind(&sotFunction, this, SOT_CALL_SIG(sotArg1, sotArg1Type), \
90
SOT_CALL_SIG(sotArg2, sotArg2Type), _1), \
91
sotArg1 << sotArg2
92
93
#define SOT_MEMBER_SIGNAL_4(sotFunction, sotArg1, sotArg1Type, sotArg2, \
94
sotArg2Type, sotArg3, sotArg3Type, sotArg4, \
95
sotArg4Type) \
96
boost::bind(&sotFunction, this, SOT_CALL_SIG(sotArg1, sotArg1Type), \
97
SOT_CALL_SIG(sotArg2, sotArg2Type), \
98
SOT_CALL_SIG(sotArg3, sotArg3Type), \
99
SOT_CALL_SIG(sotArg4, sotArg4Type), _1), \
100
sotArg1 << sotArg2 << sotArg3 << sotArg4
101
102
#define SOT_MEMBER_SIGNAL_5(sotFunction, sotArg1, sotArg1Type, sotArg2, \
103
sotArg2Type, sotArg3, sotArg3Type, sotArg4, \
104
sotArg4Type, sotArg5, sotArg5Type) \
105
boost::bind(&sotFunction, this, SOT_CALL_SIG(sotArg1, sotArg1Type), \
106
SOT_CALL_SIG(sotArg2, sotArg2Type), \
107
SOT_CALL_SIG(sotArg3, sotArg3Type), \
108
SOT_CALL_SIG(sotArg4, sotArg4Type), \
109
SOT_CALL_SIG(sotArg5, sotArg5Type), _1), \
110
sotArg1 << sotArg2 << sotArg3 << sotArg4 << sotArg5
111
112
#define SOT_MEMBER_SIGNAL_6(sotFunction, sotArg1, sotArg1Type, sotArg2, \
113
sotArg2Type, sotArg3, sotArg3Type, sotArg4, \
114
sotArg4Type, sotArg5, sotArg5Type, sotArg6, \
115
sotArg6Type) \
116
boost::bind( \
117
&sotFunction, this, SOT_CALL_SIG(sotArg1, sotArg1Type), \
118
SOT_CALL_SIG(sotArg2, sotArg2Type), SOT_CALL_SIG(sotArg3, sotArg3Type), \
119
SOT_CALL_SIG(sotArg4, sotArg4Type), SOT_CALL_SIG(sotArg5, sotArg5Type), \
120
SOT_CALL_SIG(sotArg6, sotArg6Type), _1), \
121
sotArg1 << sotArg2 << sotArg3 << sotArg4 << sotArg5 << sotArg6
sot-core
Author(s): Olivier Stasse, ostasse@laas.fr
autogenerated on Tue Oct 24 2023 02:26:31