Eclipse 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-2019 German Aerospace Center (DLR) and others.
4 // This program and the accompanying materials
5 // are made available under the terms of the Eclipse Public License v2.0
6 // which accompanies this distribution, and is available at
7 // http://www.eclipse.org/legal/epl-v20.html
8 // SPDX-License-Identifier: EPL-2.0
9 /****************************************************************************/
18 // A basic edge for routing applications
19 /****************************************************************************/
20 
21 
22 // ===========================================================================
23 // included modules
24 // ===========================================================================
25 #include <config.h>
26 
27 #include "ROMAEdge.h"
28 
29 
30 // ===========================================================================
31 // method definitions
32 // ===========================================================================
33 ROMAEdge::ROMAEdge(const std::string& id, RONode* from, RONode* to, int index, const int priority)
34  : ROEdge(id, from, to, index, priority) {
35 }
36 
37 
39 }
40 
41 
42 void
43 ROMAEdge::addSuccessor(ROEdge* s, ROEdge* via, std::string dir) {
44  ROEdge::addSuccessor(s, via, dir);
45  if (dir == "l" || dir == "L") {
46  myLeftTurns.insert(static_cast<ROMAEdge*>(s));
47  }
48 }
49 
50 
51 /****************************************************************************/
52 
ROMAEdge::addSuccessor
virtual void addSuccessor(ROEdge *s, ROEdge *via=nullptr, std::string dir="")
Adds information about a connected edge.
Definition: ROMAEdge.cpp:43
ROMAEdge
A basic edge for routing applications.
Definition: ROMAEdge.h:57
ROEdge::addSuccessor
virtual void addSuccessor(ROEdge *s, ROEdge *via=nullptr, std::string dir="")
Adds information about a connected edge.
Definition: ROEdge.cpp:104
ROMAEdge::~ROMAEdge
virtual ~ROMAEdge()
Destructor.
Definition: ROMAEdge.cpp:38
ROEdge
A basic edge for routing applications.
Definition: ROEdge.h:72
config.h
ROMAEdge::ROMAEdge
ROMAEdge(const std::string &id, RONode *from, RONode *to, int index, const int priority)
Constructor.
Definition: ROMAEdge.cpp:33
ROMAEdge::myLeftTurns
std::set< ROMAEdge * > myLeftTurns
Definition: ROMAEdge.h:98
RONode
Base class for nodes used by the router.
Definition: RONode.h:45
ROMAEdge.h