A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
orbis-topology-reader.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 ORBIS_TOPOLOGY_READER_H
11#define ORBIS_TOPOLOGY_READER_H
12
13#include "topology-reader.h"
14
15/**
16 * \file
17 * \ingroup topology
18 * ns3::OrbisTopologyReader declaration.
19 */
20
21namespace ns3
22{
23
24// ------------------------------------------------------------
25// --------------------------------------------
26/**
27 * \ingroup topology
28 *
29 * \brief Topology file reader (Orbis-format type).
30 *
31 * This class takes an input file in Orbis format and extracts all
32 * the information needed to build the topology
33 * (i.e.number of nodes, links and links structure).
34 * It have been tested with Orbis 0.70
35 * https://web.archive.org/web/20181102004219/http://sysnet.ucsd.edu/~pmahadevan/topo_research/topo.html
36 */
38{
39 public:
40 /**
41 * \brief Get the type ID.
42 * \return the object TypeId.
43 */
44 static TypeId GetTypeId();
45
47 ~OrbisTopologyReader() override;
48
49 // Delete copy constructor and assignment operator to avoid misuse
52
53 /**
54 * \brief Main topology reading function.
55 *
56 * This method opens an input stream and reads the Orbis-format file.
57 * Every row represents a topology link (the ids of a couple of nodes),
58 * so the input file is read line by line to figure out how many links
59 * and nodes are in the topology.
60 *
61 * \return The container of the nodes created (or empty container if there was an error)
62 */
63 NodeContainer Read() override;
64
65 // end class OrbisTopologyReader
66};
67
68// end namespace ns3
69}; // namespace ns3
70
71#endif /* ORBIS_TOPOLOGY_READER_H */
keep track of a set of node pointers.
Topology file reader (Orbis-format type).
OrbisTopologyReader & operator=(const OrbisTopologyReader &)=delete
OrbisTopologyReader(const OrbisTopologyReader &)=delete
static TypeId GetTypeId()
Get the type ID.
NodeContainer Read() override
Main topology reading function.
Interface for input file readers management.
a unique identifier for an interface.
Definition type-id.h:48
Every class exported by the ns3 library is enclosed in the ns3 namespace.
ns3::TopologyReader declaration.