rendered paste body#include <iostream>
#include <boost/signal.hpp>
#include <boost/bind.hpp>
using namespace std;
class A
{
public:
A() {}
~A() {}
void testForReady (void) { readySignal('a'); }
boost::signal<void (char)> readySignal;
};
class B
{
public:
B() {this->setupSlot(); }
~B() {}
void onReady (char c) { cout << "The char is " << c << endl; }
void setupSlot (void) {
this->a.readySignal.connect (boost::bind(&B::onReady, this));
}
A getA (void) { return this->a; }
private:
A a;
};
int main()
{
B b;
b.getA().testForReady();
return 0;
}