SUMO - Simulation of Urban MObility
ROAbstractEdgeBuilder.h
Go to the documentation of this file.
1 /****************************************************************************/
2 // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
3 // Copyright (C) 2004-2017 German Aerospace Center (DLR) and others.
4 /****************************************************************************/
5 //
6 // This program and the accompanying materials
7 // are made available under the terms of the Eclipse Public License v2.0
8 // which accompanies this distribution, and is available at
9 // http://www.eclipse.org/legal/epl-v20.html
10 //
11 /****************************************************************************/
18 // Interface for building instances of router-edges
19 /****************************************************************************/
20 #ifndef ROAbstractEdgeBuilder_h
21 #define ROAbstractEdgeBuilder_h
22 
23 
24 // ===========================================================================
25 // included modules
26 // ===========================================================================
27 #ifdef _MSC_VER
28 #include <windows_config.h>
29 #else
30 #include <config.h>
31 #endif
32 
33 #include <string>
34 
35 
36 // ===========================================================================
37 // class declarations
38 // ===========================================================================
39 class ROEdge;
40 class RONode;
41 
42 
43 // ===========================================================================
44 // class definitions
45 // ===========================================================================
61 public:
64 
65 
67  virtual ~ROAbstractEdgeBuilder() { }
68 
69 
72 
81  virtual ROEdge* buildEdge(const std::string& name, RONode* from, RONode* to, const int priority) = 0;
83 
84 
85 protected:
89  int getNextIndex() {
90  return myCurrentIndex++;
91  }
92 
93 
94 private:
97 
98 
99 private:
102 
105 
106 };
107 
108 
109 #endif
110 
111 /****************************************************************************/
112 
virtual ~ROAbstractEdgeBuilder()
Destructor.
Interface for building instances of router-edges.
ROAbstractEdgeBuilder()
Constructor.
ROAbstractEdgeBuilder & operator=(const ROAbstractEdgeBuilder &src)
Invalidated assignment operator.
int getNextIndex()
Returns the index of the edge to built.
A basic edge for routing applications.
Definition: ROEdge.h:77
int myCurrentIndex
The next edge&#39;s index.
virtual ROEdge * buildEdge(const std::string &name, RONode *from, RONode *to, const int priority)=0
Builds an edge with the given name.
Base class for nodes used by the router.
Definition: RONode.h:52