I'm using boost::signals2 to create a class that uses a signal to run an event under a specific condition. This class has a method that is called: RegisterCallback.
This function should take a parameter of the slot type that the signal uses (which is of void return type with a double as the only arg).
However, I'm not quite sure how I should define that argument in the method signature, as the source file for the signal1 class is quite unreadable for me.
So I basically want to do this:
myTimer(interval);
myTimer.RegisterCallback(&aCallbackFunction);
Here is the member signal:
boost::signals2::signal<void (double)> m_signal;
... and here is the register method that I need (uncomplete)
/**
* Register a callback function that will be called when the timer interval elapses.
*/
void RegisterCallback(const boost::signals2::signal1<???????> &slot)
{
m_signal.connect(slot);
}