SUMO - Simulation of Urban MObility
ROMAEdge.cpp
Go to the documentation of this file.
1 /****************************************************************************/
2 // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
3 // Copyright (C) 2001-2017 German Aerospace Center (DLR) and others.
4 /****************************************************************************/
5 //
6 // This program and the accompanying materials
7 // are made available under the terms of the Eclipse Public License v2.0
8 // which accompanies this distribution, and is available at
9 // http://www.eclipse.org/legal/epl-v20.html
10 //
11 /****************************************************************************/
21 // A basic edge for routing applications
22 /****************************************************************************/
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 "ROMAEdge.h"
35 
36 
37 // ===========================================================================
38 // method definitions
39 // ===========================================================================
40 ROMAEdge::ROMAEdge(const std::string& id, RONode* from, RONode* to, int index, const int priority)
41  : ROEdge(id, from, to, index, priority) {
42 }
43 
44 
46 }
47 
48 
49 void
50 ROMAEdge::addSuccessor(ROEdge* s, std::string dir) {
51  ROEdge::addSuccessor(s, dir);
52  if (dir == "l" || dir == "L") {
53  myLeftTurns.insert(static_cast<ROMAEdge*>(s));
54  }
55 }
56 
57 
58 /****************************************************************************/
59 
std::set< ROMAEdge * > myLeftTurns
Definition: ROMAEdge.h:105
ROMAEdge(const std::string &id, RONode *from, RONode *to, int index, const int priority)
Constructor.
Definition: ROMAEdge.cpp:40
virtual void addSuccessor(ROEdge *s, std::string dir="")
Adds information about a connected edge.
Definition: ROMAEdge.cpp:50
A basic edge for routing applications.
Definition: ROEdge.h:77
virtual void addSuccessor(ROEdge *s, std::string dir="")
Adds information about a connected edge.
Definition: ROEdge.cpp:106
virtual ~ROMAEdge()
Destructor.
Definition: ROMAEdge.cpp:45
Base class for nodes used by the router.
Definition: RONode.h:52