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).");
Ptr< const AttributeAccessor > MakeObjectVectorAccessor(U T::*memberContainer)
static Ptr< BuildingListPriv > Get(void)
smart pointer class similar to boost::intrusive_ptr
static TypeId GetTypeId(void)
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register the class in the ns-3 factory.
static uint32_t GetNBuildings(void)
Time TimeStep(uint64_t ts)
static Ptr< Building > GetBuilding(uint32_t n)
#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)
This method is called by Object::Dispose or by the object's destructor, whichever comes first...
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)
This method is called by Object::Dispose or by the object's destructor, whichever comes first...
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)
This method calls the virtual DoInitialize method on all the objects aggregated to this object...
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
contain 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)