diff options
| author | Ted Ross <tross@apache.org> | 2008-07-08 21:54:20 +0000 |
|---|---|---|
| committer | Ted Ross <tross@apache.org> | 2008-07-08 21:54:20 +0000 |
| commit | 391608a73f18a1797ab0c358f0a94364dc888eb2 (patch) | |
| tree | c7f26ec2072884a2e94a767a3d4f29d76c4e81c7 /cpp/src/qpid/broker/DirectExchange.cpp | |
| parent | 5515803c70dfeff04c190533e7f0187a0e732bf4 (diff) | |
| download | qpid-python-391608a73f18a1797ab0c358f0a94364dc888eb2.tar.gz | |
QPID-1170 - Remove boost dependency from management agent interface
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@674994 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/broker/DirectExchange.cpp')
| -rw-r--r-- | cpp/src/qpid/broker/DirectExchange.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/cpp/src/qpid/broker/DirectExchange.cpp b/cpp/src/qpid/broker/DirectExchange.cpp index 84a5362766..4aa68bee9c 100644 --- a/cpp/src/qpid/broker/DirectExchange.cpp +++ b/cpp/src/qpid/broker/DirectExchange.cpp @@ -29,7 +29,7 @@ using qpid::management::Manageable; DirectExchange::DirectExchange(const string& _name, Manageable* _parent) : Exchange(_name, _parent) { - if (mgmtExchange.get() != 0) + if (mgmtExchange != 0) mgmtExchange->set_type (typeName); } @@ -37,7 +37,7 @@ DirectExchange::DirectExchange(const std::string& _name, bool _durable, const FieldTable& _args, Manageable* _parent) : Exchange(_name, _durable, _args, _parent) { - if (mgmtExchange.get() != 0) + if (mgmtExchange != 0) mgmtExchange->set_type (typeName); } @@ -53,9 +53,9 @@ bool DirectExchange::bind(Queue::shared_ptr queue, const string& routingKey, con if (i == queues.end()) { Binding::shared_ptr binding (new Binding (routingKey, queue, this)); bindings[routingKey].push_back(binding); - if (mgmtExchange.get() != 0) { + if (mgmtExchange != 0) { mgmtExchange->inc_bindingCount(); - dynamic_pointer_cast<management::Queue>(queue->GetManagementObject())->inc_bindingCount(); + ((management::Queue*) queue->GetManagementObject())->inc_bindingCount(); } return true; } else{ @@ -77,9 +77,9 @@ bool DirectExchange::unbind(Queue::shared_ptr queue, const string& routingKey, c if (queues.empty()) { bindings.erase(routingKey); } - if (mgmtExchange.get() != 0) { + if (mgmtExchange != 0) { mgmtExchange->dec_bindingCount(); - dynamic_pointer_cast<management::Queue>(queue->GetManagementObject())->dec_bindingCount(); + ((management::Queue*) queue->GetManagementObject())->dec_bindingCount(); } return true; } else { @@ -95,25 +95,25 @@ void DirectExchange::route(Deliverable& msg, const string& routingKey, const Fie for(i = queues.begin(); i != queues.end(); i++, count++) { msg.deliverTo((*i)->queue); - if ((*i)->mgmtBinding.get() != 0) + if ((*i)->mgmtBinding != 0) (*i)->mgmtBinding->inc_msgMatched (); } if(!count){ QPID_LOG(warning, "DirectExchange " << getName() << " could not route message with key " << routingKey); - if (mgmtExchange.get() != 0) { + if (mgmtExchange != 0) { mgmtExchange->inc_msgDrops (); mgmtExchange->inc_byteDrops (msg.contentSize ()); } } else { - if (mgmtExchange.get() != 0) { + if (mgmtExchange != 0) { mgmtExchange->inc_msgRoutes (count); mgmtExchange->inc_byteRoutes (count * msg.contentSize ()); } } - if (mgmtExchange.get() != 0) { + if (mgmtExchange != 0) { mgmtExchange->inc_msgReceives (); mgmtExchange->inc_byteReceives (msg.contentSize ()); } |
