![]() |
Virtual Belgium
2.0
A micro-simulation platform for the Belgian population
|
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... | |
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).
|
inline |
Default constructor.
| Link::Link | ( | long | id, |
| long | start_node, | ||
| long | end_node, | ||
| float | length | ||
| ) |
Constructor.
| id | link's id |
| start_node | link's source node |
| end_node | link's sink node |
| length | links length |
|
inlinevirtual |
Destructor.
|
inline |
Return the sink node's id.
|
inline |
Return the link's id.
|
inline |
Get the length (in meters) of the link.
|
inline |
Return the source node's id.
/return a node id
|
inline |
Set the sink node's id.
| endNodeId | a node id |
|
inline |
Set the link's id.
| id | the link id |
|
inline |
Set the length of the link.
| length | a link length |
|
inline |
Set the source node's id.
| startNodeId | a node id |
|
private |
sink node's id.
|
private |
id of the link.
|
private |
length of the link (unit: meters).
|
private |
source node's id.