Eclipse SUMO - Simulation of Urban MObility
RODFEdgeBuilder.cpp
Go to the documentation of this file.
1 /****************************************************************************/
2 // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
3 // Copyright (C) 2006-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 /****************************************************************************/
17 // Interface for building instances of dfrouter-edges
18 /****************************************************************************/
19 
20 // ===========================================================================
21 // included modules
22 // ===========================================================================
23 #include <config.h>
24 
25 #include "RODFEdgeBuilder.h"
26 #include "RODFEdge.h"
27 
28 
29 // ===========================================================================
30 // method definitions
31 // ===========================================================================
33 
34 
36 
37 
38 ROEdge*
39 RODFEdgeBuilder::buildEdge(const std::string& name, RONode* from, RONode* to, const int priority) {
40  return new RODFEdge(name, from, to, getNextIndex(), priority);
41 }
42 
43 
44 /****************************************************************************/
45 
RODFEdge
Definition: RODFEdge.h:47
RODFEdge.h
ROAbstractEdgeBuilder::getNextIndex
int getNextIndex()
Returns the index of the edge to built.
Definition: ROAbstractEdgeBuilder.h:82
RODFEdgeBuilder::buildEdge
ROEdge * buildEdge(const std::string &name, RONode *from, RONode *to, const int priority)
Builds an edge with the given name.
Definition: RODFEdgeBuilder.cpp:39
RODFEdgeBuilder::~RODFEdgeBuilder
~RODFEdgeBuilder()
Destructor.
Definition: RODFEdgeBuilder.cpp:35
RODFEdgeBuilder.h
ROEdge
A basic edge for routing applications.
Definition: ROEdge.h:72
config.h
RONode
Base class for nodes used by the router.
Definition: RONode.h:45
RODFEdgeBuilder::RODFEdgeBuilder
RODFEdgeBuilder()
Constructor.
Definition: RODFEdgeBuilder.cpp:32