You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ac...@apache.org on 2009/05/01 16:53:05 UTC

svn commit: r770702 - in /qpid/trunk/qpid/cpp/src: ./ qpid/client/

Author: aconway
Date: Fri May  1 14:53:05 2009
New Revision: 770702

URL: http://svn.apache.org/viewvc?rev=770702&view=rev
Log:
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.

Added:
    qpid/trunk/qpid/cpp/src/qpid/client/PrivateImplRef.h   (with props)
Removed:
    qpid/trunk/qpid/cpp/src/qpid/client/HandleAccess.h
    qpid/trunk/qpid/cpp/src/qpid/client/HandlePrivate.h
    qpid/trunk/qpid/cpp/src/qpid/client/PrivateImpl.h
    qpid/trunk/qpid/cpp/src/qpid/client/PrivateImplPrivate.h
Modified:
    qpid/trunk/qpid/cpp/src/Makefile.am
    qpid/trunk/qpid/cpp/src/qpid/client/Completion.cpp
    qpid/trunk/qpid/cpp/src/qpid/client/Completion.h
    qpid/trunk/qpid/cpp/src/qpid/client/Handle.h
    qpid/trunk/qpid/cpp/src/qpid/client/LocalQueue.cpp
    qpid/trunk/qpid/cpp/src/qpid/client/Message.cpp
    qpid/trunk/qpid/cpp/src/qpid/client/Message.h
    qpid/trunk/qpid/cpp/src/qpid/client/MessageImpl.h
    qpid/trunk/qpid/cpp/src/qpid/client/Subscription.cpp
    qpid/trunk/qpid/cpp/src/qpid/client/Subscription.h
    qpid/trunk/qpid/cpp/src/qpid/client/SubscriptionImpl.cpp
    qpid/trunk/qpid/cpp/src/qpid/client/TypedResult.h

Modified: qpid/trunk/qpid/cpp/src/Makefile.am
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/Makefile.am?rev=770702&r1=770701&r2=770702&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/Makefile.am (original)
+++ qpid/trunk/qpid/cpp/src/Makefile.am Fri May  1 14:53:05 2009
@@ -449,8 +449,6 @@
   qpid/client/Completion.cpp			\
   qpid/client/CompletionImpl.h			\
   qpid/client/FutureResult.cpp			\
-  qpid/client/HandlePrivate.h			\
-  qpid/client/PrivateImplPrivate.h		\
   qpid/client/LoadPlugins.cpp			\
   qpid/client/LocalQueue.cpp			\
   qpid/client/Message.cpp			\
@@ -601,7 +599,7 @@
   qpid/client/FutureCompletion.h \
   qpid/client/FutureResult.h \
   qpid/client/Handle.h \
-  qpid/client/PrivateImpl.h \
+  qpid/client/PrivateImplRef.h \
   qpid/client/LocalQueue.h \
   qpid/client/QueueOptions.h \
   qpid/client/Message.h \

Modified: qpid/trunk/qpid/cpp/src/qpid/client/Completion.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/client/Completion.cpp?rev=770702&r1=770701&r2=770702&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/client/Completion.cpp (original)
+++ qpid/trunk/qpid/cpp/src/qpid/client/Completion.cpp Fri May  1 14:53:05 2009
@@ -21,15 +21,17 @@
 
 #include "Completion.h"
 #include "CompletionImpl.h"
