summaryrefslogtreecommitdiff
path: root/qpid/cpp/src/qmf/engine/ObjectIdImpl.cpp
diff options
context:
space:
mode:
authorKenneth Anthony Giusti <kgiusti@apache.org>2010-02-08 21:33:54 +0000
committerKenneth Anthony Giusti <kgiusti@apache.org>2010-02-08 21:33:54 +0000
commit9523fa332a8fd0f713c3c12c941b061316597d84 (patch)
tree8e0bced5acbb61ba6780f4ed29d310953226f28f /qpid/cpp/src/qmf/engine/ObjectIdImpl.cpp
parentebb7a3b8337377a1717b43ca5c56187c00d4c382 (diff)
downloadqpid-python-9523fa332a8fd0f713c3c12c941b061316597d84.tar.gz
QPID-2396: add assignment operator to ObjectId class.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@907808 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/src/qmf/engine/ObjectIdImpl.cpp')
-rw-r--r--qpid/cpp/src/qmf/engine/ObjectIdImpl.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/qpid/cpp/src/qmf/engine/ObjectIdImpl.cpp b/qpid/cpp/src/qmf/engine/ObjectIdImpl.cpp
index 76db6d91f9..670ee385a3 100644
--- a/qpid/cpp/src/qmf/engine/ObjectIdImpl.cpp
+++ b/qpid/cpp/src/qmf/engine/ObjectIdImpl.cpp
@@ -196,4 +196,14 @@ bool ObjectId::operator<(const ObjectId& other) const { return *impl < *other.im
bool ObjectId::operator>(const ObjectId& other) const { return *impl > *other.impl; }
bool ObjectId::operator<=(const ObjectId& other) const { return !(*impl > *other.impl); }
bool ObjectId::operator>=(const ObjectId& other) const { return !(*impl < *other.impl); }
+ObjectId& ObjectId::operator=(const ObjectId& other) {
+ ObjectIdImpl *old;
+ if (this != &other) {
+ old = impl;
+ impl = new ObjectIdImpl(*(other.impl));
+ if (old)
+ delete old;
+ }
+ return *this;
+}