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
32namespace ns3 {
33
34
35// ------------------------------------------------------------
36// --------------------------------------------
49{
50public:
55 static TypeId GetTypeId (void);
56
59
60 // Delete copy constructor and assignment operator to avoid misuse
63
74 virtual NodeContainer Read (void);
75
76private:
87 NodeContainer GenerateFromMapsFile (int argc, char *argv[]);
88
99 NodeContainer GenerateFromWeightsFile (int argc, char *argv[]);
100
105 {
109 };
110
111
118 enum RF_FileType GetFileType (const char *buf);
119
122 std::map<std::string, Ptr<Node> > m_nodeMap;
123
124 // end class RocketfuelTopologyReader
125};
126
127// end namespace ns3
128};
129
130
131#endif /* ROCKETFUEL_TOPOLOGY_READER_H */
132
133
keep track of a set of node pointers.
Topology file reader (Rocketfuel-format type).
RF_FileType
Enum of the possible file types.
static TypeId GetTypeId(void)
Get the type ID.
enum RF_FileType GetFileType(const char *buf)
Classifies the file type according to its content.
RocketfuelTopologyReader & operator=(const RocketfuelTopologyReader &)=delete
NodeContainer GenerateFromWeightsFile(int argc, char *argv[])
Topology read function from a file containing the nodes weights.
RocketfuelTopologyReader(const RocketfuelTopologyReader &)=delete
std::map< std::string, Ptr< Node > > m_nodeMap
Map of the nodes (name, node).
NodeContainer GenerateFromMapsFile(int argc, char *argv[])
Topology read function from a file containing the nodes map.
virtual NodeContainer Read(void)
Main topology reading function.
Interface for input file readers management.
a unique identifier for an interface.
Definition: type-id.h:59
Every class exported by the ns3 library is enclosed in the ns3 namespace.
ns3::TopologyReader declaration.