SUMO - Simulation of Urban MObility
GNECalibratorRoute.h
Go to the documentation of this file.
1 /****************************************************************************/
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 
36 // ===========================================================================
37 // class declaration
38 // ===========================================================================
39 
40 class GNECalibrator;
41 class GNEEdge;
42 
43 // ===========================================================================
44 // class definitions
45 // ===========================================================================
51 public:
52 
54  GNECalibratorRoute(GNECalibrator* calibratorParent);
55 
57  GNECalibratorRoute(GNECalibrator* calibratorParent, std::string routeID, std::vector<std::string> edges, std::string color);
58 
60  GNECalibratorRoute(GNECalibrator* calibratorParent, std::string routeID, std::vector<GNEEdge*> edges, std::string color);
61 
64 
67 
69  SumoXMLTag getTag() const;
70 
72  const std::string& getRouteID() const;
73 
75  std::vector<std::string> getEdgesIDs() const;
76 
78  const std::vector<GNEEdge*>& getEdges() const;
79 
81  const std::string& getColor() const;
82 
86  bool setRouteID(std::string routeID);
87 
91  bool setEdges(const std::vector<std::string>& edgeIDs);
92 
96  bool setEdges(const std::vector<GNEEdge*>& edges);
97 
101  bool setEdges(const std::string& edgeIDs);
102 
106  bool setColor(std::string color = "");
107 
111  std::string checkEdgeRoute(const std::vector<std::string>& edge) const;
112 
114  bool operator==(const GNECalibratorRoute& calibratorRoute) const;
115 
116 private:
119 
121  std::string myRouteID;
122 
124  std::vector<GNEEdge*> myEdges;
125 
127  std::string myColor;
128 };
129 
130 #endif
131 /****************************************************************************/
const std::string & getColor() const
get color of route
GNECalibratorRoute(GNECalibrator *calibratorParent)
default constructor
SumoXMLTag
Numbers representing SUMO-XML - element names.
std::string checkEdgeRoute(const std::vector< std::string > &edge) const
check if a list of edges is valid to set a route
bool setEdges(const std::vector< std::string > &edgeIDs)
set edges of route using IDs
SumoXMLTag getTag() const
get tag
const std::vector< GNEEdge * > & getEdges() const
get edges
std::vector< GNEEdge * > myEdges
edges of route
std::string myRouteID
route in which this flow is used
const std::string & getRouteID() const
get route ID
GNECalibrator * myCalibratorParent
pointer to calibrator parent
std::vector< std::string > getEdgesIDs() const
get IDs of Edges
std::string 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:57
bool operator==(const GNECalibratorRoute &calibratorRoute) const
overload operator ==
bool setColor(std::string color="")
set color of route
GNECalibrator * getCalibratorParent() const
get pointer to calibrator parent