SUMO - Simulation of Urban MObility
Main Page
Related Pages
Modules
Data Structures
Files
File List
Globals
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
ROLane.h
Go to the documentation of this file.
1
/****************************************************************************/
8
// A single lane the router may use
9
/****************************************************************************/
10
// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/
11
// Copyright (C) 2001-2014 DLR (http://www.dlr.de/) and contributors
12
/****************************************************************************/
13
//
14
// This file is part of SUMO.
15
// SUMO is free software: you can redistribute it and/or modify
16
// it under the terms of the GNU General Public License as published by
17
// the Free Software Foundation, either version 3 of the License, or
18
// (at your option) any later version.
19
//
20
/****************************************************************************/
21
#ifndef ROLane_h
22
#define ROLane_h
23
24
25
// ===========================================================================
26
// included modules
27
// ===========================================================================
28
#ifdef _MSC_VER
29
#include <
windows_config.h
>
30
#else
31
#include <
config.h
>
32
#endif
33
34
#include <vector>
35
#include <
utils/common/Named.h
>
36
#include <
utils/common/SUMOVehicleClass.h
>
37
#include "
ROEdge.h
"
38
39
40
// ===========================================================================
41
// class definitions
42
// ===========================================================================
52
class
ROLane
:
public
Named
{
53
public
:
61
ROLane
(
const
std::string&
id
,
ROEdge
* edge,
SUMOReal
length,
SUMOReal
maxSpeed,
SVCPermissions
permissions) :
62
Named
(id),
myEdge
(edge),
myLength
(length),
myMaxSpeed
(maxSpeed),
myPermissions
(permissions)
63
{}
64
65
67
~ROLane
() { }
68
69
73
SUMOReal
getLength
()
const
{
74
return
myLength
;
75
}
76
77
81
SUMOReal
getSpeed
()
const
{
82
return
myMaxSpeed
;
83
}
84
85
89
inline
SVCPermissions
getPermissions
() {
90
return
myPermissions
;
91
}
92
96
ROEdge
&
getEdge
()
const
{
97
return
*
myEdge
;
98
}
99
101
const
std::vector<const ROLane*>&
getOutgoingLanes
()
const
{
102
return
myOutgoingLanes
;
103
}
104
105
void
addOutgoingLane
(
ROLane
* lane) {
106
myOutgoingLanes
.push_back(lane);
107
}
108
110
inline
LinkState
getIncomingLinkState
()
const
{
111
return
LINKSTATE_MAJOR
;
112
}
113
114
inline
bool
allowsVehicleClass
(
SUMOVehicleClass
vclass)
const
{
115
return
(
myPermissions
& vclass) == vclass;
116
}
117
118
private
:
120
ROEdge
*
myEdge
;
121
123
SUMOReal
myLength
;
124
126
SUMOReal
myMaxSpeed
;
127
129
SVCPermissions
myPermissions
;
130
131
std::vector<const ROLane*>
myOutgoingLanes
;
132
133
134
private
:
136
ROLane
(
const
ROLane
& src);
137
139
ROLane
&
operator=
(
const
ROLane
& src);
140
141
};
142
143
144
#endif
145
146
/****************************************************************************/
147
tmp
buildd
sumo-0.21.0+dfsg
src
router
ROLane.h
Generated on Thu Nov 20 2014 19:49:58 for SUMO - Simulation of Urban MObility by
1.8.1.2