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...
 
GNECalibratorgetCalibratorParent () const
 get pointer to calibrator parent More...
 
const std::string & 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, std::string color)
 parameter constructor 1 (Using edges IDs) More...
 
 GNECalibratorRoute (GNECalibrator *calibratorParent, std::string routeID, std::vector< GNEEdge *> edges, std::string color)
 parameter constructor 2 (Using GNEEdges) More...
 
bool operator== (const GNECalibratorRoute &calibratorRoute) const
 overload operator == More...
 
bool setColor (std::string color="")
 set color of route 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

GNECalibratormyCalibratorParent
 pointer to calibrator parent More...
 
std::string 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 50 of file GNECalibratorRoute.h.

Constructor & Destructor Documentation

◆ GNECalibratorRoute() [1/3]

GNECalibratorRoute::GNECalibratorRoute ( GNECalibrator calibratorParent)

default constructor

Definition at line 62 of file GNECalibratorRoute.cpp.

◆ GNECalibratorRoute() [2/3]

GNECalibratorRoute::GNECalibratorRoute ( GNECalibrator calibratorParent,
std::string  routeID,
std::vector< std::string >  edges,
std::string  color 
)

parameter constructor 1 (Using edges IDs)

Definition at line 67 of file GNECalibratorRoute.cpp.

References setColor(), setEdges(), and setRouteID().

◆ GNECalibratorRoute() [3/3]

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

parameter constructor 2 (Using GNEEdges)

Definition at line 76 of file GNECalibratorRoute.cpp.

References setColor(), setEdges(), and setRouteID().

◆ ~GNECalibratorRoute()

GNECalibratorRoute::~GNECalibratorRoute ( )

destructor

Definition at line 84 of file GNECalibratorRoute.cpp.

Member Function Documentation

◆ checkEdgeRoute()

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 182 of file GNECalibratorRoute.cpp.

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

◆ getCalibratorParent()

GNECalibrator * GNECalibratorRoute::getCalibratorParent ( ) const

get pointer to calibrator parent

Definition at line 88 of file GNECalibratorRoute.cpp.

References myCalibratorParent.

Referenced by GNECalibratorRouteDialog::onCmdAccept().

◆ getColor()

const std::string & GNECalibratorRoute::getColor ( ) const

◆ getEdges()

const std::vector< GNEEdge * > & GNECalibratorRoute::getEdges ( ) const

◆ getEdgesIDs()

std::vector< std::string > GNECalibratorRoute::getEdgesIDs ( ) const

get IDs of Edges

Definition at line 106 of file GNECalibratorRoute.cpp.

References myEdges.

Referenced by GNECalibratorRouteDialog::updateCalibratorRouteValues().

◆ getRouteID()

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

◆ getTag()

SumoXMLTag GNECalibratorRoute::getTag ( ) const

get tag

Definition at line 94 of file GNECalibratorRoute.cpp.

References SUMO_TAG_ROUTE.

Referenced by GNECalibratorRouteDialog::onCmdAccept().

◆ operator==()

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

overload operator ==

Definition at line 212 of file GNECalibratorRoute.cpp.

References getRouteID(), and myRouteID.

◆ setColor()

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

set color of route

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

Definition at line 175 of file GNECalibratorRoute.cpp.

References myColor.

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

◆ setEdges() [1/3]

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 141 of file GNECalibratorRoute.cpp.

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

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

◆ setEdges() [2/3]

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 158 of file GNECalibratorRoute.cpp.

References myEdges.

◆ setEdges() [3/3]

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 165 of file GNECalibratorRoute.cpp.

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

◆ setRouteID()

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 128 of file GNECalibratorRoute.cpp.

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

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

Field Documentation

◆ myCalibratorParent

GNECalibrator* GNECalibratorRoute::myCalibratorParent
private

pointer to calibrator parent

Definition at line 118 of file GNECalibratorRoute.h.

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

◆ myColor

std::string GNECalibratorRoute::myColor
private

color of flow

Definition at line 127 of file GNECalibratorRoute.h.

Referenced by getColor(), and setColor().

◆ myEdges

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

edges of route

Definition at line 124 of file GNECalibratorRoute.h.

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

◆ myRouteID

std::string GNECalibratorRoute::myRouteID
private

route in which this flow is used

Definition at line 121 of file GNECalibratorRoute.h.

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


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