25 #include "ns3/assert.h"
26 #include "ns3/config.h"
28 #include "ns3/object-vector.h"
29 #include "ns3/simulator.h"
116 .SetGroupName(
"Network")
117 .AddAttribute(
"NodeList",
118 "The list of all nodes created during the simulation.",
121 MakeObjectVectorChecker<Node>());
139 ptr = CreateObject<NodeListPriv>();
151 (*
DoGet()) =
nullptr;
182 uint32_t index =
m_nodes.size();
214 "Node index " << n <<
" is out of range (only have " <<
m_nodes.size()
std::vector< Ptr< Node > >::const_iterator Iterator
Node container iterator.
static uint32_t GetNNodes()
static Ptr< Node > GetNode(uint32_t n)
static uint32_t Add(Ptr< Node > node)
private implementation detail of the NodeList API.
NodeList::Iterator End() const
Ptr< Node > GetNode(uint32_t n)
static void Delete()
Delete the nodes list object.
NodeList::Iterator Begin() const
static Ptr< NodeListPriv > * DoGet()
Get the node list object.
std::vector< Ptr< Node > > m_nodes
node objects container
static Ptr< NodeListPriv > Get()
Get the node list object.
uint32_t Add(Ptr< Node > node)
static TypeId GetTypeId()
Get the type ID.
void DoDispose() override
Dispose the nodes in the list.
A base class which provides memory management and object aggregation.
void Initialize()
Invoke DoInitialize on all Objects aggregated to this one.
void Dispose()
Dispose of this Object.
virtual void DoDispose()
Destructor implementation.
static void ScheduleWithContext(uint32_t context, const Time &delay, FUNC f, Ts &&... args)
Schedule an event with the given context.
static EventId ScheduleDestroy(FUNC f, Ts &&... args)
Schedule an event to run at the end of the simulation, when Simulator::Destroy() is called.
a unique identifier for an interface.
TypeId SetParent(TypeId tid)
Set the parent TypeId.
#define NS_ASSERT_MSG(condition, message)
At runtime, in debugging builds, if this condition is not true, the program prints the message to out...
void UnregisterRootNamespaceObject(Ptr< Object > obj)
void RegisterRootNamespaceObject(Ptr< Object > obj)
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
#define NS_LOG_FUNCTION_NOARGS()
Output the name of the function.
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by ",...
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
ObjectPtrContainerValue ObjectVectorValue
ObjectVectorValue is an alias for ObjectPtrContainerValue.
Ptr< const AttributeAccessor > MakeObjectVectorAccessor(U T::*memberVariable)
MakeAccessorHelper implementation for ObjectVector.