summaryrefslogtreecommitdiff
path: root/cpp/src/qpid/client/LocalQueue.cpp
diff options
context:
space:
mode:
authorAlan Conway <aconway@apache.org>2009-05-01 14:53:05 +0000
committerAlan Conway <aconway@apache.org>2009-05-01 14:53:05 +0000
commitdd79366789a749856de0e41633146340c2b79f9a (patch)
tree69e792e992a3071a19c112d6bd9d715f4ce1d27e /cpp/src/qpid/client/LocalQueue.cpp
parentdb687f6ce97fe987936711f9c46966d45cf24834 (diff)
downloadqpid-python-dd79366789a749856de0e41633146340c2b79f9a.tar.gz
Cleaned up PIMPL pattern for public API
- Separated PrivateImplRef helper classs from Handler base class. - Consistent impl of ctor, dtor, copy, assign for all PIMPL classes. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@770702 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/client/LocalQueue.cpp')
-rw-r--r--cpp/src/qpid/client/LocalQueue.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/cpp/src/qpid/client/LocalQueue.cpp b/cpp/src/qpid/client/LocalQueue.cpp
index 02fecf804f..dfd8405a7f 100644
--- a/cpp/src/qpid/client/LocalQueue.cpp
+++ b/cpp/src/qpid/client/LocalQueue.cpp
@@ -24,7 +24,7 @@
#include "qpid/framing/FrameSet.h"
#include "qpid/framing/MessageTransferBody.h"
#include "qpid/framing/reply_exceptions.h"
-#include "HandlePrivate.h"
+#include "PrivateImplRef.h"
#include "SubscriptionImpl.h"
#include "CompletionImpl.h"
@@ -52,8 +52,9 @@ bool LocalQueue::get(Message& result, sys::Duration timeout) {
bool ok = queue->pop(content, timeout);
if (!ok) return false;
if (content->isA<MessageTransferBody>()) {
- result = Message(new MessageImpl(*content));
- boost::intrusive_ptr<SubscriptionImpl> si = HandlePrivate<SubscriptionImpl>::get(subscription);
+
+ *MessageImpl::get(result) = MessageImpl(*content);
+ boost::intrusive_ptr<SubscriptionImpl> si = PrivateImplRef<Subscription>::get(subscription);
assert(si);
if (si) si->received(result);
return true;