A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
topology-reader-helper.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2010 Universita' di Firenze, Italy
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 * Author: Tommaso Pecorella (tommaso.pecorella@unifi.it)
18 * Author: Valerio Sartini (valesar@gmail.com)
19 */
20
21#ifndef TOPOLOGY_READER_HELPER_H
22#define TOPOLOGY_READER_HELPER_H
23
24#include "ns3/topology-reader.h"
25
26#include <string>
27
28/**
29 * \file
30 * \ingroup topology
31 * ns3::TopologyHelper declaration.
32 */
33
34namespace ns3
35{
36
37/**
38 * \ingroup topology
39 *
40 * \brief Helper class which makes it easier to configure and use a generic TopologyReader.
41 */
43{
44 public:
46
47 /**
48 * \brief Sets the input file name.
49 * \param [in] fileName The input file name.
50 */
51 void SetFileName(const std::string fileName);
52
53 /**
54 * \brief Sets the input file type. Supported file types are "Orbis", "Inet", "Rocketfuel".
55 * \param [in] fileType The input file type.
56 */
57 void SetFileType(const std::string fileType);
58
59 /**
60 * \brief Gets a Ptr<TopologyReader> to the actual TopologyReader.
61 * \return The created Topology Reader (or null if there was an error).
62 */
64
65 private:
66 Ptr<TopologyReader> m_inputModel; //!< Smart pointer to the actual topology model.
67 std::string m_fileName; //!< Name of the input file.
68 std::string m_fileType; //!< Type of the input file (e.g., "Inet", "Orbis", etc.).
69};
70
71} // namespace ns3
72
73#endif /* TOPOLOGY_READER_HELPER_H */
Smart pointer class similar to boost::intrusive_ptr.
Definition: ptr.h:77
Helper class which makes it easier to configure and use a generic TopologyReader.
std::string m_fileName
Name of the input file.
void SetFileType(const std::string fileType)
Sets the input file type.
Ptr< TopologyReader > m_inputModel
Smart pointer to the actual topology model.
Ptr< TopologyReader > GetTopologyReader()
Gets a Ptr<TopologyReader> to the actual TopologyReader.
void SetFileName(const std::string fileName)
Sets the input file name.
std::string m_fileType
Type of the input file (e.g., "Inet", "Orbis", etc.).
Every class exported by the ns3 library is enclosed in the ns3 namespace.