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