11 #ifndef ADAPTER_CPP03_F4E4A216_157F_4271_9E7D_476521F6101E 12 #define ADAPTER_CPP03_F4E4A216_157F_4271_9E7D_476521F6101E 15 #ifndef SX_CPP03_BOOST 24 #include "essentials/compatibility/compatibility.hpp" 31 class event_collector;
35 sxe::function<void()>
adapt( T* _object,
void ( T::*_method )( ) )
37 return( sxe::bind( _method, _object ) );
42 sxe::function<void()>
adapt( T* _object,
void ( T::*_method )( )
const )
44 return( sxe::bind( _method, _object ) );
48 template<
typename T,
typename _event_type>
49 sxe::function<void( const _event_type& )>
adapt( T* _object,
void ( T::*_method )(
const _event_type& ) )
51 return( sxe::bind( _method, _object, sxe::_1 ) );
55 template<
typename T,
typename _event_type>
56 sxe::function<void( const _event_type& )>
adapt( T* _object,
void ( T::*_method )(
const _event_type& )
const )
58 return( sxe::bind( _method, _object, sxe::_1 ) );
65 return( sxe::bind( _method, _object, sxe::_1 ) );
72 return( sxe::bind( _method, _object, sxe::_1 ) );
76 template<
typename T,
typename _event_type>
77 sxe::function<void( const _event_type&, sxy::event_collector& )>
adapt( T* _object,
80 return( sxe::bind( _method, _object, sxe::_1, sxe::_2 ) );
84 template<
typename T,
typename _event_type>
85 sxe::function<void( const _event_type&, sxy::event_collector& )>
adapt( T* _object,
88 return( sxe::bind( _method, _object, sxe::_1, sxe::_2 ) );
98 template<
typename _event_type >
99 sxe::function<void( const _event_type& )>
adapt_function(
void( *_function )(
const _event_type& ) )
101 return( sxe::bind( _function, sxe::_1 ) );
105 template<
typename _event_type >
106 sxe::function<void( const _event_type&, sxy::event_collector& )>
adapt_function(
109 return( sxe::bind( _function, sxe::_1, sxe::_2 ) );
115 sxe::function<bool()>
adapt( T* _object,
bool ( T::*_method )( ) )
117 return( sxe::bind( _method, _object ) );
122 sxe::function<bool()>
adapt( T* _object,
bool ( T::*_method )( )
const )
124 return( sxe::bind( _method, _object ) );
128 template<
typename T,
typename _event_type>
129 sxe::function<bool( const _event_type& )>
adapt( T* _object,
bool ( T::*_method )(
const _event_type& ) )
131 return( sxe::bind( _method, _object, sxe::_1 ) );
135 template<
typename T,
typename _event_type>
136 sxe::function<bool( const _event_type& )>
adapt( T* _object,
bool ( T::*_method )(
const _event_type& )
const )
138 return( sxe::bind( _method, _object, sxe::_1 ) );
143 sxe::function<bool( sxy::event_collector& )>
adapt( T* _object,
146 return( sxe::bind( _method, _object, sxe::_1 ) );
151 sxe::function<bool( sxy::event_collector& )>
adapt( T* _object,
154 return( sxe::bind( _method, _object, sxe::_1 ) );
158 template<
typename T,
typename _event_type>
159 sxe::function<bool( const _event_type&, sxy::event_collector& )>
adapt( T* _object,
162 return( sxe::bind( _method, _object, sxe::_1, sxe::_2 ) );
166 template<
typename T,
typename _event_type>
167 sxe::function<bool( const _event_type&, sxy::event_collector& )>
adapt( T* _object,
170 return( sxe::bind( _method, _object, sxe::_1, sxe::_2 ) );
180 template<
typename _event_type >
181 sxe::function<bool( const _event_type& )>
adapt_function(
bool( *_function )(
const _event_type& ) )
183 return( sxe::bind( _function, sxe::_1 ) );
187 template<
typename _event_type >
188 sxe::function<bool( const _event_type&, sxy::event_collector& )>
adapt_function(
191 return( sxe::bind( _function, sxe::_1, sxe::_2 ) );
Definition: event_collector.hpp:25
Definition: adapter_cpp11.hpp:21
sxe::function< void()> adapt(T *_object, void(T::*_method)())
Definition: adapter_cpp11.hpp:29
sxe::function< void(sxy::event_collector &)> adapt_function(void(*_function)(sxy::event_collector &))
Definition: adapter_cpp11.hpp:125