12 #ifndef CREATE_BEHAVIOR_FUNCTION_AE991E8C_8970_4642_AAAF_983076825DAB 13 #define CREATE_BEHAVIOR_FUNCTION_AE991E8C_8970_4642_AAAF_983076825DAB 20 #ifndef SX_CPP03_BOOST // C++11 22 #ifdef SX_GCC_EXPAND_TEMPLATE_PARAM_PACK_BUG 29 template<
typename function1 >
36 template<
typename function1,
typename function2 >
43 template<
typename function1,
typename function2,
typename function3 >
50 template<
typename function1,
typename function2,
typename function3,
typename function4 >
57 template<
typename function1,
typename function2,
typename function3,
typename function4,
typename function5 >
60 return (
sxy::behavior_function( [_function1, _function2, _function3, _function4, _function5](
const sxy::event& _event,
sxy::event_collector& _event_collector ) {
behavior_caller( _event, _event_collector, _function1, _function2, _function3, _function4, _function5 ); } ) );
64 template<
typename function1,
typename function2,
typename function3,
typename function4,
typename function5,
typename function6 >
67 return (
sxy::behavior_function( [_function1, _function2, _function3, _function4, _function5, _function6](
const sxy::event& _event,
sxy::event_collector& _event_collector ) {
behavior_caller( _event, _event_collector, _function1, _function2, _function3, _function4, _function5, _function6 ); } ) );
71 template<
typename function1,
typename function2,
typename function3,
typename function4,
typename function5,
typename function6,
typename function7 >
72 sxy::behavior_function create_behavior_function(
const function1& _function1,
const function2& _function2,
const function3& _function3,
const function4& _function4,
const function5& _function5,
const function6& _function6,
const function7& _function7 )
74 return (
sxy::behavior_function( [_function1, _function2, _function3, _function4, _function5, _function6, _function7](
const sxy::event& _event,
sxy::event_collector& _event_collector ) {
behavior_caller( _event, _event_collector, _function1, _function2, _function3, _function4, _function5, _function6, _function7 ); } ) );
78 template<
typename function1,
typename function2,
typename function3,
typename function4,
typename function5,
typename function6,
typename function7,
typename function8 >
79 sxy::behavior_function create_behavior_function(
const function1& _function1,
const function2& _function2,
const function3& _function3,
const function4& _function4,
const function5& _function5,
const function6& _function6,
const function7& _function7,
const function8& _function8 )
81 return (
sxy::behavior_function( [_function1, _function2, _function3, _function4, _function5, _function6, _function7, _function8](
const sxy::event& _event,
sxy::event_collector& _event_collector ) {
behavior_caller( _event, _event_collector, _function1, _function2, _function3, _function4, _function5, _function6, _function7, _function8 ); } ) );
85 template<
typename function1,
typename function2,
typename function3,
typename function4,
typename function5,
typename function6,
typename function7,
typename function8,
typename function9 >
86 sxy::behavior_function create_behavior_function(
const function1& _function1,
const function2& _function2,
const function3& _function3,
const function4& _function4,
const function5& _function5,
const function6& _function6,
const function7& _function7,
const function8& _function8,
const function9& _function9 )
88 return (
sxy::behavior_function( [_function1, _function2, _function3, _function4, _function5, _function6, _function7, _function8, _function9](
const sxy::event& _event,
sxy::event_collector& _event_collector ) {
behavior_caller( _event, _event_collector, _function1, _function2, _function3, _function4, _function5, _function6, _function7, _function8, _function9 ); } ) );
92 template<
typename function1,
typename function2,
typename function3,
typename function4,
typename function5,
typename function6,
typename function7,
typename function8,
typename function9,
typename function10 >
93 sxy::behavior_function create_behavior_function(
const function1& _function1,
const function2& _function2,
const function3& _function3,
const function4& _function4,
const function5& _function5,
const function6& _function6,
const function7& _function7,
const function8& _function8,
const function9& _function9,
const function10& _function10 )
95 return (
sxy::behavior_function( [_function1, _function2, _function3, _function4, _function5, _function6, _function7, _function8, _function9, _function10](
const sxy::event& _event,
sxy::event_collector& _event_collector ) {
behavior_caller( _event, _event_collector, _function1, _function2, _function3, _function4, _function5, _function6, _function7, _function8, _function9, _function10 ); } ) );
99 #else // !SX_GCC_EXPAND_TEMPLATE_PARAM_PACK_BUG 105 template<
typename ... Args >
115 #endif // SX_GCC_EXPAND_TEMPLATE_PARAM_PACK_BUG 118 #else // C++03 with Boost 131 template<
typename _event_type >
139 template<
typename _event_type >
144 typedef void( *behavior_caller_selector )(
const sxy::event&,
sxy::event_collector&,
const sxe::function<void( const _event_type&, sxy::event_collector& )>& );
149 template<
typename _event_type1,
typename _event_type2 >
156 const sxe::function<void( const _event_type1&, sxy::event_collector& )>&,
157 const sxe::function<void( const _event_type2&, sxy::event_collector& )>&
163 template<
typename _event_type1,
typename _event_type2,
typename _event_type3 >
171 const sxe::function<void( const _event_type1&, sxy::event_collector& )>&,
172 const sxe::function<void( const _event_type2&, sxy::event_collector& )>&,
173 const sxe::function<void( const _event_type3&, sxy::event_collector& )>&
179 template<
typename _event_type1,
typename _event_type2,
typename _event_type3,
typename _event_type4 >
188 const sxe::function<void( const _event_type1&, sxy::event_collector& )>&,
189 const sxe::function<void( const _event_type2&, sxy::event_collector& )>&,
190 const sxe::function<void( const _event_type3&, sxy::event_collector& )>&,
191 const sxe::function<void( const _event_type4&, sxy::event_collector& )>&
197 template<
typename _event_type1,
typename _event_type2,
typename _event_type3,
typename _event_type4,
typename _event_type5 >
207 const sxe::function<void( const _event_type1&, sxy::event_collector& )>&,
208 const sxe::function<void( const _event_type2&, sxy::event_collector& )>&,
209 const sxe::function<void( const _event_type3&, sxy::event_collector& )>&,
210 const sxe::function<void( const _event_type4&, sxy::event_collector& )>&,
211 const sxe::function<void( const _event_type5&, sxy::event_collector& )>&
213 return(
sxy::behavior_function( sxe::bind( static_cast< behavior_caller_selector >(
behavior_caller ), sxe::_1, sxe::_2, _function1, _function2, _function3, _function4, _function5 ) ) );
217 template<
typename _event_type1,
typename _event_type2,
typename _event_type3,
typename _event_type4,
typename _event_type5,
typename _event_type6 >
228 const sxe::function<void( const _event_type1&, sxy::event_collector& )>&,
229 const sxe::function<void( const _event_type2&, sxy::event_collector& )>&,
230 const sxe::function<void( const _event_type3&, sxy::event_collector& )>&,
231 const sxe::function<void( const _event_type4&, sxy::event_collector& )>&,
232 const sxe::function<void( const _event_type5&, sxy::event_collector& )>&,
233 const sxe::function<void( const _event_type6&, sxy::event_collector& )>&
235 return(
sxy::behavior_function( sxe::bind( static_cast< behavior_caller_selector >(
behavior_caller ), sxe::_1, sxe::_2, _function1, _function2, _function3, _function4, _function5, _function6 ) ) );
239 template<
typename _event_type1,
typename _event_type2,
typename _event_type3,
typename _event_type4,
typename _event_type5,
typename _event_type6,
typename _event_type7 >
251 const sxe::function<void( const _event_type1&, sxy::event_collector& )>&,
252 const sxe::function<void( const _event_type2&, sxy::event_collector& )>&,
253 const sxe::function<void( const _event_type3&, sxy::event_collector& )>&,
254 const sxe::function<void( const _event_type4&, sxy::event_collector& )>&,
255 const sxe::function<void( const _event_type5&, sxy::event_collector& )>&,
256 const sxe::function<void( const _event_type6&, sxy::event_collector& )>&,
257 const sxe::function<void( const _event_type7&, sxy::event_collector& )>&
259 return(
sxy::behavior_function( sxe::bind( static_cast< behavior_caller_selector >(
behavior_caller ), sxe::_1, sxe::_2, _function1, _function2, _function3, _function4, _function5, _function6, _function7 ) ) );
263 template<
typename _event_type1,
typename _event_type2,
typename _event_type3,
typename _event_type4,
typename _event_type5,
typename _event_type6,
typename _event_type7,
typename _event_type8 >
276 const sxe::function<void( const _event_type1&, sxy::event_collector& )>&,
277 const sxe::function<void( const _event_type2&, sxy::event_collector& )>&,
278 const sxe::function<void( const _event_type3&, sxy::event_collector& )>&,
279 const sxe::function<void( const _event_type4&, sxy::event_collector& )>&,
280 const sxe::function<void( const _event_type5&, sxy::event_collector& )>&,
281 const sxe::function<void( const _event_type6&, sxy::event_collector& )>&,
282 const sxe::function<void( const _event_type7&, sxy::event_collector& )>&,
283 const sxe::function<void( const _event_type8&, sxy::event_collector& )>&
285 return(
sxy::behavior_function( sxe::bind( static_cast< behavior_caller_selector >(
behavior_caller ), sxe::_1, sxe::_2, _function1, _function2, _function3, _function4, _function5, _function6, _function7, _function8 ) ) );
289 template<
typename _event_type1,
typename _event_type2,
typename _event_type3,
typename _event_type4,
typename _event_type5,
typename _event_type6,
typename _event_type7,
typename _event_type8,
typename _event_type9 >
303 const sxe::function<void( const _event_type1&, sxy::event_collector& )>&,
304 const sxe::function<void( const _event_type2&, sxy::event_collector& )>&,
305 const sxe::function<void( const _event_type3&, sxy::event_collector& )>&,
306 const sxe::function<void( const _event_type4&, sxy::event_collector& )>&,
307 const sxe::function<void( const _event_type5&, sxy::event_collector& )>&,
308 const sxe::function<void( const _event_type6&, sxy::event_collector& )>&,
309 const sxe::function<void( const _event_type7&, sxy::event_collector& )>&,
310 const sxe::function<void( const _event_type8&, sxy::event_collector& )>&,
311 const sxe::function<void( const _event_type9&, sxy::event_collector& )>&
313 return(
sxy::behavior_function( sxe::bind( static_cast< behavior_caller_selector >(
behavior_caller ), sxe::_1, sxe::_2, _function1, _function2, _function3, _function4, _function5, _function6, _function7, _function8, _function9 ) ) );
317 template<
typename _event_type1,
typename _event_type2,
typename _event_type3,
typename _event_type4,
typename _event_type5,
typename _event_type6,
typename _event_type7,
typename _event_type8,
typename _event_type9,
typename _event_type10 >
332 const sxe::function<void( const _event_type1&, sxy::event_collector& )>&,
333 const sxe::function<void( const _event_type2&, sxy::event_collector& )>&,
334 const sxe::function<void( const _event_type3&, sxy::event_collector& )>&,
335 const sxe::function<void( const _event_type4&, sxy::event_collector& )>&,
336 const sxe::function<void( const _event_type5&, sxy::event_collector& )>&,
337 const sxe::function<void( const _event_type6&, sxy::event_collector& )>&,
338 const sxe::function<void( const _event_type7&, sxy::event_collector& )>&,
339 const sxe::function<void( const _event_type8&, sxy::event_collector& )>&,
340 const sxe::function<void( const _event_type9&, sxy::event_collector& )>&,
341 const sxe::function<void( const _event_type10&, sxy::event_collector& )>&
343 return(
sxy::behavior_function( sxe::bind( static_cast< behavior_caller_selector >(
behavior_caller ), sxe::_1, sxe::_2, _function1, _function2, _function3, _function4, _function5, _function6, _function7, _function8, _function9, _function10 ) ) );
349 #endif // !SX_CPP03_BOOST Definition: event_collector.hpp:25
Interface of an event. An event has an ID, a name and a priority (for processing by the async state m...
Definition: event.hpp:28
Definition: adapter_cpp11.hpp:21
void behavior_caller(const sxy::event &_event, sxy::event_collector &_event_collector, const sxe::function< void()> &_function)
Definition: behavior_caller.cpp:18
sxy::behavior_function create_behavior_function(Args...args)
Definition: create_behavior_function.hpp:106
sxe::function< void(const event &, event_collector &) > behavior_function
Definition: behavior_fwd.hpp:29