22 #include "ns3/simulator.h"
23 #include "ns3/object-vector.h"
24 #include "ns3/config.h"
26 #include "ns3/assert.h"
114 .AddAttribute (
"NodeList",
"The list of all nodes created during the simulation.",
117 MakeObjectVectorChecker<Node> ())
135 ptr = CreateObject<NodeListPriv> ();
178 uint32_t index =
m_nodes.size ();
208 " is out of range (only have " <<
m_nodes.size () <<
" nodes).");
Ptr< const AttributeAccessor > MakeObjectVectorAccessor(U T::*memberContainer)
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by "...
static uint32_t GetNNodes(void)
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register the class in the ns-3 factory.
static Ptr< Node > GetNode(uint32_t n)
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
Ptr< Node > GetNode(uint32_t n)
static void Delete(void)
Delete the nodes list object.
static TypeId GetTypeId(void)
Get the type ID.
virtual void DoDispose(void)
This method is called by Object::Dispose or by the object's destructor, whichever comes first...
static Ptr< NodeListPriv > Get(void)
Get the node list object.
void UnregisterRootNamespaceObject(Ptr< Object > obj)
#define NS_LOG_FUNCTION_NOARGS()
Output the name of the function.
NodeList::Iterator End(void) const
static Iterator End(void)
static uint32_t Add(Ptr< Node > node)
static void ScheduleWithContext(uint32_t context, Time const &time, MEM mem_ptr, OBJ obj)
Schedule an event with the given context.
std::vector< Ptr< Node > > m_nodes
node objects container
std::vector< Ptr< Node > >::const_iterator Iterator
Node container iterator.
private implementation detail of the NodeList API.
Time TimeStep(uint64_t ts)
void RegisterRootNamespaceObject(Ptr< Object > obj)
#define NS_ASSERT_MSG(condition, message)
At runtime, in debugging builds, if this condition is not true, the program prints the message to out...
NodeList::Iterator Begin(void) const
static Iterator Begin(void)
virtual void DoDispose(void)
Dispose the nodes in the list.
void Initialize(void)
This method calls the virtual DoInitialize method on all the objects aggregated to this object...
static EventId ScheduleDestroy(MEM mem_ptr, OBJ obj)
Schedule an event to expire at Destroy time.
a base class which provides memory management and object aggregation
static Ptr< NodeListPriv > * DoGet(void)
Get the node list object.
contain a set of ns3::Object pointers.
a unique identifier for an interface.
TypeId SetParent(TypeId tid)
void Dispose(void)
Run the DoDispose methods of this object and all the objects aggregated to it.
uint32_t Add(Ptr< Node > node)