First of all, I know there are excellent implementations (Qt, Boost, cpp-event, etc.), but I ask the question because I want to know how it works !
If I understand correctly, the "event system" uses the Observer pattern : some objects are observing, waiting for something to happen... and some others send signals. All right.
So, let's say I've got my observer class, with this kind of thing :
void Observer::getNotified()
{
// Do stuff
}
My question is : how to manage dynamically what kind of stuff should be done ? I've seen a lot of people saying specifically not to use functions pointers. For my current need, I can do a switch statement, a enum type, and select different behaviors, but that's not very satisfying. So, if it's not functions pointers, how is it done ?