add RefCountBase::GetReferenceCount.
authorMathieu Lacage <mathieu.lacage@sophia.inria.fr>
Tue, 08 Jul 2008 10:12:38 -0700
changeset 3393 10369bf4b3e2
parent 3392 775777e52833
child 3394 1680d5004ee8
add RefCountBase::GetReferenceCount.
src/core/ref-count-base.h
--- a/src/core/ref-count-base.h	Tue Jul 08 10:11:55 2008 -0700
+++ b/src/core/ref-count-base.h	Tue Jul 08 10:12:38 2008 -0700
@@ -59,6 +59,11 @@
    */
   inline void Unref (void) const;
 
+  /**
+   * Get the reference count of the object.  Normally not needed; for language bindings.
+   */
+  inline uint32_t GetReferenceCount (void) const;
+
 private:
   // Note we make this mutable so that the const methods can still
   // change it.
@@ -86,6 +91,12 @@
     }
 }
 
+uint32_t
+RefCountBase::GetReferenceCount (void) const
+{
+  return m_count;
+}
+
 } // namespace ns3
 
 #endif /* __REF_COUNT_BASE_H__*/