22 #include "ns3/simulator.h"
23 #include "ns3/object-vector.h"
24 #include "ns3/config.h"
26 #include "ns3/assert.h"
114 .SetGroupName(
"Network")
115 .AddAttribute (
"NodeList",
"The list of all nodes created during the simulation.",
118 MakeObjectVectorChecker<Node> ())
136 ptr = CreateObject<NodeListPriv> ();
179 uint32_t index =
m_nodes.size ();
209 " is out of range (only have " <<
m_nodes.size () <<
" nodes).");
static Iterator End(void)
static uint32_t GetNNodes(void)
static Ptr< Node > GetNode(uint32_t n)
static uint32_t Add(Ptr< Node > node)
static Iterator Begin(void)
std::vector< Ptr< Node > >::const_iterator Iterator
Node container iterator.
private implementation detail of the NodeList API.
virtual void DoDispose(void)
Dispose the nodes in the list.
Ptr< Node > GetNode(uint32_t n)
static Ptr< NodeListPriv > * DoGet(void)
Get the node list object.
static Ptr< NodeListPriv > Get(void)
Get the node list object.
static void Delete(void)
Delete the nodes list object.
static TypeId GetTypeId(void)
Get the type ID.
NodeList::Iterator End(void) const
std::vector< Ptr< Node > > m_nodes
node objects container
NodeList::Iterator Begin(void) const
uint32_t Add(Ptr< Node > node)
A base class which provides memory management and object aggregation.
virtual void DoDispose(void)
Destructor implementation.
void Initialize(void)
Invoke DoInitialize on all Objects aggregated to this one.
void Dispose(void)
Dispose of this Object.
Container for a set of ns3::Object pointers.
static void ScheduleWithContext(uint32_t context, Time const &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...
Ptr< const AttributeAccessor > MakeObjectVectorAccessor(U T::*memberVariable)
MakeAccessorHelper implementation for ObjectVector.
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.