44class AttributeAccessor;
46class TraceSourceAccessor;
157 template <
typename T>
168 template <
typename T>
311 template <
typename T>
313 template <
typename T>
324 template <
typename T>
476 if (result !=
nullptr)
561 object->SetTypeId(T::GetTypeId());
563 return Ptr<T>(
object,
false);
577template <
typename T,
typename... Args>
ns3::AttributeConstructionList declaration.
ns3::AttributeValue, ns3::AttributeAccessor and ns3::AttributeChecker declarations.
List of Attribute name, value and checker triples used to construct Objects.
Iterate over the Objects aggregated to an ns3::Object.
Ptr< const Object > Next()
Get the next Aggregated Object.
Ptr< const Object > m_object
Parent Object.
AggregateIterator()
Default constructor, which has no Object.
uint32_t m_current
Current position in parent's aggregates.
bool HasNext() const
Check if there are more Aggregates to iterate over.
Instantiate subclasses of ns3::Object.
A base class which provides memory management and object aggregation.
Aggregates * m_aggregates
A pointer to an array of 'aggregates'.
void Initialize()
Invoke DoInitialize on all Objects aggregated to this one.
friend Ptr< T > CopyObject(Ptr< T > object)
Copy an Object.
void UpdateSortedArray(Aggregates *aggregates, uint32_t i) const
Keep the list of aggregates in most-recently-used order.
void Construct(const AttributeConstructionList &attributes)
Initialize all member variables registered as Attributes of this TypeId.
bool Check() const
Verify that this Object is still live, by checking it's reference count.
Ptr< Object > DoGetObject(TypeId tid) const
Find an Object of TypeId tid in the aggregates of this Object.
bool m_disposed
Set to true when the DoDispose() method of the Object has run, false otherwise.
virtual void NotifyNewAggregate()
Notify all Objects aggregated to this one of a new Object being aggregated.
bool CheckLoose() const
Check if any aggregated Objects have non-zero reference counts.
Ptr< T > GetObject() const
Get a pointer to the requested aggregated Object.
~Object() override
Destructor.
AggregateIterator GetAggregateIterator() const
Get an iterator to the Objects aggregated to this one.
virtual void DoInitialize()
Initialize() implementation.
void SetTypeId(TypeId tid)
Set the TypeId of this Object.
void AggregateObject(Ptr< Object > other)
Aggregate two Objects together.
TypeId GetInstanceTypeId() const override
Get the most derived TypeId for this Object.
static TypeId GetTypeId()
Register this type.
void Dispose()
Dispose of this Object.
TypeId m_tid
Identifies the type of this Object instance.
virtual void DoDispose()
Destructor implementation.
bool IsInitialized() const
Check if the object has been initialized.
uint32_t m_getObjectCount
The number of times the Object was accessed with a call to GetObject().
friend Ptr< T > CompleteConstruct(T *object)
Set the TypeId and construct all Attributes of an Object.
void DoDelete()
Attempt to delete this Object.
bool m_initialized
Set to true once the DoInitialize() method has run, false otherwise.
Smart pointer class similar to boost::intrusive_ptr.
A template-based reference counting class.
a unique identifier for an interface.
#define NS_ASSERT(condition)
At runtime, in debugging builds, if this condition is not true, the program prints the source file,...
Ptr< T > CreateObject(Args &&... args)
Create an object by type, with varying number of constructor parameters.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
U * PeekPointer(const Ptr< U > &p)
Ptr< T > CopyObject(Ptr< const T > object)
Ptr< T > CompleteConstruct(T *object)
ns3::ObjectBase declaration and NS_OBJECT_ENSURE_REGISTERED() macro definition.
ns3::Ptr smart pointer declaration and implementation.
ns3::SimpleRefCount declaration and template implementation.
The list of Objects aggregated to this one.
uint32_t n
The number of entries in buffer.
Object * buffer[1]
The array of Objects.
Standard Object deleter, used by SimpleRefCount to delete an Object when the reference count drops to...
static void Delete(Object *object)
Smart pointer deleter implementation for Object.