23 #include "ns3/simulator.h"
24 #include "ns3/object-vector.h"
25 #include "ns3/config.h"
27 #include "ns3/assert.h"
67 .AddAttribute (
"BuildingList",
"The list of all buildings created during the simulation.",
70 MakeObjectVectorChecker<Building> ())
86 ptr = CreateObject<BuildingListPriv> ();
116 building->Dispose ();
153 " is out of range (only have " <<
m_buildings.size () <<
" buildings).");
static Ptr< BuildingListPriv > Get(void)
Smart pointer class similar to boost::intrusive_ptr.
static TypeId GetTypeId(void)
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
static uint32_t GetNBuildings(void)
static Ptr< Building > GetBuilding(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.
private implementation detail of the BuildingList API.
virtual void DoDispose(void)
Destructor implementation.
void UnregisterRootNamespaceObject(Ptr< Object > obj)
static Iterator End(void)
#define NS_LOG_FUNCTION_NOARGS()
Output the name of the function.
static Iterator Begin(void)
uint32_t Add(Ptr< Building > building)
BuildingList::Iterator End(void) const
std::vector< Ptr< Building > >::const_iterator Iterator
static void ScheduleWithContext(uint32_t context, Time const &time, MEM mem_ptr, OBJ obj)
Schedule an event with the given context.
Ptr< Building > GetBuilding(uint32_t n)
virtual void DoDispose(void)
Destructor implementation.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
Time TimeStep(uint64_t ts)
void RegisterRootNamespaceObject(Ptr< Object > obj)
static uint32_t Add(Ptr< Building > building)
#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 Initialize(void)
Invoke DoInitialize on all Objects aggregated to this one.
uint32_t GetNBuildings(void)
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.
Container for a set of ns3::Object pointers.
std::vector< Ptr< Building > > m_buildings
static Ptr< BuildingListPriv > * DoGet(void)
BuildingList::Iterator Begin(void) const
a unique identifier for an interface.
TypeId SetParent(TypeId tid)