23 #include "ns3/simulator.h" 24 #include "ns3/object-vector.h" 25 #include "ns3/config.h" 27 #include "ns3/assert.h" 67 .SetGroupName (
"Buildings")
68 .AddAttribute (
"BuildingList",
"The list of all buildings created during the simulation.",
71 MakeObjectVectorChecker<Building> ())
87 ptr = CreateObject<BuildingListPriv> ();
117 building->Dispose ();
154 " 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)
NS_ASSERT_MSG(false, "Ipv4AddressGenerator::MaskToIndex(): Impossible")
void UnregisterRootNamespaceObject(Ptr< Object > obj)
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.
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)
void RegisterRootNamespaceObject(Ptr< Object > obj)
BuildingList::Iterator End(void) const
BuildingList::Iterator Begin(void) const
std::vector< Ptr< Building > >::const_iterator Iterator
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)
static uint32_t Add(Ptr< Building > building)
static void ScheduleWithContext(uint32_t context, Time const &delay, MEM mem_ptr, OBJ obj)
Schedule an event with the given context.
uint32_t GetNBuildings(void)
static EventId ScheduleDestroy(MEM mem_ptr, OBJ obj)
Schedule an event to expire when Simulator::Destroy is called.
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)
a unique identifier for an interface.
TypeId SetParent(TypeId tid)
Set the parent TypeId.
void Initialize(void)
Invoke DoInitialize on all Objects aggregated to this one.