diff options
Diffstat (limited to 'cpp/src/qpid/sys/AggregateOutput.h')
-rw-r--r-- | cpp/src/qpid/sys/AggregateOutput.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/cpp/src/qpid/sys/AggregateOutput.h b/cpp/src/qpid/sys/AggregateOutput.h index 02a53ed50b..af26601f76 100644 --- a/cpp/src/qpid/sys/AggregateOutput.h +++ b/cpp/src/qpid/sys/AggregateOutput.h @@ -21,11 +21,13 @@ #ifndef _AggregateOutput_ #define _AggregateOutput_ -#include <vector> #include "Mutex.h" #include "OutputControl.h" #include "OutputTask.h" +#include <algorithm> +#include <vector> + namespace qpid { namespace sys { @@ -46,6 +48,11 @@ namespace sys { bool hasOutput(); void addOutputTask(OutputTask* t); void removeOutputTask(OutputTask* t); + + /** Apply f to each OutputTask* in the tasks list */ + template <class F> void eachOutput(const F& f) { + std::for_each(tasks.begin(), tasks.end(), f); + } }; } |