summaryrefslogtreecommitdiff
path: root/cpp/bindings/qpid/dotnet/src/Address.cpp
diff options
context:
space:
mode:
authorTed Ross <tross@apache.org>2010-07-19 19:51:47 +0000
committerTed Ross <tross@apache.org>2010-07-19 19:51:47 +0000
commit56cf23dc21b5787a4b567afe5b83c3e5504071e6 (patch)
treeb8ca7dd0ea5149e5d689d61387d4c72d61a5e937 /cpp/bindings/qpid/dotnet/src/Address.cpp
parent9c5727d8246a1c3c08c77842832e330b5275c53e (diff)
downloadqpid-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/Address.cpp')
-rw-r--r--cpp/bindings/qpid/dotnet/src/Address.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/cpp/bindings/qpid/dotnet/src/Address.cpp b/cpp/bindings/qpid/dotnet/src/Address.cpp
index 2da40e6416..2b6dbb4647 100644
--- a/cpp/bindings/qpid/dotnet/src/Address.cpp
+++ b/cpp/bindings/qpid/dotnet/src/Address.cpp
@@ -64,7 +64,7 @@ namespace Messaging {
Type = "";
}
-
+ // Create with options and type
Address::Address(System::String ^ name,
System::String ^ subject,
System::Collections::Generic::Dictionary<
@@ -78,8 +78,15 @@ namespace Messaging {
Type = type;
}
+ // Copy constructor
+ Address::Address(const Address ^ address)
+ : addressp(new ::qpid::messaging::Address(
+ *(const_cast<Address ^>(address)->NativeAddress)))
+ {
+ }
// Create from received address
+ // The new Address object consumes the unmanaged pointer
Address::Address(::qpid::messaging::Address * addrp) :
addressp(addrp)
{
@@ -110,7 +117,6 @@ namespace Messaging {
}
}
-
//
// ToString
//