4 #include "property-container.h"
5 #include "ns3/fnss-node.h"
49 void addNode(
const std::string &
id,
const Node &node);
80 bool hasNode(
const std::string &
id)
const;
100 void addEdge(
const std::string &id1,
const std::string &id2,
const Edge &edge);
112 void addEdge(
const std::pair<std::string, std::string> &nodes,
const Edge &edge);
150 Edge removeEdge(
const std::pair <std::string, std::string> &nodes);
176 Edge getEdge(
const std::string &id1,
const std::string &id2)
const;
188 Edge getEdge(
const std::pair <std::string, std::string> &nodes)
const;
213 bool hasEdge(
const std::string &id1,
const std::string &id2)
const;
224 bool hasEdge(
const std::pair <std::string, std::string> &nodes)
const;
244 std::set<std::pair <std::string, std::string> >
getAllEdges()
const;
263 this->exceptionStr =
"The edge between nodes with IDs " + nodes.first +
" and "
264 + nodes.second +
" was not found.";
270 const char* what()
const throw() {
271 return this->exceptionStr.c_str();
275 std::string exceptionStr;
281 this->exceptionStr =
"The node with ID " +
id +
" was not found.";
287 const char* what()
const throw() {
288 return this->exceptionStr.c_str();
292 std::string exceptionStr;
297 typedef std::map <std::string, Node> nodesType;
301 typedef std::map <Pair <std::string, std::string>,
Edge> edgesType;
bool hasEdge(const std::string &id1, const std::string &id2) const
Definition: topology.cpp:141
unsigned int edgeCount() const
Definition: topology.cpp:159
void addEdge(const std::string &id1, const std::string &id2, const Edge &edge)
Definition: topology.cpp:71
unsigned int nodeCount() const
Definition: topology.cpp:155
Definition: topology.h:278
Definition: topology.h:260
bool hasNode(const std::string &id) const
Definition: topology.cpp:53
Topology(bool directed=false)
Definition: topology.cpp:8
Definition: topology.h:22
std::set< std::pair< std::string, std::string > > getAllEdges() const
Definition: topology.cpp:145
std::set< std::string > getAllNodes() const
Definition: topology.cpp:61
void addNode(const std::string &id, const Node &node)
Definition: topology.cpp:16
bool isDirected() const
Definition: topology.cpp:12
Node removeNode(const std::string &id, bool pruneEdges=true)
Definition: topology.cpp:20
Definition: fnss-node.h:23
Node getNode(const std::string &id) const
Definition: topology.cpp:45
Edge removeEdge(const std::string &id1, const std::string &id2)
Definition: topology.cpp:107
Edge getEdge(const std::string &id1, const std::string &id2) const
Definition: topology.cpp:124
Definition: property-container.h:15