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
/****************************************************************************/
16
// Interface for building instances of router-edges
17
/****************************************************************************/
18
#ifndef ROAbstractEdgeBuilder_h
19
#define ROAbstractEdgeBuilder_h
20
21
22
// ===========================================================================
23
// included modules
24
// ===========================================================================
25
#include <
config.h
>
26
27
#include <string>
28
29
30
// ===========================================================================
31
// class declarations
32
// ===========================================================================
33
class
ROEdge
;
34
class
RONode
;
35
36
37
// ===========================================================================
38
// class definitions
39
// ===========================================================================
54
class
ROAbstractEdgeBuilder
{
55
public
:
57
ROAbstractEdgeBuilder
() :
myCurrentIndex
(0) { }
58
59
61
virtual
~ROAbstractEdgeBuilder
() { }
62
63
66
75
virtual
ROEdge
*
buildEdge
(
const
std::string& name,
RONode
* from,
RONode
* to,
const
int
priority) = 0;
77
78
79
protected
:
83
int
getNextIndex
() {
84
return
myCurrentIndex
++;
85
}
86
87
88
private
:
90
int
myCurrentIndex
;
91
92
93
private
:
95
ROAbstractEdgeBuilder
(
const
ROAbstractEdgeBuilder
& src);
96
98
ROAbstractEdgeBuilder
&
operator=
(
const
ROAbstractEdgeBuilder
& src);
99
100
};
101
102
103
#endif
104
105
/****************************************************************************/
106
ROAbstractEdgeBuilder::ROAbstractEdgeBuilder
ROAbstractEdgeBuilder()
Constructor.
Definition:
ROAbstractEdgeBuilder.h:57
ROAbstractEdgeBuilder::getNextIndex
int getNextIndex()
Returns the index of the edge to built.
Definition:
ROAbstractEdgeBuilder.h:83
ROAbstractEdgeBuilder::~ROAbstractEdgeBuilder
virtual ~ROAbstractEdgeBuilder()
Destructor.
Definition:
ROAbstractEdgeBuilder.h:61
ROEdge
A basic edge for routing applications.
Definition:
ROEdge.h:73
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:46
ROAbstractEdgeBuilder::myCurrentIndex
int myCurrentIndex
The next edge's index.
Definition:
ROAbstractEdgeBuilder.h:90
ROAbstractEdgeBuilder
Interface for building instances of router-edges.
Definition:
ROAbstractEdgeBuilder.h:54
ROAbstractEdgeBuilder::operator=
ROAbstractEdgeBuilder & operator=(const ROAbstractEdgeBuilder &src)
Invalidated assignment operator.
src
router
ROAbstractEdgeBuilder.h
Generated on Wed Jan 15 2020 15:04:13 for Eclipse SUMO - Simulation of Urban MObility by
1.8.16