SUMO - Simulation of Urban MObility
GNECalibratorRoute.h
Go to the documentation of this file.
1 /****************************************************************************/
7 // Route used by GNECalibrators
8 /****************************************************************************/
9 // SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/
10 // Copyright (C) 2001-2017 DLR (http://www.dlr.de/) and contributors
11 /****************************************************************************/
12 //
13 // This file is part of SUMO.
14 // SUMO is free software: you can redistribute it and/or modify
15 // it under the terms of the GNU General Public License as published by
16 // the Free Software Foundation, either version 3 of the License, or
17 // (at your option) any later version.
18 //
19 /****************************************************************************/
20 #ifndef GNECalibratorRoute_h
21 #define GNECalibratorRoute_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 
35 #include <utils/common/RGBColor.h>
36 
37 // ===========================================================================
38 // class declaration
39 // ===========================================================================
40 
41 class GNECalibrator;
42 class GNEEdge;
43 
44 // ===========================================================================
45 // class definitions
46 // ===========================================================================
52 public:
53 
55  GNECalibratorRoute(GNECalibrator* calibratorParent);
56 
58  GNECalibratorRoute(GNECalibrator* calibratorParent, std::string routeID, std::vector<std::string> edges, const RGBColor& color);
59 
61  GNECalibratorRoute(GNECalibrator* calibratorParent, std::string routeID, std::vector<GNEEdge*> edges, const RGBColor& color);
62 
65 
68 
70  SumoXMLTag getTag() const;
71 
73  const std::string& getRouteID() const;
74 
76  std::vector<std::string> getEdgesIDs() const;
77 
79  const std::vector<GNEEdge*>& getEdges() const;
80 
82  const RGBColor& getColor() const;
83 
87  bool setRouteID(std::string routeID);
88 
92  bool setEdges(const std::vector<std::string>& edgeIDs);
93 
97  bool setEdges(const std::vector<GNEEdge*>& edges);
98 
102  bool setEdges(const std::string& edgeIDs);
103 
107  bool setColor(const RGBColor& color);
108 
112  bool setColor(std::string color = "black");
113 
117  std::string checkEdgeRoute(const std::vector<std::string>& edge) const;
118 
120  bool operator==(const GNECalibratorRoute& calibratorRoute) const;
121 
122 private:
125 
127  std::string myRouteID;
128 
130  std::vector<GNEEdge*> myEdges;
131 
134 };
135 
136 #endif
137 /****************************************************************************/
GNECalibratorRoute(GNECalibrator *calibratorParent)
default constructor
SumoXMLTag
Numbers representing SUMO-XML - element names.
bool setEdges(const std::vector< std::string > &edgeIDs)
set edges of route using IDs
const std::string & getRouteID() const
get route ID
std::vector< GNEEdge * > myEdges
edges of route
std::string myRouteID
route in which this flow is used
std::vector< std::string > getEdgesIDs() const
get IDs of Edges
bool operator==(const GNECalibratorRoute &calibratorRoute) const
overload operator ==
GNECalibrator * myCalibratorParent
pointer to calibrator parent
const std::vector< GNEEdge * > & getEdges() const
get edges
RGBColor myColor
color of flow
~GNECalibratorRoute()
destructor
bool setRouteID(std::string routeID)
set route ID
A road/street connecting two junctions (netedit-version)
Definition: GNEEdge.h:58
GNECalibrator * getCalibratorParent() const
get pointer to calibrator parent
std::string checkEdgeRoute(const std::vector< std::string > &edge) const
check if a list of edges is valid to set a route
SumoXMLTag getTag() const
get tag
bool setColor(const RGBColor &color)
set color of route
const RGBColor & getColor() const
get color of route