summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhil Mesnier <mesnier_p@ociweb.com>2013-05-08 22:16:20 +0000
committerPhil Mesnier <mesnier_p@ociweb.com>2013-05-08 22:16:20 +0000
commit86e49d072e322b4d1170cd92b87cbec808f3a553 (patch)
tree2b0f88d33980450a7e4ba04216e6d31f540a59e4
parent219118b4d5ea915eb6cbe9c2fa8e0903a3ad0d1e (diff)
downloadATCD-86e49d072e322b4d1170cd92b87cbec808f3a553.tar.gz
Wed May 8 22:13:12 UTC 2013 Phil Mesnier <mesnier_p@ociweb.com>
-rw-r--r--TAO/ChangeLog_Asynch_ImR9
-rw-r--r--TAO/tao/Intrusive_Ref_Count_Handle_T.h4
-rw-r--r--TAO/tao/Intrusive_Ref_Count_Handle_T.inl9
3 files changed, 22 insertions, 0 deletions
diff --git a/TAO/ChangeLog_Asynch_ImR b/TAO/ChangeLog_Asynch_ImR
index db69db65ccc..858655f565f 100644
--- a/TAO/ChangeLog_Asynch_ImR
+++ b/TAO/ChangeLog_Asynch_ImR
@@ -1,3 +1,12 @@
+Wed May 8 22:13:12 UTC 2013 Phil Mesnier <mesnier_p@ociweb.com>
+
+ * tao/Intrusive_Ref_Count_Handle_T.h:
+ * tao/Intrusive_Ref_Count_Handle_T.inl:
+
+ Added an equivalence operator that returns true if the two handles
+ point to the same underlying object. This allows the handle type to
+ be used in generic containers.
+
Wed May 8 14:15:01 UTC 2013 Phil Mesnier <mesnier_p@ociweb.com>
* : Merge from trunk
diff --git a/TAO/tao/Intrusive_Ref_Count_Handle_T.h b/TAO/tao/Intrusive_Ref_Count_Handle_T.h
index c936b9e039d..1a6561385fa 100644
--- a/TAO/tao/Intrusive_Ref_Count_Handle_T.h
+++ b/TAO/tao/Intrusive_Ref_Count_Handle_T.h
@@ -117,6 +117,10 @@ public:
/// Always leaves the smart pointer in the "nil" state upon return.
T* _retn (void);
+ /// Equality operator allows the refcounted object to be used generically
+ /// as a contained object
+ bool operator== (const TAO_Intrusive_Ref_Count_Handle& h) const;
+
private:
/// Claim a "copy" of the reference-counted object by adding
diff --git a/TAO/tao/Intrusive_Ref_Count_Handle_T.inl b/TAO/tao/Intrusive_Ref_Count_Handle_T.inl
index a1ff0e5c12c..4286a4b5e26 100644
--- a/TAO/tao/Intrusive_Ref_Count_Handle_T.inl
+++ b/TAO/tao/Intrusive_Ref_Count_Handle_T.inl
@@ -132,6 +132,15 @@ TAO_Intrusive_Ref_Count_Handle<T>::_retn()
template <typename T>
ACE_INLINE
+bool
+TAO_Intrusive_Ref_Count_Handle<T>::operator== (const TAO_Intrusive_Ref_Count_Handle& h) const
+{
+ return this->ptr_ == h.in();
+}
+
+
+template <typename T>
+ACE_INLINE
void
TAO_Intrusive_Ref_Count_Handle<T>::claim()
{