I have a working Boost.Signals2 signal
& slot
combination in my C++ project & set up like so;
//DECLARE SIGNAL
signals2::signal<void (const EN_DATA_STREAM, long, double, double, double, double, double)> signal;
//CONNECT DATAUPDATE() OF CANDIDATE INSTANCE
signal.connect(bind(&Candidate::DataUpdate, candidateInstance, _1, _2, _3, _4, _5, _6, _7));
//FIRE SIGNAL
signal(iDataNumber, BarNumber(), DateTime(), Open(), High(), Low(), Close());
I've been trying to take this further and use the boost.signals2
connect_extended
functionality as I'd like to pass details of the invoking signal
to the slot
so that the slot
may disconnect itself from the signal
at some later time. The syntax for this is escaping me. Please could someone demonstrate how to convert the above code so that it uses connect_extended
to pass connection information to the slot
.
P.S. I've been looking at this example provided at the boost website but am still none the wiser as to how to tailor it to my requirements where the parameters use bind
.
Boost.Signals2 connect_extended example
Thanks