diff options
| author | Alan Conway <aconway@apache.org> | 2009-05-01 17:05:00 +0000 |
|---|---|---|
| committer | Alan Conway <aconway@apache.org> | 2009-05-01 17:05:00 +0000 |
| commit | 38dc8e231d6136dd6ae0cfa28f4f9dcb90677c77 (patch) | |
| tree | 9321363049f8675518c83a2b53947143526dc5be /cpp/src/qpid/client/LocalQueue.h | |
| parent | 4ed7e726a3ee1f3a86acbd1e2c89598b60b8c70a (diff) | |
| download | qpid-python-38dc8e231d6136dd6ae0cfa28f4f9dcb90677c77.tar.gz | |
Apply PIMPL pattern to qpid::client::LocalQueue
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@770756 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/client/LocalQueue.h')
| -rw-r--r-- | cpp/src/qpid/client/LocalQueue.h | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/cpp/src/qpid/client/LocalQueue.h b/cpp/src/qpid/client/LocalQueue.h index 5b739d4303..4aa14ce004 100644 --- a/cpp/src/qpid/client/LocalQueue.h +++ b/cpp/src/qpid/client/LocalQueue.h @@ -23,14 +23,16 @@ */ #include "ClientImportExport.h" -#include "qpid/client/Message.h" -#include "qpid/client/Subscription.h" -#include "qpid/client/Demux.h" +#include "Handle.h" +#include "Message.h" #include "qpid/sys/Time.h" namespace qpid { namespace client { +class LocalQueueImpl; +template <class T> class PrivateImplRef; + /** * A local queue to collect messages retrieved from a remote broker * queue. Create a queue and subscribe it using the SubscriptionManager. @@ -69,7 +71,7 @@ namespace client { * </ul> */ -class LocalQueue { +class LocalQueue : public Handle<LocalQueueImpl> { public: /** Create a local queue. Subscribe the local queue to a remote broker * queue with a SubscriptionManager. @@ -77,8 +79,9 @@ class LocalQueue { * LocalQueue is an alternative to implementing a MessageListener. */ QPID_CLIENT_EXTERN LocalQueue(); - + QPID_CLIENT_EXTERN LocalQueue(const LocalQueue&); QPID_CLIENT_EXTERN ~LocalQueue(); + QPID_CLIENT_EXTERN LocalQueue& operator=(const LocalQueue&); /** Wait up to timeout for the next message from the local queue. *@param result Set to the message from the queue. @@ -104,11 +107,12 @@ class LocalQueue { /** Number of messages on the local queue */ QPID_CLIENT_EXTERN size_t size() const; - private: - Demux::QueuePtr queue; - Subscription subscription; + QPID_CLIENT_EXTERN LocalQueue(LocalQueueImpl*); ///<@internal - friend class SubscriptionManager; + + private: + typedef LocalQueueImpl Impl; + friend class PrivateImplRef<LocalQueue>; }; }} // namespace qpid::client |
