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
* 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
18
namespace
ns3
19
{
20
21
class
Building;
22
23
/**
24
* \ingroup buildings
25
*
26
* Container for Building class
27
*/
28
class
BuildingList
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
*/
56
static
Ptr<Building>
GetBuilding
(
uint32_t
n);
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_ */
ns3::BuildingList
Container for Building class.
Definition
building-list.h:29
ns3::BuildingList::GetBuilding
static Ptr< Building > GetBuilding(uint32_t n)
Definition
building-list.cc:225
ns3::BuildingList::Iterator
std::vector< Ptr< Building > >::const_iterator Iterator
Const Iterator.
Definition
building-list.h:32
ns3::BuildingList::GetNBuildings
static uint32_t GetNBuildings()
Definition
building-list.cc:231
ns3::BuildingList::End
static Iterator End()
Definition
building-list.cc:219
ns3::BuildingList::Add
static uint32_t Add(Ptr< Building > building)
Definition
building-list.cc:207
ns3::BuildingList::Begin
static Iterator Begin()
Definition
building-list.cc:213
ns3::Ptr
Smart pointer class similar to boost::intrusive_ptr.
Definition
mpi-test-fixtures.h:37
uint32_t
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
src
buildings
model
building-list.h
Generated on Fri Nov 8 2024 13:58:59 for ns-3 by
1.11.0