diff options
author | Ted Ross <tross@apache.org> | 2010-07-19 19:51:47 +0000 |
---|---|---|
committer | Ted Ross <tross@apache.org> | 2010-07-19 19:51:47 +0000 |
commit | 56cf23dc21b5787a4b567afe5b83c3e5504071e6 (patch) | |
tree | b8ca7dd0ea5149e5d689d61387d4c72d61a5e937 /cpp/bindings/qpid/dotnet/src/Receiver.h | |
parent | 9c5727d8246a1c3c08c77842832e330b5275c53e (diff) | |
download | qpid-python-56cf23dc21b5787a4b567afe5b83c3e5504071e6.tar.gz |
QPID-2589 - Patch from Chuck Rolke
This patch cleans up or adds the copy constructors and the copy assignment operators for the binding classes.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@965603 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/bindings/qpid/dotnet/src/Receiver.h')
-rw-r--r-- | cpp/bindings/qpid/dotnet/src/Receiver.h | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/cpp/bindings/qpid/dotnet/src/Receiver.h b/cpp/bindings/qpid/dotnet/src/Receiver.h index 436f3f2668..68cfa6fec7 100644 --- a/cpp/bindings/qpid/dotnet/src/Receiver.h +++ b/cpp/bindings/qpid/dotnet/src/Receiver.h @@ -63,9 +63,29 @@ namespace Messaging { public:
Receiver(::qpid::messaging::Receiver * r,
Session ^ sessRef);
+
+ // copy constructor
+ Receiver(const Receiver ^ receiver);
+
~Receiver();
!Receiver();
- Receiver(const Receiver ^ rhs);
+
+ // assignment operator
+ Receiver % operator=(const Receiver % rhs)
+ {
+ if (this == %rhs)
+ {
+ // Self assignment, do nothing
+ }
+ else
+ {
+ delete receiverp;
+ receiverp = new ::qpid::messaging::Receiver(
+ *(const_cast<Receiver %>(rhs).NativeReceiver));
+ parentSession = rhs.parentSession;
+ }
+ return *this;
+ }
property ::qpid::messaging::Receiver * NativeReceiver
{
|