A Discrete-Event Network Simulator
API
rocketfuel-topology-reader.h
Go to the documentation of this file.
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2 /*
3  * Copyright (c) 2010 Hajime Tazaki
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: Hajime Tazaki (tazaki@sfc.wide.ad.jp)
19  */
20 
21 #ifndef ROCKETFUEL_TOPOLOGY_READER_H
22 #define ROCKETFUEL_TOPOLOGY_READER_H
23 
24 #include "topology-reader.h"
25 
26 namespace ns3 {
27 
28 
29 // ------------------------------------------------------------
30 // --------------------------------------------
43 {
44 public:
49  static TypeId GetTypeId (void);
50 
52  virtual ~RocketfuelTopologyReader ();
53 
64  virtual NodeContainer Read (void);
65 
66 private:
77  NodeContainer GenerateFromMapsFile (int argc, char *argv[]);
78 
89  NodeContainer GenerateFromWeightsFile (int argc, char *argv[]);
90 
95  {
99  };
100 
101 
107  enum RF_FileType GetFileType (const char *);
108 
111  std::map<std::string, Ptr<Node> > m_nodeMap;
112 
113 private:
127 
128 
129  // end class RocketfuelTopologyReader
130 };
131 
132 // end namespace ns3
133 };
134 
135 
136 #endif /* ROCKETFUEL_TOPOLOGY_READER_H */
137 
138 
static TypeId GetTypeId(void)
Get the type ID.
NodeContainer GenerateFromMapsFile(int argc, char *argv[])
Topology read function from a file containing the nodes map.
enum RF_FileType GetFileType(const char *)
Classifies the file type according to its content.
NodeContainer GenerateFromWeightsFile(int argc, char *argv[])
Topology read function from a file containing the nodes weights.
Interface for input file readers management.
std::map< std::string, Ptr< Node > > m_nodeMap
Map of the nodes (name, node).
Every class exported by the ns3 library is enclosed in the ns3 namespace.
keep track of a set of node pointers.
virtual NodeContainer Read(void)
Main topology reading function.
RF_FileType
Enum of the possible file types.
Topology file reader (Rocketfuel-format type).
RocketfuelTopologyReader & operator=(const RocketfuelTopologyReader &)
Copy constructor.
a unique identifier for an interface.
Definition: type-id.h:58