11 #ifndef CALLER_ADAPTER_031DC27E_9A5F_4D54_A107_310F31977E26 12 #define CALLER_ADAPTER_031DC27E_9A5F_4D54_A107_310F31977E26 14 #ifndef SX_CPP03_BOOST 16 #include "essentials/compatibility/compatibility.hpp" 23 class event_collector;
30 sxe::function<void()>
adapt( T* _class,
void ( T::*method )() )
32 return( [_class, method]()
34 ( _class->*method )();
41 sxe::function<void()>
adapt( T* _class,
void ( T::*method )( )
const )
43 return( [_class, method]()
45 ( _class->*method )( );
51 template<
typename T,
typename _event_type>
52 sxe::function<void( const _event_type& )>
adapt( T* _class,
53 void ( T::*method )(
const _event_type& ) )
55 return( [_class, method](
const _event_type& _event)
57 ( _class->*method )( _event );
63 template<
typename T,
typename _event_type>
64 sxe::function<void( const _event_type&)>
adapt( T* _class,
65 void ( T::*method )(
const _event_type& )
const )
67 return( [_class, method](
const _event_type& _event )
69 ( _class->*method )( _event );
76 sxe::function<void( sxy::event_collector& )>
adapt( T* _class,
81 ( _class->*method )( _event_collector );
88 sxe::function<void( sxy::event_collector& )>
adapt( T* _class,
93 ( _class->*method )( _event_collector );
99 template<
typename T,
typename _event_type>
100 sxe::function<void( const _event_type&, sxy::event_collector& )>
adapt( T* _class,
105 ( _class->*method )( _event, _event_collector );
111 template<
typename T,
typename _event_type>
112 sxe::function<void( const _event_type&, sxy::event_collector& )>
adapt( T* _class,
117 ( _class->*method )( _event, _event_collector );
126 template<
typename _event_type >
128 void ( *_function )(
const _event_type& ) )
130 return( [ _function ](
const _event_type& _event )
132 ( *_function )( _event );
141 template<
typename _event_type >
147 ( *_function )( _event, _event_collector );
155 sxe::function<bool()>
adapt( T* _class,
bool ( T::*method )() )
157 return( [_class, method]()
159 return( ( _class->*method )( ) );
166 sxe::function<bool()>
adapt( T* _class,
bool ( T::*method )()
const )
168 return( [_class, method]()
170 return( ( _class->*method )( ) );
176 template<
typename T,
typename _event_type>
177 sxe::function<bool( const _event_type& )>
adapt( T* _class,
bool ( T::*method )(
const _event_type& ) )
179 return( [_class, method](
const _event_type& _event )
181 return( ( _class->*method )( _event ) );
187 template<
typename T,
typename _event_type>
188 sxe::function<bool( const _event_type& )>
adapt( T* _class,
bool ( T::*method )(
const _event_type& )
const )
190 return( [_class, method](
const _event_type& _event )
192 return( ( _class->*method )( _event ) );
199 sxe::function<bool( sxy::event_collector& )>
adapt( T* _class,
204 return ( ( _class->*method )( _event_collector ) );
211 sxe::function<bool( sxy::event_collector& )>
adapt( T* _class,
216 return( ( _class->*method )( _event_collector ) );
222 template<
typename T,
typename _event_type>
223 sxe::function<bool( const _event_type&, sxy::event_collector& )>
adapt( T* _class,
228 return( ( _class->*method )( _event, _event_collector ) );
234 template<
typename T,
typename _event_type>
235 sxe::function<bool( const _event_type&, sxy::event_collector& )>
adapt( T* _class,
240 return( ( _class->*method )( _event, _event_collector ) );
249 template<
typename _event_type >
250 sxe::function<bool( const _event_type& )>
adapt_function(
bool( *_function )(
const _event_type& ) )
252 return( [_function](
const _event_type& _event )
254 return( ( *_function )( _event ) );
263 template<
typename _event_type >
269 return( ( *_function )( _event, _event_collector ) );
Definition: event_collector.hpp:25
sxe::function< void()> adapt(T *_class, void(T::*method)())
Definition: caller_adapter.hpp:30
Definition: algorithm_parameters.hpp:16
sxe::function< void(sxy::event_collector &)> adapt_function(void(*_function)(sxy::event_collector &))
Definition: caller_adapter.hpp:138