57 return m_current < m_object->m_aggregates->n;
108 for (uint32_t i = 0; i < n; i++)
130 m_initialized (false),
152 for (uint32_t i = 0; i < n; i++)
156 while (cur != tid && cur != objectTid)
173 return const_cast<Object *
> (current);
192 for (uint32_t i = 0; i < n; i++)
217 for (uint32_t i = 0; i < n; i++)
237 aggregates->
buffer[j] = tmp;
253 "Multiple aggregation of objects of type " <<
262 aggregates->
n = total;
265 std::memcpy (&aggregates->
buffer[0],
282 uint32_t n = aggregates->
n;
283 for (uint32_t i = 0; i < n; i++)
294 for (uint32_t i = 0; i < a->
n; i++)
299 for (uint32_t i = 0; i < b->
n; i++)
366 uint32_t refcount = 0;
368 for (uint32_t i = 0; i < n; i++)
373 return (refcount > 0);
394 for (uint32_t i = 0; i < n; i++)
405 for (uint32_t i = 0; i < n; i++)
bool CheckLoose(void) const
smart pointer class similar to boost::intrusive_ptr
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by "...
virtual TypeId GetInstanceTypeId(void) const
void DoDelete(void)
Attempt to delete this object.
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register the class in the ns-3 factory.
bool m_disposed
Set to true when the DoDispose method of the object has run, false otherwise.
uint32_t m_getObjectCount
Indicates the number of times the object was accessed with a call to GetObject.
#define NS_ASSERT(condition)
At runtime, in debugging builds, if this condition is not true, the program prints the source file...
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
TypeId GetParent(void) const
struct Aggregates * m_aggregates
a pointer to an array of 'aggregates'.
virtual void DoDispose(void)
This method is called by Object::Dispose or by the object's destructor, whichever comes first...
#define NS_FATAL_ERROR(msg)
fatal error handling
implement the ns-3 type and attribute system
bool m_initialized
Set to true once the DoInitialize method has run, false otherwise.
uint32_t GetReferenceCount(void) const
Get the reference count of the object.
Ptr< const Object > Next(void)
void SetTypeId(TypeId tid)
T * PeekPointer(const Ptr< T > &p)
void AggregateObject(Ptr< Object > other)
virtual void NotifyNewAggregate(void)
This method is invoked whenever two sets of objects are aggregated together.
void ConstructSelf(const AttributeConstructionList &attributes)
TypeId m_tid
Identifies the type of this object instance.
std::string GetName(void) const
friend class AggregateIterator
AggregateIterator GetAggregateIterator(void) const
static TypeId GetTypeId(void)
Register this type.
void Construct(const AttributeConstructionList &attributes)
void Initialize(void)
This method calls the virtual DoInitialize method on all the objects aggregated to this object...
Ptr< Object > DoGetObject(TypeId tid) const
Find an object of TypeId tid in the aggregates of this Object.
a base class which provides memory management and object aggregation
a unique identifier for an interface.
void UpdateSortedArray(struct Aggregates *aggregates, uint32_t i) const
Keep the list of aggregates in most-recently-used order.
TypeId SetParent(TypeId tid)
void Dispose(void)
Run the DoDispose methods of this object and all the objects aggregated to it.
Iterate over the objects aggregated to an ns3::Object.
virtual void DoInitialize(void)
This method is called only once by Object::Initialize.
This data structure uses a classic C-style trick to hold an array of variable size without performing...