summaryrefslogtreecommitdiff
path: root/TAO/tao/Refcounted_ObjectKey.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/tao/Refcounted_ObjectKey.cpp')
-rw-r--r--TAO/tao/Refcounted_ObjectKey.cpp41
1 files changed, 41 insertions, 0 deletions
diff --git a/TAO/tao/Refcounted_ObjectKey.cpp b/TAO/tao/Refcounted_ObjectKey.cpp
new file mode 100644
index 00000000000..074a9e3d6ed
--- /dev/null
+++ b/TAO/tao/Refcounted_ObjectKey.cpp
@@ -0,0 +1,41 @@
+//$Id$
+#include "tao/Refcounted_ObjectKey.h"
+#include "ace/Log_Msg.h"
+
+#if !defined (__ACE_INLINE__)
+#include "tao/Refcounted_ObjectKey.inl"
+#endif /* defined INLINE */
+
+ACE_RCSID(tao,
+ Refcounted_ObjectKey,
+ "$Id$")
+
+
+TAO_BEGIN_VERSIONED_NAMESPACE_DECL
+
+TAO::Refcounted_ObjectKey::Refcounted_ObjectKey (const TAO::ObjectKey &key)
+ : object_key_ (key)
+ , ref_count_ (1)
+{
+}
+
+TAO::Refcounted_ObjectKey::~Refcounted_ObjectKey (void)
+{
+}
+
+CORBA::ULong
+TAO::Refcounted_ObjectKey::decr_refcount (void)
+{
+ if (--this->ref_count_ > 0)
+ {
+ return this->ref_count_;
+ }
+
+ ACE_ASSERT (this->ref_count_ == 0);
+
+ delete this;
+
+ return 0;
+}
+
+TAO_END_VERSIONED_NAMESPACE_DECL