diff options
| author | Robert Gemmell <robbie@apache.org> | 2012-06-28 09:14:52 +0000 |
|---|---|---|
| committer | Robert Gemmell <robbie@apache.org> | 2012-06-28 09:14:52 +0000 |
| commit | 01b8ef15ad7826f42790868d94402332596a4403 (patch) | |
| tree | 65ea28a9eb5fcb556249a5ae6702f6c469727947 /qpid/cpp/src/tests/TopicExchangeTest.cpp | |
| parent | 15874225f863757fde6c078da7079592c534b60b (diff) | |
| parent | 83c220a465faba7fa61c44dd69e7aef497083553 (diff) | |
| download | qpid-python-01b8ef15ad7826f42790868d94402332596a4403.tar.gz | |
merge non-java changes from trunk up to r1353860
git-svn-id: https://svn.apache.org/repos/asf/qpid/branches/java-config-and-management@1354874 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/src/tests/TopicExchangeTest.cpp')
| -rw-r--r-- | qpid/cpp/src/tests/TopicExchangeTest.cpp | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/qpid/cpp/src/tests/TopicExchangeTest.cpp b/qpid/cpp/src/tests/TopicExchangeTest.cpp index ff8931f9c9..d57951ea3f 100644 --- a/qpid/cpp/src/tests/TopicExchangeTest.cpp +++ b/qpid/cpp/src/tests/TopicExchangeTest.cpp @@ -16,6 +16,7 @@ * specific language governing permissions and limitations * under the License. */ +#include "qpid/broker/TopicKeyNode.h" #include "qpid/broker/TopicExchange.h" #include "unit_test.h" #include "test_tools.h" @@ -32,14 +33,15 @@ class TopicExchange::TopicExchangeTester { public: typedef std::vector<std::string> BindingVec; + typedef TopicKeyNode<TopicExchange::BindingKey> TestBindingNode; private: // binding node iterator that collects all routes that are bound - class TestFinder : public TopicExchange::BindingNode::TreeIterator { + class TestFinder : public TestBindingNode::TreeIterator { public: TestFinder(BindingVec& m) : bv(m) {}; ~TestFinder() {}; - bool visit(BindingNode& node) { + bool visit(TestBindingNode& node) { if (!node.bindings.bindingVector.empty()) bv.push_back(node.routePattern); return true; @@ -53,7 +55,7 @@ public: ~TopicExchangeTester() {}; bool addBindingKey(const std::string& bKey) { string routingPattern = normalize(bKey); - BindingKey *bk = bindingTree.addBindingKey(routingPattern); + BindingKey *bk = bindingTree.add(routingPattern); if (bk) { // push a dummy binding to mark this node as "non-leaf" bk->bindingVector.push_back(Binding::shared_ptr()); @@ -64,12 +66,12 @@ public: bool removeBindingKey(const std::string& bKey){ string routingPattern = normalize(bKey); - BindingKey *bk = bindingTree.getBindingKey(routingPattern); + BindingKey *bk = bindingTree.get(routingPattern); if (bk) { bk->bindingVector.pop_back(); if (bk->bindingVector.empty()) { // no more bindings - remove this node - bindingTree.removeBindingKey(routingPattern); + bindingTree.remove(routingPattern); } return true; } @@ -87,7 +89,7 @@ public: } private: - TopicExchange::BindingNode bindingTree; + TestBindingNode bindingTree; }; } // namespace broker |
