11 #ifndef MIDGE_SIGNAL_SLOT_IMPL_HH_ 12 #define MIDGE_SIGNAL_SLOT_IMPL_HH_ 23 template<
typename... x_args >
27 m_slot< x_args... >* derived_slot =
dynamic_cast< m_slot< x_args...
>* >( p_slot );
28 if( p_slot ==
nullptr )
30 throw error() <<
"signal/slot signature mismatch: signal=" << f_name <<
"; slot=" << p_slot->name();
34 int connection_id = connect_function( derived_slot->function() );
37 derived_slot->connections().insert( std::pair<
int,
m_signal< x_args... >* >( connection_id,
this ) );
46 template<
typename... x_args >
49 for(
auto connection : f_connections )
51 connection.second->disconnect( connection.first );
virtual unsigned connect(slot *p_slot)