SUMO - Simulation of Urban MObility
GNECalibratorRoute Class Reference

#include <GNECalibratorRoute.h>

Collaboration diagram for GNECalibratorRoute:
Collaboration graph

Public Member Functions

std::string checkEdgeRoute (const std::vector< std::string > &edge) const
 check if a list of edges is valid to set a route More...
 
GNECalibrator * getCalibratorParent () const
 get pointer to calibrator parent More...
 
const RGBColor & getColor () const
 get color of route More...
 
const std::vector< GNEEdge * > & getEdges () const
 get edges More...
 
std::vector< std::string > getEdgesIDs () const
 get IDs of Edges More...
 
const std::string & getRouteID () const
 get route ID More...
 
SumoXMLTag getTag () const
 get tag More...
 
 GNECalibratorRoute (GNECalibrator *calibratorParent)
 default constructor More...
 
 GNECalibratorRoute (GNECalibrator *calibratorParent, std::string routeID, std::vector< std::string > edges, const RGBColor &color)
 parameter constructor 1 (Using edges IDs) More...
 
 GNECalibratorRoute (GNECalibrator *calibratorParent, std::string routeID, std::vector< GNEEdge * > edges, const RGBColor &color)
 parameter constructor 2 (Using GNEEdges) More...
 
bool operator== (const GNECalibratorRoute &calibratorRoute) const
 overload operator == More...
 
bool setColor (const RGBColor &color)
 set color of route More...
 
