14#include "ns3/assert.h"
15#include "ns3/config.h"
17#include "ns3/object-vector.h"
18#include "ns3/simulator.h"
99 TypeId(
"ns3::BuildingListPriv")
101 .SetGroupName(
"Buildings")
102 .AddAttribute(
"BuildingList",
103 "The list of all buildings created during the simulation.",
134 (*
DoGet()) =
nullptr;
191 "Building index " << n <<
" is out of range (only have " <<
m_buildings.size()
static Ptr< Building > GetBuilding(uint32_t n)
std::vector< Ptr< Building > >::const_iterator Iterator
Const Iterator.
static uint32_t GetNBuildings()
static uint32_t Add(Ptr< Building > building)
private implementation detail of the BuildingList API.
std::vector< Ptr< Building > > m_buildings
Container of Building.
void DoDispose() override
Destructor implementation.
Ptr< Building > GetBuilding(uint32_t n)
Gets the n-th Building in the container.
uint32_t GetNBuildings()
Gets the number of Building in the container.
~BuildingListPriv() override
static TypeId GetTypeId()
Get the type ID.
uint32_t Add(Ptr< Building > building)
Add a Building to the list.
static Ptr< BuildingListPriv > Get()
Get the Singleton instance of BuildingListPriv (or create one)
BuildingList::Iterator Begin() const
Returns an iterator to the start of the list.
static Ptr< BuildingListPriv > * DoGet()
Get the Singleton instance of BuildingListPriv (or create one)
static void Delete()
Dispose the Singleton instance of BuildingListPriv.
BuildingList::Iterator End() const
Returns an iterator to the end of the list.
A base class which provides memory management and object aggregation.
void Initialize()
Invoke DoInitialize on all Objects aggregated to this one.
virtual void DoDispose()
Destructor implementation.
Smart pointer class similar to boost::intrusive_ptr.
static void ScheduleWithContext(uint32_t context, const Time &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...
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.
Ptr< T > CreateObject(Args &&... args)
Create an object by type, with varying number of constructor parameters.
#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.
Ptr< const AttributeChecker > MakeObjectVectorChecker()
ObjectPtrContainerValue ObjectVectorValue
ObjectVectorValue is an alias for ObjectPtrContainerValue.
Ptr< const AttributeAccessor > MakeObjectVectorAccessor(U T::*memberVariable)
MakeAccessorHelper implementation for ObjectVector.