diff options
author | Alan Conway <aconway@apache.org> | 2008-06-26 18:12:12 +0000 |
---|---|---|
committer | Alan Conway <aconway@apache.org> | 2008-06-26 18:12:12 +0000 |
commit | eabcd5c760c8d3b3e8f6f45a29c19148560f91cd (patch) | |
tree | a3f7e152d7ef07d8507136bb35f8a814b1db65c5 /cpp/src/qpid/Plugin.cpp | |
parent | a705fb49d4571b3b22ffd597c07e42a1b43e9322 (diff) | |
download | qpid-python-eabcd5c760c8d3b3e8f6f45a29c19148560f91cd.tar.gz |
Consolidated cluster tests in cluster_test.cpp
Improvements to BrokerFixture for testing.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@671969 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/Plugin.cpp')
-rw-r--r-- | cpp/src/qpid/Plugin.cpp | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/cpp/src/qpid/Plugin.cpp b/cpp/src/qpid/Plugin.cpp index 77627c3742..733d134334 100644 --- a/cpp/src/qpid/Plugin.cpp +++ b/cpp/src/qpid/Plugin.cpp @@ -19,16 +19,16 @@ */ #include "Plugin.h" +#include "qpid/Options.h" namespace qpid { namespace { -// This is a single threaded singleton implementation so -// it is important to be sure that the first use of this -// singleton is when the program is still single threaded Plugin::Plugins& thePlugins() { + // This is a single threaded singleton implementation so + // it is important to be sure that the first use of this + // singleton is when the program is still single threaded static Plugin::Plugins plugins; - return plugins; } } @@ -42,8 +42,13 @@ Plugin::~Plugin() {} Options* Plugin::getOptions() { return 0; } -const Plugin::Plugins& Plugin::getPlugins() { - return thePlugins(); +const Plugin::Plugins& Plugin::getPlugins() { return thePlugins(); } + +void Plugin::addOptions(Options& opts) { + for (Plugins::const_iterator i = getPlugins().begin(); i != getPlugins().end(); ++i) { + if ((*i)->getOptions()) + opts.add(*(*i)->getOptions()); + } } } // namespace qpid |