Eclipse 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-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 /****************************************************************************/
15 // Interface for building instances of router-edges
16 /****************************************************************************/
17 #ifndef ROAbstractEdgeBuilder_h
18 #define ROAbstractEdgeBuilder_h
19 
20 
21 // ===========================================================================
22 // included modules
23 // ===========================================================================
24 #include <config.h>
25 
26 #include <string>
27 
28 
29 // ===========================================================================
30 // class declarations
31 // ===========================================================================
32 class ROEdge;
33 class RONode;
34 
35 
36 // ===========================================================================
37 // class definitions
38 // ===========================================================================
54 public:
57 
58 
60  virtual ~ROAbstractEdgeBuilder() { }
61 
62 
65 
74  virtual ROEdge* buildEdge(const std::string& name, RONode* from, RONode* to, const int priority) = 0;
76 
77 
78 protected:
82  int getNextIndex() {
83  return myCurrentIndex++;
84  }
85 
86 
87 private:
90 
91 
92 private:
95 
98 
99 };
100 
101 
102 #endif
103 
104 /****************************************************************************/
105 
ROAbstractEdgeBuilder::ROAbstractEdgeBuilder
ROAbstractEdgeBuilder()
Constructor.
Definition: ROAbstractEdgeBuilder.h:56
ROAbstractEdgeBuilder::ROAbstractEdgeBuilder
ROAbstractEdgeBuilder(const ROAbstractEdgeBuilder &src)
Invalidated copy constructor.
ROAbstractEdgeBuilder::getNextIndex
int getNextIndex()
Returns the index of the edge to built.
Definition: ROAbstractEdgeBuilder.h:82
ROAbstractEdgeBuilder::~ROAbstractEdgeBuilder
virtual ~ROAbstractEdgeBuilder()
Destructor.
Definition: ROAbstractEdgeBuilder.h:60
ROEdge
A basic edge for routing applications.
Definition: ROEdge.h:72
config.h
ROAbstractEdgeBuilder::buildEdge
virtual ROEdge * buildEdge(const std::string &name, RONode *from, RONode *to, const int priority)=0
Builds an edge with the given name.
RONode
Base class for nodes used by the router.
Definition: RONode.h:45
ROAbstractEdgeBuilder::myCurrentIndex
int myCurrentIndex
The next edge's index.
Definition: ROAbstractEdgeBuilder.h:89
ROAbstractEdgeBuilder
Interface for building instances of router-edges.
Definition: ROAbstractEdgeBuilder.h:53
ROAbstractEdgeBuilder::operator=
ROAbstractEdgeBuilder & operator=(const ROAbstractEdgeBuilder &src)
Invalidated assignment operator.