A Discrete-Event Network Simulator
API
building-list.h
Go to the documentation of this file.
1 /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
2 /*
3  * Copyright (c) 2011 Centre Tecnologic de Telecomunicacions de Catalunya (CTTC)
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License version 2 as
7  * published by the Free Software Foundation;
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17  *
18  * Author: Jaume Nin <jaume.nin@cttc,cat>
19  * Based on NodeList implementation by Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
20  *
21  */
22 
23 #ifndef BUILDING_LIST_H_
24 #define BUILDING_LIST_H_
25 
26 #include <vector>
27 #include "ns3/ptr.h"
28 
29 namespace ns3 {
30 
31 class Building;
32 
34 {
35 public:
36  typedef std::vector< Ptr<Building> >::const_iterator Iterator;
37 
45  static uint32_t Add (Ptr<Building> building);
50  static Iterator Begin (void);
55  static Iterator End (void);
60  static Ptr<Building> GetBuilding (uint32_t n);
64  static uint32_t GetNBuildings (void);
65 };
66 
67 } // namespace ns3
68 
69 #endif /* BUILDING_LIST_H_ */
70 
71 
Smart pointer class similar to boost::intrusive_ptr.
Definition: ptr.h:73
static uint32_t GetNBuildings(void)
static Ptr< Building > GetBuilding(uint32_t n)
static Iterator End(void)
static Iterator Begin(void)
std::vector< Ptr< Building > >::const_iterator Iterator
Definition: building-list.h:36
Every class exported by the ns3 library is enclosed in the ns3 namespace.
static uint32_t Add(Ptr< Building > building)