In QT, we can connect signals and slots using the following simple syntax:
connect(pObject1, signal1, pObject2, slot2)
For example, you could write something like:
A a; B b; connect(&a, SIGNAL(valueChanged(int)), &a, SLOT(setValue(int)));
With Boost :: Signal syntax, we will write this:
A a; B b; a.valueChanged.connect(boost::bind(&B::SetValue, &b, _1))
IMHO, forcing signal syntax is more complex. Is there a way to make Boost :: Signal's syntax more like QT.
source share