I have a class with signal member encapsulated with boost::function.
Is it possible to add another signal as a handler with this API?
class Foo
{
public:
VOID AddHandler(boost::function<VOID()> handler)
{
m_signal.connect(handler);
}
private:
boost::signal<VOID()> m_signal;
};
boost::signal<VOID()> signal;
VOID SignalCaller()
{
signal();
}
int main( )
{
Foo foo;
//foo.AddHandler(signal); // I want to
foo.AddHandler(&SignalCaller); // I have to
}