A Discrete-Event Network Simulator
API
node-list.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2007 INRIA
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  * Authors:
18  * Mathieu Lacage <mathieu.lacage@sophia.inria.fr>,
19  */
20 #ifndef NODE_LIST_H
21 #define NODE_LIST_H
22 
23 #include "ns3/ptr.h"
24 
25 #include <vector>
26 
27 namespace ns3
28 {
29 
30 class Node;
31 class CallbackBase;
32 
40 class NodeList
41 {
42  public:
44  typedef std::vector<Ptr<Node>>::const_iterator Iterator;
45 
53  static uint32_t Add(Ptr<Node> node);
58  static Iterator Begin();
63  static Iterator End();
68  static Ptr<Node> GetNode(uint32_t n);
72  static uint32_t GetNNodes();
73 };
74 
75 } // namespace ns3
76 
77 #endif /* NODE_LIST_H */
the list of simulation nodes.
Definition: node-list.h:41
static Iterator Begin()
Definition: node-list.cc:237
std::vector< Ptr< Node > >::const_iterator Iterator
Node container iterator.
Definition: node-list.h:44
static uint32_t GetNNodes()
Definition: node-list.cc:258
static Ptr< Node > GetNode(uint32_t n)
Definition: node-list.cc:251
static uint32_t Add(Ptr< Node > node)
Definition: node-list.cc:230
static Iterator End()
Definition: node-list.cc:244
Every class exported by the ns3 library is enclosed in the ns3 namespace.