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).");
#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 an Object subclass with the TypeId system.
static Ptr< Node > GetNode(uint32_t n)
Ptr< const AttributeAccessor > MakeObjectVectorAccessor(U T::*memberVariable)
MakeAccessorHelper implementation for ObjectVector.
#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)
Destructor implementation.
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
Every class exported by the ns3 library is enclosed in the ns3 namespace.
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)
Invoke DoInitialize on all Objects aggregated to this one.
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.
Container for a set of ns3::Object pointers.
a unique identifier for an interface.
TypeId SetParent(TypeId tid)
void Dispose(void)
Dispose of this Object.
uint32_t Add(Ptr< Node > node)