bool setColor (std::string color="black")
 set color of route (String Version More...
 
bool setEdges (const std::vector< std::string > &edgeIDs)
 set edges of route using IDs More...
 
bool setEdges (const std::vector< GNEEdge * > &edges)
 set edges of route using pointers More...
 
bool setEdges (const std::string &edgeIDs)
 set edges of route using a single string More...
 
bool setRouteID (std::string routeID)
 set route ID More...
 
 ~GNECalibratorRoute ()
 destructor More...
 

Private Attributes

GNECalibrator * myCalibratorParent
 pointer to calibrator parent More...
 
RGBColor myColor
 color of flow More...
 
std::vector< GNEEdge * > myEdges
 edges of route More...
 
std::string myRouteID
 route in which this flow is used More...
 

Detailed Description

vehicle route used by GNECalibrators

Definition at line 51 of file GNECalibratorRoute.h.

Constructor & Destructor Documentation

GNECalibratorRoute::GNECalibratorRoute ( GNECalibrator *  calibratorParent)

default constructor

Definition at line 62 of file GNECalibratorRoute.cpp.

GNECalibratorRoute::GNECalibratorRoute ( GNECalibrator *  calibratorParent,
std::string  routeID,
std::vector< std::string >  edges,
const RGBColor &  color 
)

parameter constructor 1 (Using edges IDs)

Definition at line 67 of file GNECalibratorRoute.cpp.

References setEdges(), and setRouteID().

GNECalibratorRoute::GNECalibratorRoute ( GNECalibrator *  calibratorParent,
std::string  routeID,
std::vector< GNEEdge * >  edges,
const RGBColor &  color 
)

parameter constructor 2 (Using GNEEdges)

Definition at line 75 of file GNECalibratorRoute.cpp.

References setEdges(), and setRouteID().

GNECalibratorRoute::~GNECalibratorRoute ( )

destructor

Definition at line 82 of file GNECalibratorRoute.cpp.

Member Function Documentation

std::string GNECalibratorRoute::checkEdgeRoute ( const std::vector< std::string > &  edge) const

check if a list of edges is valid to set a route

Returns
"" if is correct, a error string in other case

Definition at line 190 of file GNECalibratorRoute.cpp.

References GNEEdge::getGNEJunctionDestiny(), GNEJunction::getGNEOutgoingEdges(), GNEViewNet::getNet(), GNEAdditional::getViewNet(), myCalibratorParent, GNENet::retrieveEdge(), SUMO_TAG_EDGE, and toString().

GNECalibrator * GNECalibratorRoute::getCalibratorParent ( ) const

get pointer to calibrator parent

Definition at line 86 of file GNECalibratorRoute.cpp.

References myCalibratorParent.

Referenced by GNECalibratorRouteDialog::onCmdAccept().

const RGBColor & GNECalibratorRoute::getColor ( ) const
const std::vector< GNEEdge * > & GNECalibratorRoute::getEdges ( ) const
std::vector< std::string > GNECalibratorRoute::getEdgesIDs ( ) const

get IDs of Edges

Definition at line 104 of file GNECalibratorRoute.cpp.

References myEdges.

Referenced by GNECalibratorRouteDialog::updateCalibratorRouteValues().

const std::string & GNECalibratorRoute::getRouteID ( ) const
SumoXMLTag GNECalibratorRoute::getTag ( ) const

get tag

Definition at line 92 of file GNECalibratorRoute.cpp.

References SUMO_TAG_ROUTE.

Referenced by GNECalibratorRouteDialog::onCmdAccept().

bool GNECalibratorRoute::operator== ( const GNECalibratorRoute &  calibratorRoute) const

overload operator ==

Definition at line 220 of file GNECalibratorRoute.cpp.

References getRouteID(), and myRouteID.

bool GNECalibratorRoute::setColor ( const RGBColor &  color)

set color of route

Returns
true if was sucesfully set, or false if value isn't valid

Definition at line 173 of file GNECalibratorRoute.cpp.

References myColor.

Referenced by GNECalibratorRouteDialog::onCmdSetVariable(), and setColor().

bool GNECalibratorRoute::setColor ( std::string  color = "black")

set color of route (String Version

Returns
true if was sucesfully set, or false if value isn't valid

Definition at line 180 of file GNECalibratorRoute.cpp.

References setColor().

bool GNECalibratorRoute::setEdges ( const std::vector< std::string > &  edgeIDs)

set edges of route using IDs

Returns
true if was sucesfully set, or false if value isn't valid

Definition at line 139 of file GNECalibratorRoute.cpp.

References GNEViewNet::getNet(), GNEAdditional::getViewNet(), myCalibratorParent, and GNENet::retrieveEdge().

Referenced by GNECalibratorRoute(), GNECalibratorRouteDialog::onCmdSetVariable(), and setEdges().

bool GNECalibratorRoute::setEdges ( const std::vector< GNEEdge * > &  edges)

set edges of route using pointers

Returns
true if was sucesfully set, or false if value isn't valid

Definition at line 156 of file GNECalibratorRoute.cpp.

References myEdges.

bool GNECalibratorRoute::setEdges ( const std::string &  edgeIDs)

set edges of route using a single string

Returns
true if was sucesfully set, or false if value isn't valid

Definition at line 163 of file GNECalibratorRoute.cpp.

References GNEAttributeCarrier::canParse(), GNEAttributeCarrier::parse(), and setEdges().

bool GNECalibratorRoute::setRouteID ( std::string  routeID)

set route ID

Returns
true if was sucesfully set, or false if value isn't valid

Definition at line 126 of file GNECalibratorRoute.cpp.

References GNEViewNet::getNet(), GNEAdditional::getViewNet(), myCalibratorParent, myRouteID, and GNENet::routeExists().

Referenced by GNECalibratorRoute(), and GNECalibratorRouteDialog::onCmdSetVariable().

Field Documentation

GNECalibrator* GNECalibratorRoute::myCalibratorParent
private

pointer to calibrator parent

Definition at line 124 of file GNECalibratorRoute.h.

Referenced by checkEdgeRoute(), getCalibratorParent(), setEdges(), and setRouteID().

RGBColor GNECalibratorRoute::myColor
private

color of flow

Definition at line 133 of file GNECalibratorRoute.h.

Referenced by getColor(), and setColor().

std::vector<GNEEdge*> GNECalibratorRoute::myEdges
private

edges of route

Definition at line 130 of file GNECalibratorRoute.h.

Referenced by getEdges(), getEdgesIDs(), and setEdges().

std::string GNECalibratorRoute::myRouteID
private

route in which this flow is used

Definition at line 127 of file GNECalibratorRoute.h.

Referenced by getRouteID(), operator==(), and setRouteID().


The documentation for this class was generated from the following files: