Hey, I've got a question about general member function pointers. I'm trying to achieve something similar to the following question How to define a general member function pointer
Essentially what I want to be able to do is to register a member function pointer that accepts a generic Event object as its argument with a specific event type (for example, a KeyboardEvent). Then, in my input management class, what I want to be able to do is whenever the user hits a key, I can create a KeyboardEvent object that contains some data about the keypress, and call all of those member function pointers that I registered with the KeyboardEvent type with my KeyboardEvent object as their parameter.
I've been playing around with boost bind and boost function and they seem to enable me to do 95% of what I want to do, the only problem I am trying to store all of the member function pointers in a vector, but they're all of different types so I can't do that. So I bind them into a function object when I first register the method with my event handling system, which expects me to specify all of the arguments at this point in the execution. I don't have to objects at this point though as the objects are generated by some unknown event in the future.
Sorry if none of this makes any sense.