A callback which can be executed multiple times. When a pre-defined limit is reached, then the underlying callback is executed.
- Example
void DoSomethingForAllPorts(const vector<OutputPort> &ports,
SomethingCalback *on_complete) {
BaseCallback0<void> *multi_callback = NewMultiCallback( ports.size(),
NewSingleCallback(this, &SomethingComplete,
on_complete));
vector<OutputPort*>::iterator iter;
for (iter = output_ports.begin(); iter != output_ports.end(); ++iter) {
(*iter)->DoSomething(multi_callback);
}
}