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-2015 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 #ifdef CHECK_MEMORY_LEAKS
38 #include <foreign/nvwa/debug_new.h>
39 #endif // CHECK_MEMORY_LEAKS
40 
41 
42 // ===========================================================================
43 // method definitions
44 // ===========================================================================
46 }
47 
48 
50 
51 
52 ROEdge*
53 RODUAEdgeBuilder::buildEdge(const std::string& name, RONode* from, RONode* to, const int priority) {
54  return new ROEdge(name, from, to, getNextIndex(), priority);
55 }
56 
57 
58 /****************************************************************************/
59 
~RODUAEdgeBuilder()
Destructor.
unsigned int getNextIndex()
Returns the index of the edge to built.
ROEdge * buildEdge(const std::string &name, RONode *from, RONode *to, const int priority)
Builds an edge with the given name.
A basic edge for routing applications.
Definition: ROEdge.h:73
Base class for nodes used by the router.
Definition: RONode.h:53
RODUAEdgeBuilder()
Constructor.