Virtual Belgium  2.0
A micro-simulation platform for the Belgian population
 All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Pages
Link Class Reference

A link class. More...

#include <Network.hpp>

Public Member Functions

 Link ()
 Default constructor. More...
 
 Link (long id, long start_node, long end_node, float length)
 Constructor. More...
 
virtual ~Link ()
 Destructor. More...
 
long getEndNodeId () const
 Return the sink node's id. More...
 
void setEndNodeId (long endNodeId)
 Set the sink node's id. More...
 
long getId () const
 Return the link's id. More...
 
void setId (long id)
 Set the link's id. More...
 
float getLength () const
 Get the length (in meters) of the link. More...
 
void setLength (float length)
 Set the length of the link. More...
 
long getStartNodeId () const
 Return the source node's id. More...
 
void setStartNodeId (long startNodeId)
 Set the source node's id. More...
 

Private Attributes

long _id
 id of the link. More...
 
long _start_node_id
 source node's id. More...
 
long _end_node_id
 sink node's id. More...
 
float _length
 length of the link (unit: meters). More...
 

Detailed Description

A link class.

This class intends to represents the links of a road network. A link is represented by an id, a source node, a sink node and a length (in meters).

Constructor & Destructor Documentation

Link::Link ( )
inline

Default constructor.

Link::Link ( long  id,
long  start_node,
long  end_node,
float  length 
)

Constructor.

Parameters
idlink's id
start_nodelink's source node
end_nodelink's sink node
lengthlinks length
virtual Link::~Link ( )
inlinevirtual

Destructor.

Member Function Documentation

long Link::getEndNodeId ( ) const
inline

Return the sink node's id.

Returns
a node id
long Link::getId ( ) const
inline

Return the link's id.

Returns
link's id
float Link::getLength ( ) const
inline

Get the length (in meters) of the link.

Returns
link's length
long Link::getStartNodeId ( ) const
inline

Return the source node's id.

/return a node id

void Link::setEndNodeId ( long  endNodeId)
inline

Set the sink node's id.

Parameters
endNodeIda node id
void Link::setId ( long  id)
inline

Set the link's id.

Parameters
idthe link id
void Link::setLength ( float  length)
inline

Set the length of the link.

Parameters
lengtha link length
void Link::setStartNodeId ( long  startNodeId)
inline

Set the source node's id.

Parameters
startNodeIda node id

Member Data Documentation

long Link::_end_node_id
private

sink node's id.

long Link::_id
private

id of the link.

float Link::_length
private

length of the link (unit: meters).

long Link::_start_node_id
private

source node's id.


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