diff options
| author | Alan Conway <aconway@apache.org> | 2009-05-01 14:53:05 +0000 |
|---|---|---|
| committer | Alan Conway <aconway@apache.org> | 2009-05-01 14:53:05 +0000 |
| commit | dd79366789a749856de0e41633146340c2b79f9a (patch) | |
| tree | 69e792e992a3071a19c112d6bd9d715f4ce1d27e /cpp/src/qpid/client/Completion.h | |
| parent | db687f6ce97fe987936711f9c46966d45cf24834 (diff) | |
| download | qpid-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/Completion.h')
| -rw-r--r-- | cpp/src/qpid/client/Completion.h | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/cpp/src/qpid/client/Completion.h b/cpp/src/qpid/client/Completion.h index 0b246b7765..d28cfac52a 100644 --- a/cpp/src/qpid/client/Completion.h +++ b/cpp/src/qpid/client/Completion.h @@ -1,3 +1,6 @@ +#ifndef QPID_CLIENT_COMPLETION_H +#define QPID_CLIENT_COMPLETION_H + /* * * Licensed to the Apache Software Foundation (ASF) under one @@ -19,16 +22,15 @@ * */ -#ifndef _Completion_ -#define _Completion_ - #include "Handle.h" +#include "ClientImportExport.h" #include <string> namespace qpid { namespace client { class CompletionImpl; +template <class T> class PrivateImplRef; /** * Asynchronous commands that do not return a result will return a @@ -42,10 +44,9 @@ class CompletionImpl; class Completion : public Handle<CompletionImpl> { public: - ///@internal - QPID_CLIENT_EXTERN Completion(CompletionImpl* =0); - QPID_CLIENT_EXTERN ~Completion(); + QPID_CLIENT_EXTERN Completion(CompletionImpl* = 0); QPID_CLIENT_EXTERN Completion(const Completion&); + QPID_CLIENT_EXTERN ~Completion(); QPID_CLIENT_EXTERN Completion& operator=(const Completion&); /** Wait for the asynchronous command that returned this @@ -54,13 +55,18 @@ public: *@exception If the command returns an error. */ QPID_CLIENT_EXTERN void wait(); - QPID_CLIENT_EXTERN bool isComplete(); protected: QPID_CLIENT_EXTERN std::string getResult(); + + private: + typedef CompletionImpl Impl; + Impl* impl; + friend class PrivateImplRef<Completion>; }; }} -#endif + +#endif /*!QPID_CLIENT_COMPLETION_H*/ |