-#include "HandlePrivate.h"
+#include "PrivateImplRef.h"
 
 namespace qpid {
 namespace client {
 
-Completion::Completion(CompletionImpl* i) : Handle<CompletionImpl>(i) {}
-Completion::~Completion() {}
-Completion::Completion(const Completion& c) : Handle<CompletionImpl>(c.impl) {}
-Completion& Completion::operator=(const Completion& c) { Handle<CompletionImpl>::operator=(c); return *this; }
+typedef PrivateImplRef<Completion> PI;
+Completion::Completion(CompletionImpl* p) { PI::ctor(*this, p); }
+Completion::Completion(const Completion& c) : Handle<CompletionImpl>() { PI::copy(*this, c); }
+Completion::~Completion() { PI::dtor(*this); }
+Completion& Completion::operator=(const Completion& c) { return PI::assign(*this, c); }
+
 
 void Completion::wait() { impl->wait(); }
 bool Completion::isComplete() { return impl->isComplete(); }

Modified: qpid/trunk/qpid/cpp/src/qpid/client/Completion.h
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/client/Completion.h?rev=770702&r1=770701&r2=770702&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/client/Completion.h (original)
+++ qpid/trunk/qpid/cpp/src/qpid/client/Completion.h Fri May  1 14:53:05 2009
@@ -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 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 @@
      *@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*/

Modified: qpid/trunk/qpid/cpp/src/qpid/client/Handle.h
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/client/Handle.h?rev=770702&r1=770701&r2=770702&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/client/Handle.h (original)
+++ qpid/trunk/qpid/cpp/src/qpid/client/Handle.h Fri May  1 14:53:05 2009
@@ -27,10 +27,10 @@
 namespace qpid {
 namespace client {
 
-template <class T> class HandlePrivate;
+template <class> class PrivateImplRef;
 
 /**
- * A handle is like a pointer: it points to some implementation object.
+ * A handle is like a pointer: refers to an underlying implementation object.
  * Copying the handle does not copy the object.
  * 
  * Handles can be null,  like a 0 pointer. Use isValid(), isNull() or the
@@ -38,9 +38,6 @@
  */
 template <class T> class Handle {
   public:
-    QPID_CLIENT_EXTERN ~Handle();
-    QPID_CLIENT_EXTERN Handle(const Handle&);
-    QPID_CLIENT_EXTERN Handle& operator=(const Handle&);
 
     /**@return true if handle is valid,  i.e. not null. */
     QPID_CLIENT_EXTERN bool isValid() const { return impl; }
@@ -54,13 +51,19 @@
     /** Operator ! supports idiom if (!handle) { do_if_handle_is_null(); } */
     QPID_CLIENT_EXTERN bool operator !() const { return !impl; }
 
-    QPID_CLIENT_EXTERN void swap(Handle<T>&);
-
+    void swap(Handle<T>& h) { T* t = h.impl; h.impl = impl; impl = t; }
+    
   protected:
-    QPID_CLIENT_EXTERN Handle(T* =0);
-    T* impl;
+    typedef T Impl;
+    QPID_CLIENT_EXTERN Handle() :impl() {}
+
+    // Not implemented,subclasses must implement.
+    QPID_CLIENT_EXTERN Handle(const Handle&);
+    QPID_CLIENT_EXTERN Handle& operator=(const Handle&);
+
+    Impl* impl;
 
-  friend class HandlePrivate<T>;
+  friend class PrivateImplRef<T>; // FIXME aconway 2009-04-30: Specify
 };
 
 }} // namespace qpid::client

Modified: qpid/trunk/qpid/cpp/src/qpid/client/LocalQueue.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/client/LocalQueue.cpp?rev=770702&r1=770701&r2=770702&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/client/LocalQueue.cpp (original)
+++ qpid/trunk/qpid/cpp/src/qpid/client/LocalQueue.cpp Fri May  1 14:53:05 2009
@@ -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 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;

Modified: qpid/trunk/qpid/cpp/src/qpid/client/Message.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/client/Message.cpp?rev=770702&r1=770701&r2=770702&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/client/Message.cpp (original)
+++ qpid/trunk/qpid/cpp/src/qpid/client/Message.cpp Fri May  1 14:53:05 2009
@@ -20,17 +20,23 @@
  */
 
 #include "Message.h"
-#include "PrivateImplPrivate.h"
 #include "MessageImpl.h"
 
 namespace qpid {
 namespace client {
 
-template class PrivateImpl<MessageImpl>;
+Message::Message(MessageImpl* mi) : impl(mi) {}
 
-Message::Message(const std::string& data, const std::string& routingKey) : PrivateImpl<MessageImpl>(new MessageImpl(data, routingKey)) {}
-Message::Message(MessageImpl* i) : PrivateImpl<MessageImpl>(i) {}
-Message::~Message() {}
+Message::Message(const std::string& data, const std::string& routingKey)
+    : impl(new MessageImpl(data, routingKey)) {}
+
+Message::Message(const Message& m) : impl(new MessageImpl(*m.impl)) {}
+
+Message::~Message() { delete impl; }
+
+Message& Message::operator=(const Message& m) { *impl = *m.impl; return *this; }
+
+void Message::swap(Message& m) { std::swap(impl, m.impl); }
 
 std::string Message::getDestination() const { return impl->getDestination(); }
 bool Message::isRedelivered() const { return impl->isRedelivered(); }

Modified: qpid/trunk/qpid/cpp/src/qpid/client/Message.h
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/client/Message.h?rev=770702&r1=770701&r2=770702&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/client/Message.h (original)
+++ qpid/trunk/qpid/cpp/src/qpid/client/Message.h Fri May  1 14:53:05 2009
@@ -22,7 +22,6 @@
  *
  */
 
-#include "qpid/client/PrivateImpl.h"
 #include "qpid/client/ClientImportExport.h"
 #include "qpid/framing/MessageProperties.h"
 #include "qpid/framing/DeliveryProperties.h"
@@ -113,17 +112,21 @@
  * 
  * 
  */
-class Message : public PrivateImpl<MessageImpl>
+class Message
 {
 public:
     /** Create a Message.
      *@param data Data for the message body.
      *@param routingKey Passed to the exchange that routes the message.
      */
-    QPID_CLIENT_EXTERN Message(const std::string& data=std::string(),
-            const std::string& routingKey=std::string());
-
+    QPID_CLIENT_EXTERN Message(
+        const std::string& data=std::string(),
+        const std::string& routingKey=std::string());
+    Message(MessageImpl*);    ///< @internal
+    QPID_CLIENT_EXTERN Message(const Message&);
     QPID_CLIENT_EXTERN ~Message();
+    QPID_CLIENT_EXTERN Message& operator=(const Message&);
+    QPID_CLIENT_EXTERN void swap(Message&);
 
     QPID_CLIENT_EXTERN void setData(const std::string&);
     QPID_CLIENT_EXTERN const std::string& getData() const;
@@ -162,8 +165,9 @@
     ///@internal
     QPID_CLIENT_EXTERN const framing::SequenceNumber& getId() const;
 
-    ///@internal
-    Message(MessageImpl*);
+  private:
+    MessageImpl* impl;
+    friend class MessageImpl; // Helper template for implementation
 };
 
 }}

Modified: qpid/trunk/qpid/cpp/src/qpid/client/MessageImpl.h
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/client/MessageImpl.h?rev=770702&r1=770701&r2=770702&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/client/MessageImpl.h (original)
+++ qpid/trunk/qpid/cpp/src/qpid/client/MessageImpl.h Fri May  1 14:53:05 2009
@@ -21,10 +21,11 @@
  * under the License.
  *
  */
-#include <string>
+#include "Message.h"
 #include "qpid/client/Session.h"
 #include "qpid/framing/MessageTransferBody.h"
 #include "qpid/framing/TransferContent.h"
+#include <string>
 
 namespace qpid {
 namespace client {
@@ -64,6 +65,9 @@
 
     /**@internal for incoming messages */
     MessageImpl(const framing::FrameSet& frameset);
+
+    static MessageImpl* get(Message& m) { return m.impl; }
+    static const MessageImpl* get(const Message& m) { return m.impl; }
     
 private:
     //method and id are only set for received messages:

Added: qpid/trunk/qpid/cpp/src/qpid/client/PrivateImplRef.h
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/client/PrivateImplRef.h?rev=770702&view=auto
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/client/PrivateImplRef.h (added)
+++ qpid/trunk/qpid/cpp/src/qpid/client/PrivateImplRef.h Fri May  1 14:53:05 2009
@@ -0,0 +1,93 @@
+#ifndef QPID_CLIENT_PRIVATEIMPL_H
+#define QPID_CLIENT_PRIVATEIMPL_H
+
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+
+#include "qpid/client/ClientImportExport.h"
+#include <boost/intrusive_ptr.hpp>
+#include "qpid/RefCounted.h"
+
+namespace qpid {
+namespace client {
+
+// FIXME aconway 2009-04-24: details!
+/** @file
+ *
+ * Helper class to implement a class with a private, reference counted
+ * implementation and reference semantics. 
+ *
+ * Such classes are used in the public API to hide implementation, they
+ * should. Example of use:
+ *
+ * === Foo.h
+ * 
+ * template <class T> PrivateImplRef; 
+ * class FooImpl;
+ * 
+ * Foo : public Handle<FooImpl> {
+ *  public:
+ *   Foo(FooImpl* = 0);
+ *   Foo(const Foo&);
+ *   ~Foo();
+ *   Foo& operator=(const Foo&);
+ *
+ *   int fooDo();              //  and other Foo functions...
+ *
+ *  private:
+ *   typedef FooImpl Impl;
+ *   Impl* impl;
+ *   friend class PrivateImplRef<Foo>;
+ *
+ * === Foo.cpp
+ *
+ * typedef PrivateImplRef<Foo> PI;
+ * Foo::Foo(FooImpl* p) { PI::ctor(*this, p); }
+ * Foo::Foo(const Foo& c) : Handle<FooImpl>() { PI::copy(*this, c); }
+ * Foo::~Foo() { PI::dtor(*this); }
+ * Foo& Foo::operator=(const Foo& c) { return PI::assign(*this, c); }
+ *
+ * int foo::fooDo() { return impl->fooDo(); }
+ *
+ */
+template <class T> class PrivateImplRef {
+  public:
+    typedef typename T::Impl Impl;
+    typedef boost::intrusive_ptr<Impl> intrusive_ptr;
+    
+    static intrusive_ptr get(const T& t) { return intrusive_ptr(t.impl); }
+
+    static void set(T& t, const intrusive_ptr& p) {
+        if(t.impl) boost::intrusive_ptr_release(t.impl); 
+        t.impl = p.get();
+        if (t.impl) boost::intrusive_ptr_add_ref(t.impl); 
+    }
+
+    // Helper functions to implement the ctor, dtor, copy, assign
+    static void ctor(T& t, Impl* p) { t.impl = p; if (p) boost::intrusive_ptr_add_ref(p); }
+    static void copy(T& t, const T& x) { t.impl = 0; assign(t, x); }
+    static void dtor(T& t) { if(t.impl) boost::intrusive_ptr_release(t.impl); }
+    static T& assign(T& t, const T& x) { set(t, get(x)); return t;}
+};
+
+}} // namespace qpid::client
+
+#endif  /*!QPID_CLIENT_PRIVATEIMPL_H*/

Propchange: qpid/trunk/qpid/cpp/src/qpid/client/PrivateImplRef.h
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: qpid/trunk/qpid/cpp/src/qpid/client/PrivateImplRef.h
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Modified: qpid/trunk/qpid/cpp/src/qpid/client/Subscription.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/client/Subscription.cpp?rev=770702&r1=770701&r2=770702&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/client/Subscription.cpp (original)
+++ qpid/trunk/qpid/cpp/src/qpid/client/Subscription.cpp Fri May  1 14:53:05 2009
@@ -22,13 +22,17 @@
 #include "Subscription.h"
 #include "SubscriptionImpl.h"
 #include "CompletionImpl.h"
-#include "HandlePrivate.h"
+#include "PrivateImplRef.h"
 #include "qpid/framing/enum.h"
 
 namespace qpid {
 namespace client {
 
-template class Handle<SubscriptionImpl>;
+typedef PrivateImplRef<Subscription> PI;
+Subscription::Subscription(SubscriptionImpl* p) { PI::ctor(*this, p); }
+Subscription::~Subscription() { PI::dtor(*this); }
+Subscription::Subscription(const Subscription& c) : Handle<SubscriptionImpl>() { PI::copy(*this, c); }
+Subscription& Subscription::operator=(const Subscription& c) { return PI::assign(*this, c); }
 
 
 std::string Subscription::getName() const { return impl->getName(); }

Modified: qpid/trunk/qpid/cpp/src/qpid/client/Subscription.h
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/client/Subscription.h?rev=770702&r1=770701&r2=770702&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/client/Subscription.h (original)
+++ qpid/trunk/qpid/cpp/src/qpid/client/Subscription.h Fri May  1 14:53:05 2009
@@ -22,15 +22,16 @@
  *
  */
 
+#include "qpid/client/Handle.h"
 #include "qpid/client/Session.h"
 #include "qpid/client/SubscriptionSettings.h"
-#include "qpid/client/Handle.h"
 #include "qpid/client/Message.h"
 #include "qpid/client/ClientImportExport.h"
 
 namespace qpid {
 namespace client {
 
+template <class> class PrivateImplRef;
 class SubscriptionImpl;
 class SubscriptionManager;
 
@@ -40,7 +41,11 @@
  */
 class Subscription : public Handle<SubscriptionImpl> {
   public:
-    QPID_CLIENT_EXTERN Subscription(SubscriptionImpl* si=0) : Handle<SubscriptionImpl>(si) {}
+    QPID_CLIENT_EXTERN Subscription(SubscriptionImpl* = 0);
+    QPID_CLIENT_EXTERN Subscription(const Subscription&);
+    QPID_CLIENT_EXTERN ~Subscription();
+    QPID_CLIENT_EXTERN Subscription& operator=(const Subscription&);
+    
     
     /** The name of the subscription, used as the "destination" for messages from the broker.
      * Usually the same as the queue name but can be set differently.
@@ -109,6 +114,8 @@
     /** Grant the specified amount of byte credit */
     QPID_CLIENT_EXTERN void grantByteCredit(uint32_t);
 
+  private:
+  friend class PrivateImplRef<Subscription>;
   friend class SubscriptionManager;
 };
 }} // namespace qpid::client

Modified: qpid/trunk/qpid/cpp/src/qpid/client/SubscriptionImpl.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/client/SubscriptionImpl.cpp?rev=770702&r1=770701&r2=770702&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/client/SubscriptionImpl.cpp (original)
+++ qpid/trunk/qpid/cpp/src/qpid/client/SubscriptionImpl.cpp Fri May  1 14:53:05 2009
@@ -24,8 +24,6 @@
 #include "CompletionImpl.h"
 #include "SubscriptionManager.h"
 #include "SubscriptionSettings.h"
-#include "HandlePrivate.h"
-#include "PrivateImplPrivate.h"
 
 namespace qpid {
 namespace client {
@@ -118,9 +116,10 @@
 
 void SubscriptionImpl::received(Message& m) {
     Mutex::ScopedLock l(lock);
-    if (privateImplGetPtr(m)->getMethod().getAcquireMode() == ACQUIRE_MODE_NOT_ACQUIRED) 
+    MessageImpl& mi = *MessageImpl::get(m);
+    if (mi.getMethod().getAcquireMode() == ACQUIRE_MODE_NOT_ACQUIRED) 
         unacquired.add(m.getId());
-    else if (privateImplGetPtr(m)->getMethod().getAcceptMode() == ACCEPT_MODE_EXPLICIT)
+    else if (mi.getMethod().getAcceptMode() == ACCEPT_MODE_EXPLICIT)
         unaccepted.add(m.getId());
 
     if (listener) {

Modified: qpid/trunk/qpid/cpp/src/qpid/client/TypedResult.h
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/client/TypedResult.h?rev=770702&r1=770701&r2=770702&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/client/TypedResult.h (original)
+++ qpid/trunk/qpid/cpp/src/qpid/client/TypedResult.h Fri May  1 14:53:05 2009
@@ -40,7 +40,7 @@
 
 public:
     ///@internal
-    TypedResult(CompletionImpl* c) : Completion(c), decoded(false) {}
+    TypedResult(const Completion& c) : Completion(c), decoded(false) {}
 
     /**
      * Wait for the asynchronous command that returned this TypedResult to complete



---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:commits-subscribe@qpid.apache.org