diff options
| author | Alan Conway <aconway@apache.org> | 2009-04-23 11:48:32 +0000 |
|---|---|---|
| committer | Alan Conway <aconway@apache.org> | 2009-04-23 11:48:32 +0000 |
| commit | 9f9f598a5c969cdc43c6cf3ed9c4a309c5933ab5 (patch) | |
| tree | 2fdfd65464383b6a10d0a3c615894a140749ed8b /cpp/src/qpid/client/Future.h | |
| parent | bd9912920df4f4ac39b957633344aec8d87e22b1 (diff) | |
| download | qpid-python-9f9f598a5c969cdc43c6cf3ed9c4a309c5933ab5.tar.gz | |
Apply PIMPL pattern to client::Completion and client::Future.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@767896 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/client/Future.h')
| -rw-r--r-- | cpp/src/qpid/client/Future.h | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/cpp/src/qpid/client/Future.h b/cpp/src/qpid/client/Future.h index b26af06348..28c9a2bbbd 100644 --- a/cpp/src/qpid/client/Future.h +++ b/cpp/src/qpid/client/Future.h @@ -26,7 +26,6 @@ #include <boost/shared_ptr.hpp> #include "qpid/Exception.h" #include "qpid/framing/SequenceNumber.h" -#include "qpid/framing/StructHelper.h" #include "FutureCompletion.h" #include "FutureResult.h" #include "ClientImportExport.h" @@ -35,7 +34,7 @@ namespace qpid { namespace client { /**@internal */ -class Future : private framing::StructHelper +class Future { framing::SequenceNumber command; boost::shared_ptr<FutureResult> result; @@ -45,13 +44,9 @@ public: Future() : complete(false) {} Future(const framing::SequenceNumber& id) : command(id), complete(false) {} - template <class T> void decodeResult(T& value, SessionImpl& session) - { - if (result) { - decode(value, result->getResult(session)); - } else { - throw Exception("Result not expected"); - } + std::string getResult(SessionImpl& session) { + if (result) return result->getResult(session); + else throw Exception("Result not expected"); } QPID_CLIENT_EXTERN void wait(SessionImpl& session); |
