43 class AttributeAccessor;
45 class TraceSourceAccessor;
155 template <
typename T>
164 template <
typename T>
306 template <
typename T>
308 template <
typename T>
319 template <
typename T>
356 bool Check (
void)
const;
440 template <
typename T>
442 template <
typename T>
460 template <
typename T>
480 template <
typename T>
496 template <
typename T>
500 NS_ASSERT (p->GetInstanceTypeId () ==
object->GetInstanceTypeId ());
504 template <
typename T>
507 Ptr<T> p = Ptr<T> (
new T (*
PeekPointer (
object)),
false);
508 NS_ASSERT (p->GetInstanceTypeId () ==
object->GetInstanceTypeId ());
512 template <
typename T>
515 object->SetTypeId (T::GetTypeId ());
517 return Ptr<T> (object,
false);
530 template <
typename T>
542 template <
typename T,
typename T1>
557 template <
typename T,
typename T1,
typename T2>
574 template <
typename T,
typename T1,
typename T2,
typename T3>
593 template <
typename T,
typename T1,
typename T2,
typename T3,
typename T4>
614 template <
typename T,
typename T1,
typename T2,
typename T3,
typename T4,
typename T5>
637 template <
typename T,
typename T1,
typename T2,
typename T3,
typename T4,
typename T5,
typename T6>
662 template <
typename T,
typename T1,
typename T2,
typename T3,
typename T4,
typename T5,
typename T6,
typename T7>
void Dispose(void)
Dispose of this Object.
virtual void DoInitialize(void)
Initialize() implementation.
Smart pointer class similar to boost::intrusive_ptr.
void Construct(const AttributeConstructionList &attributes)
Initialize all member variables registered as Attributes of this TypeId.
Ptr< T > GetObject(void) const
Get a pointer to the requested aggregated Object.
Smart pointer implementation.
bool m_disposed
Set to true when the DoDispose() method of the Object has run, false otherwise.
void AggregateObject(Ptr< Object > other)
Aggregate two Objects together.
uint32_t m_getObjectCount
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...
U * PeekPointer(const Ptr< U > &p)
bool Check(void) const
Verify that this Object is still live, by checking it's reference count.
struct Aggregates * m_aggregates
A pointer to an array of 'aggregates'.
virtual void DoDispose(void)
Destructor implementation.
friend Ptr< T > CompleteConstruct(T *object)
Set the TypeId and construct all Attributes of an Object.
bool m_initialized
Set to true once the DoInitialize() method has run, false otherwise.
Object * buffer[1]
The array of Objects.
AggregateIterator GetAggregateIterator(void) const
Get an iterator to the Objects aggregated to this one.
Ptr< const Object > Next(void)
Get the next Aggregated Object.
ns3::AttributeConstructionList declaration.
ns3::ObjectBase class declaration and NS_OBJECT_ENSURE_REGISTERED() definition.
AggregateIterator()
Default constructor, which has no Object.
Ptr< const Object > m_object
Parent Object.
void DoDelete(void)
Attempt to delete this Object.
ns3::AttributeValue, ns3::AttributeAccessor and ns3::AttributeChecker declarations.
List of Attribute name, value and checker triples used to construct Objects.
friend Ptr< T > CopyObject(Ptr< T > object)
Copy an Object.
uint32_t n
The number of entries in buffer.
Ptr< Object > DoGetObject(TypeId tid) const
Find an Object of TypeId tid in the aggregates of this Object.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
virtual TypeId GetInstanceTypeId(void) const
Implement the GetInstanceTypeId method defined in ObjectBase.
TypeId m_tid
Identifies the type of this Object instance.
bool IsInitialized(void) const
Check if the object has been initialized.
Standard Object deleter, used by SimpleRefCount to delete an Object when the reference count drops to...
void SetTypeId(TypeId tid)
Set the TypeId of this Object.
static TypeId GetTypeId(void)
Register this type.
static void Delete(Object *object)
Smart pointer deleter implementation for Object.
Instantiate subclasses of ns3::Object.
Ptr< T > CopyObject(Ptr< const T > object)
bool HasNext(void) const
Check if there are more Aggregates to iterate over.
bool CheckLoose(void) const
Check if any aggregated Objects have non-zero reference counts.
uint32_t m_current
Current position in parent's aggegrates.
virtual ~Object()
Destructor.
Ptr< T > CompleteConstruct(T *object)
Ptr< T > CreateObject(void)
Create an object by type, with varying number of constructor parameters.
void UpdateSortedArray(struct Aggregates *aggregates, uint32_t i) const
Keep the list of aggregates in most-recently-used order.
A base class which provides memory management and object aggregation.
virtual void NotifyNewAggregate(void)
Notify all Objects aggregated to this one of a new Object being aggregated.
A template-based reference counting class.
a unique identifier for an interface.
Iterate over the Objects aggregated to an ns3::Object.
void Initialize(void)
Invoke DoInitialize on all Objects aggregated to this one.
Reference counting for smart pointers.
The list of Objects aggregated to this one.