INET Framework for OMNeT++/OMNEST
inet::Topology::Link Class Reference

Supporting class for Topology, represents a link in the graph. More...

#include <Topology.h>

Inheritance diagram for inet::Topology::Link:
inet::L2NetworkConfigurator::Link inet::NetworkConfiguratorBase::Link inet::Topology::LinkIn inet::Topology::LinkOut

Public Member Functions

 Link (double weight=1)
 Constructor. More...
 
virtual ~Link ()
 
double getWeight () const
 Returns the weight of this link. More...
 
void setWeight (double d)
 Sets the weight of this link. More...
 
bool isEnabled () const
 Returns true of this link is enabled. More...
 
void enable ()
 Enables this link. More...
 
void disable ()
 Disables this link. More...
 

Protected Attributes

NodesrcNode
 
int srcGateId
 
NodedestNode
 
int destGateId
 
double weight
 
bool enabled
 

Friends

class Topology
 

Detailed Description

Supporting class for Topology, represents a link in the graph.

Constructor & Destructor Documentation

inet::Topology::Link::Link ( double  weight = 1)
inline

Constructor.

202 { srcNode = destNode = nullptr; srcGateId = destGateId = -1; this->weight = weight; enabled = true; }
virtual inet::Topology::Link::~Link ( )
inlinevirtual
203 {}

Member Function Documentation

void inet::Topology::Link::disable ( )
inline

Disables this link.

This has significance with the shortest path finder methods of Topology.

233 { enabled = false; }
void inet::Topology::Link::enable ( )
inline

Enables this link.

This has significance with the shortest path finder methods of Topology.

227 { enabled = true; }
double inet::Topology::Link::getWeight ( ) const
inline

Returns the weight of this link.

Weight is used with the weighted shortest path finder methods of Topology.

Referenced by inet::Topology::calculateWeightedSingleShortestPathsTo().

209 { return weight; }
bool inet::Topology::Link::isEnabled ( ) const
inline

Returns true of this link is enabled.

This has significance with the shortest path finder methods of Topology.

Referenced by inet::Topology::calculateWeightedSingleShortestPathsTo().

221 { return enabled; }
void inet::Topology::Link::setWeight ( double  d)
inline

Sets the weight of this link.

Weight is used with the weighted shortest path finder methods of Topology.

Referenced by inet::IPv4NetworkConfigurator::addStaticRoutes().

215 { weight = d; }

Friends And Related Function Documentation

friend class Topology
friend

Member Data Documentation

int inet::Topology::Link::destGateId
protected
Node* inet::Topology::Link::destNode
protected
bool inet::Topology::Link::enabled
protected
int inet::Topology::Link::srcGateId
protected
double inet::Topology::Link::weight
protected

The documentation for this class was generated from the following file: