--- a/src/core/model/object.cc Sat Nov 10 18:45:37 2012 +0100
+++ b/src/core/model/object.cc Sat Nov 10 19:16:38 2012 +0100
@@ -47,16 +47,19 @@
: m_object (0),
m_current (0)
{
+ NS_LOG_FUNCTION (this);
}
bool
Object::AggregateIterator::HasNext (void) const
{
+ NS_LOG_FUNCTION (this);
return m_current < m_object->m_aggregates->n;
}
Ptr<const Object>
Object::AggregateIterator::Next (void)
{
+ NS_LOG_FUNCTION (this);
Object *object = m_object->m_aggregates->buffer[m_current];
m_current++;
return object;
@@ -65,18 +68,21 @@
: m_object (object),
m_current (0)
{
+ NS_LOG_FUNCTION (this << object);
}
TypeId
Object::GetInstanceTypeId (void) const
{
+ NS_LOG_FUNCTION (this);
return m_tid;
}
TypeId
Object::GetTypeId (void)
{
+ NS_LOG_FUNCTION_NOARGS ();
static TypeId tid = TypeId ("ns3::Object")
.SetParent<ObjectBase> ()
;
@@ -91,12 +97,14 @@
m_aggregates ((struct Aggregates *) std::malloc (sizeof (struct Aggregates))),
m_getObjectCount (0)
{
+ NS_LOG_FUNCTION (this);
m_aggregates->n = 1;
m_aggregates->buffer[0] = this;
}
Object::~Object ()
{
// remove this object from the aggregate list
+ NS_LOG_FUNCTION (this);
uint32_t n = m_aggregates->n;
for (uint32_t i = 0; i < n; i++)
{
@@ -124,18 +132,21 @@
m_aggregates ((struct Aggregates *) std::malloc (sizeof (struct Aggregates))),
m_getObjectCount (0)
{
+ NS_LOG_FUNCTION (&o);
m_aggregates->n = 1;
m_aggregates->buffer[0] = this;
}
void
Object::Construct (const AttributeConstructionList &attributes)
{
+ NS_LOG_FUNCTION (this << &attributes);
ConstructSelf (attributes);
}
Ptr<Object>
Object::DoGetObject (TypeId tid) const
{
+ NS_LOG_FUNCTION (this << tid);
NS_ASSERT (CheckLoose ());
uint32_t n = m_aggregates->n;
@@ -177,6 +188,7 @@
* object at the end of the array. To be safe, we restart iteration over the
* array whenever we call some user code, just in case.
*/
+ NS_LOG_FUNCTION (this);
restart:
uint32_t n = m_aggregates->n;
for (uint32_t i = 0; i < n; i++)
@@ -201,6 +213,7 @@
* So, to be safe, we restart the iteration over the array whenever we call some
* user code.
*/
+ NS_LOG_FUNCTION (this);
restart:
uint32_t n = m_aggregates->n;
for (uint32_t i = 0; i < n; i++)
@@ -217,6 +230,7 @@
void
Object::UpdateSortedArray (struct Aggregates *aggregates, uint32_t j) const
{
+ NS_LOG_FUNCTION (this << aggregates << j);
while (j > 0 &&
aggregates->buffer[j]->m_getObjectCount > aggregates->buffer[j-1]->m_getObjectCount)
{
@@ -229,6 +243,7 @@
void
Object::AggregateObject (Ptr<Object> o)
{
+ NS_LOG_FUNCTION (this << o);
NS_ASSERT (!m_disposed);
NS_ASSERT (!o->m_disposed);
NS_ASSERT (CheckLoose ());
@@ -300,18 +315,20 @@
void
Object::NotifyNewAggregate ()
{
-
+ NS_LOG_FUNCTION (this);
}
Object::AggregateIterator
Object::GetAggregateIterator (void) const
{
+ NS_LOG_FUNCTION (this);
return AggregateIterator (this);
}
void
Object::SetTypeId (TypeId tid)
{
+ NS_LOG_FUNCTION (this << tid);
NS_ASSERT (Check ());
m_tid = tid;
}
@@ -319,18 +336,21 @@
void
Object::DoDispose (void)
{
+ NS_LOG_FUNCTION (this);
NS_ASSERT (!m_disposed);
}
void
Object::DoStart (void)
{
+ NS_LOG_FUNCTION (this);
NS_ASSERT (!m_started);
}
bool
Object::Check (void) const
{
+ NS_LOG_FUNCTION (this);
return (GetReferenceCount () > 0);
}
@@ -344,6 +364,7 @@
bool
Object::CheckLoose (void) const
{
+ NS_LOG_FUNCTION (this);
uint32_t refcount = 0;
uint32_t n = m_aggregates->n;
for (uint32_t i = 0; i < n; i++)
@@ -357,6 +378,7 @@
Object::DoDelete (void)
{
// check if we really need to die
+ NS_LOG_FUNCTION (this);
for (uint32_t i = 0; i < m_aggregates->n; i++)
{
Object *current = m_aggregates->buffer[i];