I was wondering if there is a more convenient way to connect the Boost signal of one class directly to the signal of another class?
For example, imagine a facade class with a bunch of members that provide their own signals. Now suppose the facade wants to expose these signals. I usually end up writing template methods, which I then hook up as signal handlers.
using namespace boost::signal; class A { public: A(){}; virtual ~A(){}; signal<void()> signalA; }; class B { public: B(){}; virtual ~B(){}; signal<void()> signalB; }; class Facade { private: A& a; B& b; public: Facade(A& refA, B& refB) : a(refA), b(refB) {
Now it is not very elegant and becomes very tiring after. Is there any way to do this without having to write such forwarding methods?
djf
source share