SUMO - Simulation of Urban MObility
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
ROMAEdge.cpp
Go to the documentation of this file.
1 /****************************************************************************/
11 // A basic edge for routing applications
12 /****************************************************************************/
13 // SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/
14 // Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors
15 /****************************************************************************/
16 //
17 // This file is part of SUMO.
18 // SUMO is free software: you can redistribute it and/or modify
19 // it under the terms of the GNU General Public License as published by
20 // the Free Software Foundation, either version 3 of the License, or
21 // (at your option) any later version.
22 //
23 /****************************************************************************/
24 
25 
26 // ===========================================================================
27 // included modules
28 // ===========================================================================
29 #ifdef _MSC_VER
30 #include <windows_config.h>
31 #else
32 #include <config.h>
33 #endif
34 
35 #include "ROMAEdge.h"
36 
37 #ifdef CHECK_MEMORY_LEAKS
38 #include <foreign/nvwa/debug_new.h>
39 #endif // CHECK_MEMORY_LEAKS
40 
41 
42 // ===========================================================================
43 // method definitions
44 // ===========================================================================
45 ROMAEdge::ROMAEdge(const std::string& id, RONode* from, RONode* to, unsigned int index, const int priority)
46  : ROEdge(id, from, to, index, priority), myHelpFlow(0.) {
47 }
48 
49 
51 }
52 
53 
54 void
55 ROMAEdge::addSuccessor(ROEdge* s, std::string dir) {
56  ROEdge::addSuccessor(s, dir);
57  if (dir == "l" || dir == "L") {
58  myLeftTurns.insert(static_cast<ROMAEdge*>(s));
59  }
60 }
61 
62 
63 /****************************************************************************/
64 
std::set< ROMAEdge * > myLeftTurns
Definition: ROMAEdge.h:98
virtual void addSuccessor(ROEdge *s, std::string dir="")
Adds information about a connected edge.
Definition: ROMAEdge.cpp:55
ROMAEdge(const std::string &id, RONode *from, RONode *to, unsigned int index, const int priority)
Constructor.
Definition: ROMAEdge.cpp:45
A basic edge for routing applications.
Definition: ROEdge.h:73
virtual void addSuccessor(ROEdge *s, std::string dir="")
Adds information about a connected edge.
Definition: ROEdge.cpp:103
virtual ~ROMAEdge()
Destructor.
Definition: ROMAEdge.cpp:50
Base class for nodes used by the router.
Definition: RONode.h:53