A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
building-list.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2011 Centre Tecnologic de Telecomunicacions de Catalunya (CTTC)
3 *
4 * SPDX-License-Identifier: GPL-2.0-only
5 *
6 * Author: Jaume Nin <jaume.nin@cttc,cat>
7 * Based on NodeList implementation by Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
8 *
9 */
10
11#ifndef BUILDING_LIST_H_
12#define BUILDING_LIST_H_
13
14#include "ns3/ptr.h"
15
16#include <vector>
17
18namespace ns3
19{
20
21class Building;
22
23/**
24 * \ingroup buildings
25 *
26 * Container for Building class
27 */
29{
30 public:
31 /// Const Iterator
32 typedef std::vector<Ptr<Building>>::const_iterator Iterator;
33
34 /**
35 * \param building building to add
36 * \returns index of building in list.
37 *
38 * This method is called automatically from Building::Building so
39 * the user has little reason to call it himself.
40 */
41 static uint32_t Add(Ptr<Building> building);
42 /**
43 * \returns a C++ iterator located at the beginning of this
44 * list.
45 */
46 static Iterator Begin();
47 /**
48 * \returns a C++ iterator located at the end of this
49 * list.
50 */
51 static Iterator End();
52 /**
53 * \param n index of requested building.
54 * \returns the Building associated to index n.
55 */
57 /**
58 * \returns the number of buildings currently in the list.
59 */
60 static uint32_t GetNBuildings();
61};
62
63} // namespace ns3
64
65#endif /* BUILDING_LIST_H_ */
Container for Building class.
static Ptr< Building > GetBuilding(uint32_t n)
std::vector< Ptr< Building > >::const_iterator Iterator
Const Iterator.
static uint32_t GetNBuildings()
static Iterator End()
static uint32_t Add(Ptr< Building > building)
static Iterator Begin()
Smart pointer class similar to boost::intrusive_ptr.
Every class exported by the ns3 library is enclosed in the ns3 namespace.