A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Documentation ▼
Installation
Manual
Models
Contributing
Wiki
Development ▼
API Docs
Issue Tracker
Merge Requests
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
23
namespace
ns3
24
{
25
26
/**
27
* \ingroup topology
28
*
29
* \brief Helper class which makes it easier to configure and use a generic TopologyReader.
30
*/
31
class
TopologyReaderHelper
32
{
33
public
:
34
TopologyReaderHelper
();
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
*/
52
Ptr<TopologyReader>
GetTopologyReader
();
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 */
ns3::Ptr
Smart pointer class similar to boost::intrusive_ptr.
Definition
mpi-test-fixtures.h:37
ns3::TopologyReaderHelper
Helper class which makes it easier to configure and use a generic TopologyReader.
Definition
topology-reader-helper.h:32
ns3::TopologyReaderHelper::m_fileName
std::string m_fileName
Name of the input file.
Definition
topology-reader-helper.h:56
ns3::TopologyReaderHelper::SetFileType
void SetFileType(const std::string fileType)
Sets the input file type.
Definition
topology-reader-helper.cc:41
ns3::TopologyReaderHelper::TopologyReaderHelper
TopologyReaderHelper()
Definition
topology-reader-helper.cc:29
ns3::TopologyReaderHelper::m_inputModel
Ptr< TopologyReader > m_inputModel
Smart pointer to the actual topology model.
Definition
topology-reader-helper.h:55
ns3::TopologyReaderHelper::GetTopologyReader
Ptr< TopologyReader > GetTopologyReader()
Gets a Ptr<TopologyReader> to the actual TopologyReader.
Definition
topology-reader-helper.cc:47
ns3::TopologyReaderHelper::SetFileName
void SetFileName(const std::string fileName)
Sets the input file name.
Definition
topology-reader-helper.cc:35
ns3::TopologyReaderHelper::m_fileType
std::string m_fileType
Type of the input file (e.g., "Inet", "Orbis", etc.).
Definition
topology-reader-helper.h:57
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
src
topology-read
helper
topology-reader-helper.h
Generated on Fri Nov 8 2024 13:59:06 for ns-3 by
1.11.0