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 /****************************************************************************/
19 // A basic edge for routing applications
20 /****************************************************************************/
21 
22 
23 // ===========================================================================
24 // included modules
25 // ===========================================================================
26 #include <config.h>
27 
28 #include "ROMAEdge.h"
29 
30 
31 // ===========================================================================
32 // method definitions
33 // ===========================================================================
34 ROMAEdge::ROMAEdge(const std::string& id, RONode* from, RONode* to, int index, const int priority)
35  : ROEdge(id, from, to, index, priority) {
36 }
37 
38 
40 }
41 
42 
43 void
44 ROMAEdge::addSuccessor(ROEdge* s, ROEdge* via, std::string dir) {
45  ROEdge::addSuccessor(s, via, dir);
46  if (dir == "l" || dir == "L") {
47  myLeftTurns.insert(static_cast<ROMAEdge*>(s));
48  }
49 }
50 
51 
52 /****************************************************************************/
53 
ROMAEdge::addSuccessor
virtual void addSuccessor(ROEdge *s, ROEdge *via=nullptr, std::string dir="")
Adds information about a connected edge.
Definition: ROMAEdge.cpp:44
ROEdge::addSuccessor
virtual void addSuccessor(ROEdge *s, ROEdge *via=nullptr, std::string dir="")
Adds information about a connected edge.
Definition: ROEdge.cpp:105
ROMAEdge::~ROMAEdge
virtual ~ROMAEdge()
Destructor.
Definition: ROMAEdge.cpp:39
ROEdge
A basic edge for routing applications.
Definition: ROEdge.h:73
config.h
ROMAEdge::ROMAEdge
ROMAEdge(const std::string &id, RONode *from, RONode *to, int index, const int priority)
Constructor.
Definition: ROMAEdge.cpp:34
ROMAEdge::myLeftTurns
std::set< ROMAEdge * > myLeftTurns
Definition: ROMAEdge.h:99
RONode
Base class for nodes used by the router.
Definition: RONode.h:46
ROMAEdge.h