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 * SPDX-License-Identifier: GPL-2.0-only
5 *
6 * Author: Tommaso Pecorella (tommaso.pecorella@unifi.it)
7 * Author: Valerio Sartini (valesar@gmail.com)
8 */
9
10#ifndef TOPOLOGY_READER_HELPER_H
11#define TOPOLOGY_READER_HELPER_H
12
13#include "ns3/topology-reader.h"
14
15#include <string>
16
17/**
18 * \file
19 * \ingroup topology
20 * ns3::TopologyHelper declaration.
21 */
22
23namespace ns3
24{
25
26/**
27 * \ingroup topology
28 *
29 * \brief Helper class which makes it easier to configure and use a generic TopologyReader.
30 */
32{
33 public:
35
36 /**
37 * \brief Sets the input file name.
38 * \param [in] fileName The input file name.
39 */
40 void SetFileName(const std::string fileName);
41
42 /**
43 * \brief Sets the input file type. Supported file types are "Orbis", "Inet", "Rocketfuel".
44 * \param [in] fileType The input file type.
45 */
46 void SetFileType(const std::string fileType);
47
48 /**
49 * \brief Gets a Ptr<TopologyReader> to the actual TopologyReader.
50 * \return The created Topology Reader (or null if there was an error).
51 */
53
54 private:
55 Ptr<TopologyReader> m_inputModel; //!< Smart pointer to the actual topology model.
56 std::string m_fileName; //!< Name of the input file.
57 std::string m_fileType; //!< Type of the input file (e.g., "Inet", "Orbis", etc.).
58};
59
60} // namespace ns3
61
62#endif /* TOPOLOGY_READER_HELPER_H */
Smart pointer class similar to boost::intrusive_ptr.
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.