A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Documentation ▼
Installation
Manual
Models
Contributing
Wiki
Development ▼
API Docs
Issue Tracker
Merge Requests
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
* This program is free software; you can redistribute it and/or modify
5
* it under the terms of the GNU General Public License version 2 as
6
* published by the Free Software Foundation;
7
*
8
* This program is distributed in the hope that it will be useful,
9
* but WITHOUT ANY WARRANTY; without even the implied warranty of
10
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
* GNU General Public License for more details.
12
*
13
* You should have received a copy of the GNU General Public License
14
* along with this program; if not, write to the Free Software
15
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16
*
17
* Author: Jaume Nin <jaume.nin@cttc,cat>
18
* Based on NodeList implementation by Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
19
*
20
*/
21
22
#ifndef BUILDING_LIST_H_
23
#define BUILDING_LIST_H_
24
25
#include "ns3/ptr.h"
26
27
#include <vector>
28
29
namespace
ns3
30
{
31
32
class
Building;
33
34
/**
35
* \ingroup buildings
36
*
37
* Container for Building class
38
*/
39
class
BuildingList
40
{
41
public
:
42
/// Const Iterator
43
typedef
std::vector<Ptr<Building>>::const_iterator
Iterator
;
44
45
/**
46
* \param building building to add
47
* \returns index of building in list.
48
*
49
* This method is called automatically from Building::Building so
50
* the user has little reason to call it himself.
51
*/
52
static
uint32_t
Add
(
Ptr<Building>
building);
53
/**
54
* \returns a C++ iterator located at the beginning of this
55
* list.
56
*/
57
static
Iterator
Begin
();
58
/**
59
* \returns a C++ iterator located at the end of this
60
* list.
61
*/
62
static
Iterator
End
();
63
/**
64
* \param n index of requested building.
65
* \returns the Building associated to index n.
66
*/
67
static
Ptr<Building>
GetBuilding
(
uint32_t
n);
68
/**
69
* \returns the number of buildings currently in the list.
70
*/
71
static
uint32_t
GetNBuildings
();
72
};
73
74
}
// namespace ns3
75
76
#endif
/* BUILDING_LIST_H_ */
ns3::BuildingList
Container for Building class.
Definition:
building-list.h:40
ns3::BuildingList::GetBuilding
static Ptr< Building > GetBuilding(uint32_t n)
Definition:
building-list.cc:236
ns3::BuildingList::Iterator
std::vector< Ptr< Building > >::const_iterator Iterator
Const Iterator.
Definition:
building-list.h:43
ns3::BuildingList::GetNBuildings
static uint32_t GetNBuildings()
Definition:
building-list.cc:242
ns3::BuildingList::End
static Iterator End()
Definition:
building-list.cc:230
ns3::BuildingList::Add
static uint32_t Add(Ptr< Building > building)
Definition:
building-list.cc:218
ns3::BuildingList::Begin
static Iterator Begin()
Definition:
building-list.cc:224
ns3::Ptr
Smart pointer class similar to boost::intrusive_ptr.
Definition:
ptr.h:77
uint32_t
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
src
buildings
model
building-list.h
Generated on Tue May 28 2024 23:34:15 for ns-3 by
1.9.6