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 "ns3/nstime.h"
25 #include "topology-reader.h"
26 
27 namespace ns3 {
28 
29 
30 // ------------------------------------------------------------
31 // --------------------------------------------
44 {
45 public:
50  static TypeId GetTypeId (void);
51 
53  virtual ~RocketfuelTopologyReader ();
54 
65  virtual NodeContainer Read (void);
66 
67 private:
78  NodeContainer GenerateFromMapsFile (int argc, char *argv[]);
79 
90  NodeContainer GenerateFromWeightsFile (int argc, char *argv[]);
91 
96  {
100  };
101 
102 
108  enum RF_FileType GetFileType (const char *);
109 
112  std::map<std::string, Ptr<Node> > m_nodeMap;
113 
114 private:
128 
129 
130  // end class RocketfuelTopologyReader
131 };
132 
133 // end namespace ns3
134 };
135 
136 
137 #endif /* ROCKETFUEL_TOPOLOGY_READER_H */
138 
139 
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.
RF_FileType
Enum of the possible file types.
virtual NodeContainer Read(void)
Main topology reading function.
Topology file reader (Rocketfuel-format type).
RocketfuelTopologyReader & operator=(const RocketfuelTopologyReader &)
Copy constructor.
a unique identifier for an interface.
Definition: type-id.h:58