summaryrefslogtreecommitdiff
path: root/cpp/src/qpid/sys/AggregateOutput.h
diff options
context:
space:
mode:
authorAlan Conway <aconway@apache.org>2008-09-22 19:08:47 +0000
committerAlan Conway <aconway@apache.org>2008-09-22 19:08:47 +0000
commit5028ba1a330f86f4f53fdeaa89d3564435086b29 (patch)
tree6ea93770958c647bc7c5abc200707b80905a7819 /cpp/src/qpid/sys/AggregateOutput.h
parentf31ce3a04e59da295f397379025809c16ee1258d (diff)
downloadqpid-python-5028ba1a330f86f4f53fdeaa89d3564435086b29.tar.gz
Fixed error handling session-busy condition on broker.
Added accessors to iterate over broker::SemanticState consumers. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@697951 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/sys/AggregateOutput.h')
-rw-r--r--cpp/src/qpid/sys/AggregateOutput.h9
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);
+ }
};
}