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/Session.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/Session.h')
| -rw-r--r-- | cpp/bindings/qpid/dotnet/src/Session.h | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/cpp/bindings/qpid/dotnet/src/Session.h b/cpp/bindings/qpid/dotnet/src/Session.h index a5affc67b6..e07725247b 100644 --- a/cpp/bindings/qpid/dotnet/src/Session.h +++ b/cpp/bindings/qpid/dotnet/src/Session.h @@ -67,9 +67,33 @@ namespace Messaging { public:
Session(::qpid::messaging::Session * sessionp,
Connection ^ connRef);
+
+ // copy constructor
+ Session(const Session ^ session);
+
~Session();
!Session();
- Session(const Session % rhs);
+
+ // assignment operator
+ Session % operator=(const Session % rhs)
+ {
+ if (this == %rhs)
+ {
+ // Self assignment, do nothing
+ }
+ else
+ {
+ delete sessionp;
+ sessionp = new ::qpid::messaging::Session(
+ *(const_cast<Session %>(rhs).NativeSession) );
+ }
+ return *this;
+ }
+
+ property ::qpid::messaging::Session * NativeSession
+ {
+ ::qpid::messaging::Session * get () { return sessionp; }
+ }
void Close();
void Commit();
|
