SUMO - Simulation of Urban MObility
ROAbstractEdgeBuilder.h
Go to the documentation of this file.
1 /****************************************************************************/
8 // Interface for building instances of router-edges
9 /****************************************************************************/
10 // SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/
11 // Copyright (C) 2004-2015 DLR (http://www.dlr.de/) and contributors
12 /****************************************************************************/
13 //
14 // This file is part of SUMO.
15 // SUMO is free software: you can redistribute it and/or modify
16 // it under the terms of the GNU General Public License as published by
17 // the Free Software Foundation, either version 3 of the License, or
18 // (at your option) any later version.
19 //
20 /****************************************************************************/
21 #ifndef ROAbstractEdgeBuilder_h
22 #define ROAbstractEdgeBuilder_h
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 <string>
35 
36 
37 // ===========================================================================
38 // class declarations
39 // ===========================================================================
40 class ROEdge;
41 class RONode;
42 
43 
44 // ===========================================================================
45 // class definitions
46 // ===========================================================================
62 public:
65 
66 
68  virtual ~ROAbstractEdgeBuilder() { }
69 
70 
73 
82  virtual ROEdge* buildEdge(const std::string& name, RONode* from, RONode* to, const int priority) = 0;
84 
85 
86 protected:
90  unsigned int getNextIndex() {
91  return myCurrentIndex++;
92  }
93 
94 
95 private:
97  unsigned int myCurrentIndex;
98 
99 
100 private:
103 
106 
107 };
108 
109 
110 #endif
111 
112 /****************************************************************************/
113 
unsigned int getNextIndex()
Returns the index of the edge to built.
virtual ~ROAbstractEdgeBuilder()
Destructor.
Interface for building instances of router-edges.
ROAbstractEdgeBuilder()
Constructor.
ROAbstractEdgeBuilder & operator=(const ROAbstractEdgeBuilder &src)
Invalidated assignment operator.
A basic edge for routing applications.
Definition: ROEdge.h:73
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:53
unsigned int myCurrentIndex
The next edge's index.