I need to emit a signal from child class to it's parent class when an asynchronous operation finished using boost signal,
For example my parent class
class A
{
void doTask(){
class B child;
child.asynchTask();
}
void onFinished(){
//invoke it when async task finished
}
};
And the second class
class B
{
void asynchTask(){
//Async task start here
}
void asynchTaskFinished(){
// Emit signal from here to invoke onFinished() of parent class
}
};
How can I do it using boost signal, I already found some example and an SO post Complete example using Boost::Signals for C++ Eventing, but couldn't figure out how to implement in this case.
Any help will be appreciated.
Thanks Haris