63 myCalibratorParent(calibratorParent), myRouteID(calibratorParent->generateRouteID()), myColor(
RGBColor::BLACK) {
103 std::vector<std::string>
105 std::vector<std::string> edgeIDs;
106 for (std::vector<GNEEdge*>::const_iterator i =
myEdges.begin(); i !=
myEdges.end(); i++) {
107 edgeIDs.push_back((*i)->getID());
113 const std::vector<GNEEdge*>&
127 if (routeID.empty()) {
140 std::vector<GNEEdge*> edges;
142 for (std::vector<std::string>::const_iterator i = edgeIDs.begin(); i != edgeIDs.end(); i++) {
145 if (edgeTmp != NULL) {
146 edges.push_back(edgeTmp);
181 if (GNEAttributeCarrier::canParse<RGBColor>(color)) {
182 return setColor(GNEAttributeCarrier::parse<RGBColor>(color));
191 std::vector<GNEEdge*> edges;
193 for (std::vector<std::string>::const_iterator i = edgeIDs.begin() + 1; i != edgeIDs.end(); i++) {
195 if (retrievedEdge != NULL) {
196 edges.push_back(retrievedEdge);
202 for (std::vector<GNEEdge*>::const_iterator i = edges.begin() + 1; i != edges.end(); i++) {
203 if ((*(i - 1))->getID() == (*i)->getID()) {
208 for (std::vector<GNEEdge*>::const_iterator i = edges.begin() + 1; i != edges.end(); i++) {
210 if (std::find(adyacents.begin(), adyacents.end(), (*i)) == adyacents.end()) {
GNECalibratorRoute(GNECalibrator *calibratorParent)
default constructor
SumoXMLTag
Numbers representing SUMO-XML - element names.
GNEEdge * retrieveEdge(const std::string &id, bool failHard=true)
get edge by id
bool setEdges(const std::vector< std::string > &edgeIDs)
set edges of route using IDs
const std::string & getRouteID() const
get route ID
bool routeExists(const std::string &routeID) const
Check if exist a route with these ID.
std::vector< GNEEdge * > myEdges
edges of route
std::string myRouteID
route in which this flow is used
begin/end of the description of a route
std::vector< std::string > getEdgesIDs() const
get IDs of Edges
bool operator==(const GNECalibratorRoute &calibratorRoute) const
overload operator ==
GNECalibrator * myCalibratorParent
pointer to calibrator parent
GNEViewNet * getViewNet() const
Returns a pointer to GNEViewNet in which additional element is located.
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
const std::vector< GNEEdge * > & getEdges() const
get edges
RGBColor myColor
color of flow
~GNECalibratorRoute()
destructor
begin/end of the description of an edge
bool setRouteID(std::string routeID)
set route ID
A road/street connecting two junctions (netedit-version)
GNECalibrator * getCalibratorParent() const
get pointer to calibrator parent
static bool canParse(const std::string &string)
true if a number of type T can be parsed from string
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
GNENet * getNet() const
get the net object
bool setColor(const RGBColor &color)
set color of route
const RGBColor & getColor() const
get color of route
static T parse(const std::string &string)
parses a number of type T from string
const std::vector< GNEEdge * > & getGNEOutgoingEdges() const
Returns incoming GNEEdges.
GNEJunction * getGNEJunctionDestiny() const
returns the destination-junction