|
1 /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ |
|
2 /* |
|
3 * Copyright (c) 2007 INRIA |
|
4 * All rights reserved. |
|
5 * |
|
6 * This program is free software; you can redistribute it and/or modify |
|
7 * it under the terms of the GNU General Public License version 2 as |
|
8 * published by the Free Software Foundation; |
|
9 * |
|
10 * This program is distributed in the hope that it will be useful, |
|
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
13 * GNU General Public License for more details. |
|
14 * |
|
15 * You should have received a copy of the GNU General Public License |
|
16 * along with this program; if not, write to the Free Software |
|
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
18 * |
|
19 * Authors: |
|
20 * Mathieu Lacage <mathieu.lacage@sophia.inria.fr>, |
|
21 */ |
|
22 #ifndef NODE_LIST_H |
|
23 #define NODE_LIST_H |
|
24 |
|
25 #include <vector> |
|
26 #include <string> |
|
27 #include "ns3/array-trace-resolver.h" |
|
28 |
|
29 namespace ns3 { |
|
30 |
|
31 class Node; |
|
32 class CallbackBase; |
|
33 class TraceResolver; |
|
34 class TraceContext; |
|
35 |
|
36 class NodeList |
|
37 { |
|
38 public: |
|
39 typedef ArrayTraceResolver<Node>::Index NodeIndex; |
|
40 typedef std::vector<Node *>::iterator Iterator; |
|
41 |
|
42 static void Add (Node *node); |
|
43 static Iterator Begin (void); |
|
44 static Iterator End (void); |
|
45 static TraceResolver *CreateTraceResolver (TraceContext const &context); |
|
46 |
|
47 static Node *GetNode (uint32_t n); |
|
48 |
|
49 private: |
|
50 static std::vector<Node *> *GetNodes (void); |
|
51 static uint32_t GetNNodes (void); |
|
52 |
|
53 }; |
|
54 |
|
55 }//namespace ns3 |
|
56 |
|
57 |
|
58 #endif /* NODE_LIST_H */ |