SUMO - Simulation of Urban MObility
RODUAEdgeBuilder.cpp
Go to the documentation of this file.
1 /****************************************************************************/
10 // Interface for building instances of duarouter-edges
11 /****************************************************************************/
12 // SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/
13 // Copyright (C) 2004-2017 DLR (http://www.dlr.de/) and contributors
14 /****************************************************************************/
15 //
16 // This file is part of SUMO.
17 // SUMO is free software: you can redistribute it and/or modify
18 // it under the terms of the GNU General Public License as published by
19 // the Free Software Foundation, either version 3 of the License, or
20 // (at your option) any later version.
21 //
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 "RODUAEdgeBuilder.h"
35 #include <router/ROEdge.h>
36 
37 
38 // ===========================================================================
39 // method definitions
40 // ===========================================================================
42 }
43 
44 
46 
47 
48 ROEdge*
49 RODUAEdgeBuilder::buildEdge(const std::string& name, RONode* from, RONode* to, const int priority) {
50  return new ROEdge(name, from, to, getNextIndex(), priority);
51 }
52 
53 
54 /****************************************************************************/
55 
~RODUAEdgeBuilder()
Destructor.
ROEdge * buildEdge(const std::string &name, RONode *from, RONode *to, const int priority)
Builds an edge with the given name.
int getNextIndex()
Returns the index of the edge to built.
A basic edge for routing applications.
Definition: ROEdge.h:77
Base class for nodes used by the router.
Definition: RONode.h:53
RODUAEdgeBuilder()
Constructor.