I have a problem now. I am trying to encapsulatie boost::signal and boost::bind into my own Event class.
class MyEvent
{
private:
boost::signal<void ()> Sig;
public:
void Subscribe(.........)
{
Sig.connect(boost:bind(.........);
}
void Raise()
{
Sig();
}
};
I have try to pass function pointer in the Subscribe function's signature and visual studio just gives me tones of errors.
I dont know how to write the signature of Subscribe and What to pass into boost::bind, ideally I will have boost::bind(&MyClass::MyHandler, &MyClassObject)
in Subscribe function and will Call it outside like MyEventObject.Subscribe(&MyClass::MyHandler, &MyClass)
.
Can any people help me fill that two blanks?