#include #include #include using namespace std; class A { public: A() {} ~A() {} void testForReady (void) { readySignal('a'); } boost::signal 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; }