How does libsigc++ accept member functions?



Hi, Murray,
I'm trying (in vain) to understand how it works. In my AVR-GCC program I'd like
to implement some mechanism to use libsigc++ - like callback functions.
The compiler prevents me from transferring things like
&Dispatcher::on_settings_button_pressed to a button (self-made, too).
I've managed to do this trick only by use of a standalone function:
"
extern Dispatcher *disp;

bool on_settings_button_pressed(void)
{
   disp->beeper.beep();
   return false;
}

"
Because it looks very ugly, I'm eager to understand how did you bypassed all this stuff using libsigc++?
I mean, when you call sigc::mem_func(*this, &Some_Class::member_function),
how is it then happen, that it is possible to handle this member function?
Right now I'm eagerly searching through the latest libsigc++ source texts.

Hopefully,
   Igor Gorbounov


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]