--- a/src/core/object.cc Thu May 03 00:12:39 2007 +0200
+++ b/src/core/object.cc Thu May 03 00:23:23 2007 +0200
@@ -35,7 +35,7 @@
}
void
-Object::Ref (void)
+Object::Ref (void) const
{
NS_DEBUG("Object::Ref (): this == 0x" << this);
m_count++;
@@ -43,7 +43,7 @@
}
void
-Object::Unref (void)
+Object::Unref (void) const
{
NS_DEBUG("Object::Unref (): this == 0x" << this);
m_count--;
@@ -57,7 +57,7 @@
}
bool
-Object::IsSingle (void)
+Object::IsSingle (void) const
{
NS_DEBUG("Object::IsSingle (): m_count == " << m_count);
return m_count == 1;
--- a/src/core/object.h Thu May 03 00:12:39 2007 +0200
+++ b/src/core/object.h Thu May 03 00:23:23 2007 +0200
@@ -30,12 +30,12 @@
public:
Object ();
virtual ~Object ();
- void Ref (void);
- void Unref (void);
- bool IsSingle (void);
+ void Ref (void) const;
+ void Unref (void) const;
+ bool IsSingle (void) const;
virtual void Dispose (void);
private:
- uint32_t m_count;
+ mutable uint32_t m_count;
};
}//namespace ns3