Eclipse SUMO - Simulation of Urban MObility
SUMORouteHandler Class Referenceabstract

Parser for routes during their loading. More...

#include <SUMORouteHandler.h>

Inheritance diagram for SUMORouteHandler:
Collaboration diagram for SUMORouteHandler:

Public Member Functions

void characters (const XMLCh *const chars, const XERCES3_SIZE_t length)
 The inherited method called when characters occurred. More...
 
void endElement (const XMLCh *const uri, const XMLCh *const localname, const XMLCh *const qname)
 The inherited method called when a tag is being closed. More...
 
const std::string & getFileName () const
 returns the current file name More...
 
SUMOTime getFirstDepart () const
 returns the first departure time that was ever read More...
 
SUMOTime getLastDepart () const
 Returns the last loaded depart time. More...
 
void registerParent (const int tag, GenericSAXHandler *handler)
 Assigning a parent handler which is enabled when the specified tag is closed. More...
 
void setFileName (const std::string &name)
 Sets the current file name. More...
 
void startElement (const XMLCh *const uri, const XMLCh *const localname, const XMLCh *const qname, const XERCES_CPP_NAMESPACE::Attributes &attrs)
 The inherited method called when a new tag opens. More...
 
 SUMORouteHandler (const std::string &file, const std::string &expectedRoot, const bool hardFail)
 standard constructor More...
 
virtual ~SUMORouteHandler ()
 standard destructor More...
 
SAX ErrorHandler callbacks
void warning (const XERCES_CPP_NAMESPACE::SAXParseException &exception)
 Handler for XML-warnings. More...
 
void error (const XERCES_CPP_NAMESPACE::SAXParseException &exception)
 Handler for XML-errors. More...
 
void fatalError (const XERCES_CPP_NAMESPACE::SAXParseException &exception)
 Handler for XML-errors. More...
 

Static Public Member Functions

static bool checkStopPos (double &startPos, double &endPos, const double laneLength, const double minLength, const bool friendlyPos)
 check start and end position of a stop More...
 

Protected Member Functions

void addParam (const SUMOSAXAttributes &attrs)
 assign arbitrary vehicle parameters More...
 
std::string buildErrorMessage (const XERCES_CPP_NAMESPACE::SAXParseException &exception)
 Builds an error message. More...
 
bool checkLastDepart ()
 Checks whether the route file is sorted by departure time if needed. More...
 
virtual void myCharacters (int element, const std::string &chars)
 Callback method for characters to implement by derived classes. More...
 
bool parseStop (SUMOVehicleParameter::Stop &stop, const SUMOSAXAttributes &attrs, std::string errorSuffix, MsgHandler *const errorOutput)
 parses attributes common to all stops More...
 
void registerLastDepart ()
 save last depart (only to be used if vehicle is not discarded) More...
 
void setSchemaSeen (const bool schemaSeen=true)
 
inherited from GenericSAXHandler
virtual void myStartElement (int element, const SUMOSAXAttributes &attrs)
 Called on the opening of a tag;. More...
 
virtual void myEndElement (int element)
 Called when a closing tag occurs. More...
 
open element functions
virtual void openVehicleTypeDistribution (const SUMOSAXAttributes &attrs)=0
 opens a type distribution for reading More...
 
virtual void closeVehicleTypeDistribution ()=0
 closes (ends) the building of a distribution More...
 
virtual void openRoute (const SUMOSAXAttributes &attrs)=0
 opens a route for reading More...
 
virtual void openFlow (const SUMOSAXAttributes &attrs)=0
 opens a flow for reading More...
 
virtual void openTrip (const SUMOSAXAttributes &attrs)=0
 opens a trip for reading More...
 
close element functions
virtual void closeRoute (const bool mayBeDisconnected=false)=0
 
virtual void openRouteDistribution (const SUMOSAXAttributes &attrs)=0
 opens a route distribution for reading More...
 
virtual void closeRouteDistribution ()=0
 closes (ends) the building of a distribution More...
 
virtual void closeVehicle ()=0
 Ends the processing of a vehicle. More...
 
virtual void closeVType ()=0
 Ends the processing of a vehicle type. More...
 
virtual void closePerson ()=0
 Ends the processing of a person. More...
 
virtual void closePersonFlow ()=0
 Ends the processing of a person. More...
 
virtual void closeContainer ()=0
 Ends the processing of a container. More...
 
virtual void closeFlow ()=0
 Ends the processing of a flow. More...
 
virtual void closeTrip ()=0
 Ends the processing of a trip. More...
 
add element functions
virtual void addStop (const SUMOSAXAttributes &attrs)=0
 Processing of a stop. More...
 
virtual void addPersonTrip (const SUMOSAXAttributes &attrs)=0
 add a routing request for a walking or intermodal person More...
 
virtual void addWalk (const SUMOSAXAttributes &attrs)=0
 add a fully specified walk More...
 
virtual void addPerson (const SUMOSAXAttributes &attrs)=0
 Processing of a person. More...
 
virtual void addContainer (const SUMOSAXAttributes &attrs)=0
 Processing of a container. More...
 
virtual void addRide (const SUMOSAXAttributes &attrs)=0
 Processing of a ride. More...
 
virtual void addTransport (const SUMOSAXAttributes &attrs)=0
 Processing of a transport. More...
 
virtual void addTranship (const SUMOSAXAttributes &attrs)=0
 Processing of a tranship. More...
 

Protected Attributes

const RGBColormyActiveRouteColor
 The currently parsed route's color. More...
 
std::string myActiveRouteID
 The id of the current route. More...
 
double myActiveRouteProbability
 The probability of the current route. More...
 
std::string myActiveRouteRefID
 The id of the route the current route references to. More...
 
std::vector< SUMOVehicleParameter::StopmyActiveRouteStops
 List of the stops on the parsed route. More...
 
SUMOTime myBeginDefault
 The default value for flow begins. More...
 
double myCurrentCosts
 The currently parsed route costs. More...
 
SUMOVTypeParametermyCurrentVType
 The currently parsed vehicle type. More...
 
SUMOTime myEndDefault
 The default value for flow ends. More...
 
SUMOTime myFirstDepart
 the first read departure time More...
 
const bool myHardFail
 flag to enable or disable hard fails More...
 
IDSupplier myIdSupplier
 generates numerical ids More...
 
int myInsertStopEdgesAt
 where stop edges can be inserted into the current route (-1 means no insertion) More...
 
SUMOTime myLastDepart
 The insertion time of the vehicle read last. More...
 
Parameterised myLoadedParameterised
 Parameterised used for saving loaded generic parameters that aren't saved in Vehicles or Vehicle Types. More...
 
SUMOVehicleParametermyVehicleParameter
 Parameter of the current vehicle, trip, person, container or flow. More...
 

Private Member Functions

SUMORouteHandleroperator= (const SUMORouteHandler &s)=delete
 Invalidated assignment operator. More...
 
 SUMORouteHandler (const SUMORouteHandler &s)=delete
 Invalidated copy constructor. More...
 

Detailed Description

Parser for routes during their loading.

SUMORouteHandler is the abstract super class for routers and simulation loading routes.

Definition at line 51 of file SUMORouteHandler.h.

Constructor & Destructor Documentation

◆ SUMORouteHandler() [1/2]

SUMORouteHandler::SUMORouteHandler ( const std::string &  file,
const std::string &  expectedRoot,
const bool  hardFail 
)

standard constructor

Definition at line 46 of file SUMORouteHandler.cpp.

◆ ~SUMORouteHandler()

SUMORouteHandler::~SUMORouteHandler ( )
virtual

standard destructor

Definition at line 61 of file SUMORouteHandler.cpp.

References myCurrentVType.

◆ SUMORouteHandler() [2/2]

SUMORouteHandler::SUMORouteHandler ( const SUMORouteHandler s)
privatedelete

Invalidated copy constructor.

Member Function Documentation

◆ addContainer()

virtual void SUMORouteHandler::addContainer ( const SUMOSAXAttributes attrs)
protectedpure virtual

Processing of a container.

Implemented in GNERouteHandler, RORouteHandler, and MSRouteHandler.

Referenced by myStartElement().

◆ addParam()

void SUMORouteHandler::addParam ( const SUMOSAXAttributes attrs)
protected

◆ addPerson()

virtual void SUMORouteHandler::addPerson ( const SUMOSAXAttributes attrs)
protectedpure virtual

Processing of a person.

Implemented in GNERouteHandler, MSRouteHandler, and RORouteHandler.

Referenced by myStartElement().

◆ addPersonTrip()

virtual void SUMORouteHandler::addPersonTrip ( const SUMOSAXAttributes attrs)
protectedpure virtual

add a routing request for a walking or intermodal person

Implemented in GNERouteHandler, RORouteHandler, and MSRouteHandler.

Referenced by myStartElement().

◆ addRide()

virtual void SUMORouteHandler::addRide ( const SUMOSAXAttributes attrs)
protectedpure virtual

Processing of a ride.

Implemented in GNERouteHandler, RORouteHandler, and MSRouteHandler.

Referenced by myStartElement().

◆ addStop()

virtual void SUMORouteHandler::addStop ( const SUMOSAXAttributes attrs)
protectedpure virtual

Processing of a stop.

Implemented in GNERouteHandler, RORouteHandler, and MSRouteHandler.

Referenced by myStartElement().

◆ addTranship()

virtual void SUMORouteHandler::addTranship ( const SUMOSAXAttributes attrs)
protectedpure virtual

Processing of a tranship.

Implemented in GNERouteHandler, RORouteHandler, and MSRouteHandler.

Referenced by myStartElement().

◆ addTransport()

virtual void SUMORouteHandler::addTransport ( const SUMOSAXAttributes attrs)
protectedpure virtual

Processing of a transport.

Implemented in GNERouteHandler, RORouteHandler, and MSRouteHandler.

Referenced by myStartElement().

◆ addWalk()

virtual void SUMORouteHandler::addWalk ( const SUMOSAXAttributes attrs)
protectedpure virtual

add a fully specified walk

Implemented in GNERouteHandler, RORouteHandler, and MSRouteHandler.

Referenced by myStartElement().

◆ buildErrorMessage()

std::string GenericSAXHandler::buildErrorMessage ( const XERCES_CPP_NAMESPACE::SAXParseException &  exception)
protectedinherited

Builds an error message.

The error message includes the file name and the line/column information as supported by the given SAXParseException

Parameters
[in]exceptionThe name of the currently processed file
Returns
A string describing the given exception

Definition at line 187 of file GenericSAXHandler.cpp.

References GenericSAXHandler::getFileName(), and transcode().

Referenced by GenericSAXHandler::error(), GenericSAXHandler::fatalError(), and GenericSAXHandler::warning().

◆ characters()

void GenericSAXHandler::characters ( const XMLCh *const  chars,
const XERCES3_SIZE_t  length 
)
inherited

The inherited method called when characters occurred.

The retrieved characters are converted into a string and appended into a private buffer. They are reported as soon as the element ends.

Todo:

recheck/describe what happens with characters when a new element is opened

describe characters processing in the class' head

Definition at line 170 of file GenericSAXHandler.cpp.

References GenericSAXHandler::myCharactersVector, and StringUtils::transcode().

◆ checkLastDepart()

◆ checkStopPos()

bool SUMORouteHandler::checkStopPos ( double &  startPos,
double &  endPos,
const double  laneLength,
const double  minLength,
const bool  friendlyPos 
)
static

◆ closeContainer()

virtual void SUMORouteHandler::closeContainer ( )
protectedpure virtual

Ends the processing of a container.

Implemented in GNERouteHandler, RORouteHandler, and MSRouteHandler.

Referenced by myEndElement().

◆ closeFlow()

virtual void SUMORouteHandler::closeFlow ( )
protectedpure virtual

Ends the processing of a flow.

Implemented in GNERouteHandler, RORouteHandler, and MSRouteHandler.

Referenced by myEndElement().

◆ closePerson()

virtual void SUMORouteHandler::closePerson ( )
protectedpure virtual

Ends the processing of a person.

Implemented in GNERouteHandler, RORouteHandler, and MSRouteHandler.

Referenced by myEndElement().

◆ closePersonFlow()

virtual void SUMORouteHandler::closePersonFlow ( )
protectedpure virtual

Ends the processing of a person.

Implemented in GNERouteHandler, RORouteHandler, and MSRouteHandler.

Referenced by myEndElement().

◆ closeRoute()

virtual void SUMORouteHandler::closeRoute ( const bool  mayBeDisconnected = false)
protectedpure virtual

closes (ends) the building of a route. Afterwards no edges may be added to it; this method may throw exceptions when a) the route is empty or b) another route with the same id already exists

Implemented in GNERouteHandler, RORouteHandler, and MSRouteHandler.

Referenced by myEndElement().

◆ closeRouteDistribution()

virtual void SUMORouteHandler::closeRouteDistribution ( )
protectedpure virtual

closes (ends) the building of a distribution

Implemented in GNERouteHandler, RORouteHandler, and MSRouteHandler.

Referenced by myEndElement().

◆ closeTrip()

virtual void SUMORouteHandler::closeTrip ( )
protectedpure virtual

Ends the processing of a trip.

Implemented in GNERouteHandler, RORouteHandler, and MSRouteHandler.

Referenced by myEndElement().

◆ closeVehicle()

virtual void SUMORouteHandler::closeVehicle ( )
protectedpure virtual

Ends the processing of a vehicle.

Implemented in GNERouteHandler, RORouteHandler, MSRouteHandler, and MSStateHandler.

Referenced by myEndElement().

◆ closeVehicleTypeDistribution()

virtual void SUMORouteHandler::closeVehicleTypeDistribution ( )
protectedpure virtual

closes (ends) the building of a distribution

Implemented in GNERouteHandler, RORouteHandler, and MSRouteHandler.

Referenced by myEndElement().

◆ closeVType()

virtual void SUMORouteHandler::closeVType ( )
protectedpure virtual

Ends the processing of a vehicle type.

Implemented in GNERouteHandler, RORouteHandler, and MSRouteHandler.

Referenced by myEndElement().

◆ endElement()

void GenericSAXHandler::endElement ( const XMLCh *const  uri,
const XMLCh *const  localname,
const XMLCh *const  qname 
)
inherited

The inherited method called when a tag is being closed.

This method calls the user-implemented methods myCharacters with the previously collected and converted characters.

Then, myEndElement is called, supplying it the qname converted to its enum- and string-representations.

Todo:

recheck/describe encoding of the string-representation

do not generate and report the string-representation

Definition at line 121 of file GenericSAXHandler.cpp.

References GenericSAXHandler::convertTag(), GenericSAXHandler::myCharacters(), GenericSAXHandler::myCharactersVector, GenericSAXHandler::myEndElement(), GenericSAXHandler::myParentHandler, GenericSAXHandler::myParentIndicator, XMLSubSys::setHandler(), SUMO_TAG_INCLUDE, SUMO_TAG_NOTHING, and StringUtils::transcode().

◆ error()

void GenericSAXHandler::error ( const XERCES_CPP_NAMESPACE::SAXParseException &  exception)
inherited

Handler for XML-errors.

The message is built using buildErrorMessage and thrown within a ProcessError.

Parameters
[in]exceptionThe occurred exception to process
Exceptions
ProcessErrorOn any call

Definition at line 206 of file GenericSAXHandler.cpp.

References GenericSAXHandler::buildErrorMessage().

Referenced by MSRouteHandler::addFlowPerson(), MSRouteHandler::closeContainer(), MSRouteHandler::closePerson(), MSRouteHandler::closePersonFlow(), NIImporter_OpenDrive::geomFromSpiral(), and MSRouteHandler::myStartElement().

◆ fatalError()

void GenericSAXHandler::fatalError ( const XERCES_CPP_NAMESPACE::SAXParseException &  exception)
inherited

Handler for XML-errors.

The message is built using buildErrorMessage and thrown within a ProcessError.

Exceptions
ProcessErrorOn any call
Parameters
[in]exceptionThe occurred exception to process

Definition at line 212 of file GenericSAXHandler.cpp.

References GenericSAXHandler::buildErrorMessage().

◆ getFileName()

◆ getFirstDepart()

SUMOTime SUMORouteHandler::getFirstDepart ( ) const

returns the first departure time that was ever read

Definition at line 328 of file SUMORouteHandler.cpp.

References myFirstDepart.

Referenced by SUMORouteLoader::getFirstDepart().

◆ getLastDepart()

SUMOTime SUMORouteHandler::getLastDepart ( ) const

Returns the last loaded depart time.

Definition at line 334 of file SUMORouteHandler.cpp.

References myLastDepart.

Referenced by SUMORouteLoader::loadUntil().

◆ myCharacters()

void GenericSAXHandler::myCharacters ( int  element,
const std::string &  chars 
)
protectedvirtualinherited

Callback method for characters to implement by derived classes.

Called by "endElement" (see there).

Parameters
[in]elementThe opened element, given as a int
[in]charsThe complete embedded character string ProcessError These method may throw a ProcessError if something fails

Reimplemented in NIImporter_OpenDrive, and NIImporter_ITSUMO::Handler.

Definition at line 222 of file GenericSAXHandler.cpp.

Referenced by GenericSAXHandler::endElement().

◆ myEndElement()

◆ myStartElement()

void SUMORouteHandler::myStartElement ( int  element,
const SUMOSAXAttributes attrs 
)
protectedvirtual

Called on the opening of a tag;.

Parameters
[in]elementID of the currently opened element
[in]attrsAttributes within the currently opened element
Exceptions
ProcessErrorIf something fails
See also
GenericSAXHandler::myStartElement

Reimplemented from GenericSAXHandler.

Reimplemented in NLHandler, MSCalibrator, RORouteHandler, MSRouteHandler, and MSStateHandler.

Definition at line 92 of file SUMORouteHandler.cpp.

References addContainer(), addParam(), addPerson(), addPersonTrip(), addRide(), addStop(), addTranship(), addTransport(), addWalk(), SUMOVehicleParserHelper::beginVTypeParsing(), GenericSAXHandler::getFileName(), SUMOSAXAttributes::getSUMOTimeReporting(), SUMOSAXAttributes::hasAttribute(), SUMOVTypeParameter::id, SUMOVehicleParameter::id, myActiveRouteID, myBeginDefault, myCurrentVType, myEndDefault, myHardFail, myVehicleParameter, openRoute(), openRouteDistribution(), openTrip(), openVehicleTypeDistribution(), SUMOVehicleParameter::parametersSet, SUMOVehicleParserHelper::parseFlowAttributes(), SUMOVehicleParserHelper::parseVehicleAttributes(), SUMOVehicleParserHelper::parseVTypeEmbedded(), SUMO_ATTR_BEGIN, SUMO_ATTR_EDGES, SUMO_ATTR_END, SUMO_ATTR_ROUTE, SUMO_TAG_CONTAINER, SUMO_TAG_FLOW, SUMO_TAG_INTERVAL, SUMO_TAG_PARAM, SUMO_TAG_PERSON, SUMO_TAG_PERSONFLOW, SUMO_TAG_PERSONTRIP, SUMO_TAG_RIDE, SUMO_TAG_ROUTE, SUMO_TAG_ROUTE_DISTRIBUTION, SUMO_TAG_STOP, SUMO_TAG_TRANSHIP, SUMO_TAG_TRANSPORT, SUMO_TAG_TRIP, SUMO_TAG_VEHICLE, SUMO_TAG_VTYPE, SUMO_TAG_VTYPE_DISTRIBUTION, SUMO_TAG_WALK, VEHPARS_FORCE_REROUTE, WRITE_ERROR, and WRITE_WARNING.

Referenced by MSRouteHandler::myStartElement(), and RORouteHandler::myStartElement().

◆ openFlow()

virtual void SUMORouteHandler::openFlow ( const SUMOSAXAttributes attrs)
protectedpure virtual

opens a flow for reading

Implemented in GNERouteHandler, RORouteHandler, and MSRouteHandler.

◆ openRoute()

virtual void SUMORouteHandler::openRoute ( const SUMOSAXAttributes attrs)
protectedpure virtual

opens a route for reading

Implemented in GNERouteHandler, RORouteHandler, and MSRouteHandler.

Referenced by myStartElement().

◆ openRouteDistribution()

virtual void SUMORouteHandler::openRouteDistribution ( const SUMOSAXAttributes attrs)
protectedpure virtual

opens a route distribution for reading

Implemented in GNERouteHandler, RORouteHandler, and MSRouteHandler.

Referenced by myStartElement().

◆ openTrip()

virtual void SUMORouteHandler::openTrip ( const SUMOSAXAttributes attrs)
protectedpure virtual

opens a trip for reading

Implemented in GNERouteHandler, RORouteHandler, and MSRouteHandler.

Referenced by myStartElement().

◆ openVehicleTypeDistribution()

virtual void SUMORouteHandler::openVehicleTypeDistribution ( const SUMOSAXAttributes attrs)
protectedpure virtual

opens a type distribution for reading

Implemented in GNERouteHandler, RORouteHandler, and MSRouteHandler.

Referenced by myStartElement().

◆ operator=()

SUMORouteHandler& SUMORouteHandler::operator= ( const SUMORouteHandler s)
privatedelete

Invalidated assignment operator.

◆ parseStop()

bool SUMORouteHandler::parseStop ( SUMOVehicleParameter::Stop stop,
const SUMOSAXAttributes attrs,
std::string  errorSuffix,
MsgHandler *const  errorOutput 
)
protected

parses attributes common to all stops

Definition at line 357 of file SUMORouteHandler.cpp.

References SUMOVehicleParameter::Stop::awaitedContainers, SUMOVehicleParameter::Stop::awaitedPersons, SUMOVehicleParameter::Stop::busstop, SUMOVehicleParameter::Stop::chargingStation, SUMOVehicleParameter::Stop::containerstop, SUMOVehicleParameter::Stop::containerTriggered, SUMOVehicleParameter::Stop::duration, SUMOSAXAttributes::get(), SUMOSAXAttributes::getOpt(), SUMOSAXAttributes::getOptStringVector(), SUMOSAXAttributes::getOptSUMOTimeReporting(), SUMOSAXAttributes::hasAttribute(), SUMOVehicleParameter::Stop::index, MsgHandler::inform(), SUMOVehicleParameter::Stop::lane, SUMOVehicleParameter::Stop::line, SUMOVehicleParameter::Stop::parametersSet, SUMOVehicleParameter::Stop::parking, SUMOVehicleParameter::Stop::parkingarea, STOP_CONTAINER_TRIGGER_SET, STOP_END_SET, STOP_EXPECTED_CONTAINERS_SET, STOP_EXPECTED_SET, STOP_INDEX_END, STOP_INDEX_FIT, STOP_LINE_SET, STOP_PARKING_SET, STOP_START_SET, STOP_TRIGGER_SET, STOP_TRIP_ID_SET, SUMO_ATTR_BUS_STOP, SUMO_ATTR_CHARGING_STATION, SUMO_ATTR_CONTAINER_STOP, SUMO_ATTR_CONTAINER_TRIGGERED, SUMO_ATTR_DURATION, SUMO_ATTR_ENDPOS, SUMO_ATTR_EXPECTED, SUMO_ATTR_EXPECTED_CONTAINERS, SUMO_ATTR_INDEX, SUMO_ATTR_LINE, SUMO_ATTR_PARKING, SUMO_ATTR_PARKING_AREA, SUMO_ATTR_STARTPOS, SUMO_ATTR_TRIGGERED, SUMO_ATTR_TRIP_ID, SUMO_ATTR_UNTIL, SUMOVehicleParameter::Stop::triggered, SUMOVehicleParameter::Stop::tripId, SUMOVehicleParameter::Stop::until, and WRITE_WARNING.

Referenced by MSRouteHandler::addStop(), RORouteHandler::addStop(), and GNERouteHandler::addStop().

◆ registerLastDepart()

◆ registerParent()

void GenericSAXHandler::registerParent ( const int  tag,
GenericSAXHandler handler 
)
inherited

◆ setFileName()

void GenericSAXHandler::setFileName ( const std::string &  name)
inherited

Sets the current file name.

Parameters
[in]nameThe name of the currently processed file
Todo:
Hmmm - this is as unsafe as having a direct access to the variable; recheck

Definition at line 69 of file GenericSAXHandler.cpp.

References GenericSAXHandler::myFileName.

Referenced by NIImporter_SUMO::_loadNetwork(), GUISettingsHandler::GUISettingsHandler(), PCNetProjectionLoader::load(), NIImporter_OpenStreetMap::load(), NIImporter_Vissim::load(), loadNet(), ROLoader::loadNet(), NIImporter_ITSUMO::loadNetwork(), NIImporter_MATSim::loadNetwork(), NILoader::loadXMLType(), main(), and XMLSubSys::runParser().

◆ setSchemaSeen()

void GenericSAXHandler::setSchemaSeen ( const bool  schemaSeen = true)
inlineprotectedinherited

◆ startElement()

void GenericSAXHandler::startElement ( const XMLCh *const  uri,
const XMLCh *const  localname,
const XMLCh *const  qname,
const XERCES_CPP_NAMESPACE::Attributes &  attrs 
)
inherited

The inherited method called when a new tag opens.

The method parses the supplied XMLCh*-qname using the internal name/enum-map to obtain the enum representation of the attribute name.

Then, "myStartElement" is called supplying the enumeration value, the string-representation of the name and the attributes.

Todo:

recheck/describe encoding of the string-representation

do not generate and report the string-representation

Definition at line 94 of file GenericSAXHandler.cpp.

References GenericSAXHandler::convertTag(), FileHelpers::getConfigurationRelative(), GenericSAXHandler::getFileName(), SUMOSAXAttributesImpl_Xerces::getString(), FileHelpers::isAbsolute(), GenericSAXHandler::myCharactersVector, GenericSAXHandler::myExpectedRoot, GenericSAXHandler::myPredefinedTags, GenericSAXHandler::myPredefinedTagsMML, GenericSAXHandler::mySchemaSeen, GenericSAXHandler::myStartElement(), XMLSubSys::runParser(), SUMO_ATTR_HREF, SUMO_TAG_INCLUDE, and StringUtils::transcode().

◆ warning()

void GenericSAXHandler::warning ( const XERCES_CPP_NAMESPACE::SAXParseException &  exception)
inherited

Handler for XML-warnings.

The message is built using buildErrorMessage and reported to the warning-instance of the MsgHandler.

Parameters
[in]exceptionThe occurred exception to process

Definition at line 200 of file GenericSAXHandler.cpp.

References GenericSAXHandler::buildErrorMessage(), and WRITE_WARNING.

Field Documentation

◆ myActiveRouteColor

const RGBColor* SUMORouteHandler::myActiveRouteColor
protected

The currently parsed route's color.

Definition at line 211 of file SUMORouteHandler.h.

Referenced by MSRouteHandler::closeRoute(), RORouteHandler::closeRoute(), MSRouteHandler::openRoute(), and RORouteHandler::openRoute().

◆ myActiveRouteID

◆ myActiveRouteProbability

double SUMORouteHandler::myActiveRouteProbability
protected

◆ myActiveRouteRefID

std::string SUMORouteHandler::myActiveRouteRefID
protected

The id of the route the current route references to.

Definition at line 205 of file SUMORouteHandler.h.

Referenced by MSRouteHandler::closeRoute(), RORouteHandler::closeRoute(), MSRouteHandler::openRoute(), and RORouteHandler::openRoute().

◆ myActiveRouteStops

std::vector<SUMOVehicleParameter::Stop> SUMORouteHandler::myActiveRouteStops
protected

◆ myBeginDefault

SUMOTime SUMORouteHandler::myBeginDefault
protected

The default value for flow begins.

Definition at line 229 of file SUMORouteHandler.h.

Referenced by myEndElement(), and myStartElement().

◆ myCurrentCosts

double SUMORouteHandler::myCurrentCosts
protected

The currently parsed route costs.

Definition at line 214 of file SUMORouteHandler.h.

Referenced by MSRouteHandler::closeRoute(), RORouteHandler::closeRoute(), MSRouteHandler::openRoute(), and RORouteHandler::openRoute().

◆ myCurrentVType

◆ myEndDefault

SUMOTime SUMORouteHandler::myEndDefault
protected

The default value for flow ends.

Definition at line 232 of file SUMORouteHandler.h.

Referenced by myEndElement(), and myStartElement().

◆ myFirstDepart

SUMOTime SUMORouteHandler::myFirstDepart
protected

the first read departure time

Definition at line 235 of file SUMORouteHandler.h.

Referenced by getFirstDepart(), and registerLastDepart().

◆ myHardFail

const bool SUMORouteHandler::myHardFail
protected

flag to enable or disable hard fails

Definition at line 193 of file SUMORouteHandler.h.

Referenced by RORouteHandler::addPersonTrip(), RORouteHandler::addWalk(), myStartElement(), and MSRouteHandler::parseWalkPositions().

◆ myIdSupplier

IDSupplier SUMORouteHandler::myIdSupplier
protected

generates numerical ids

Definition at line 226 of file SUMORouteHandler.h.

◆ myInsertStopEdgesAt

int SUMORouteHandler::myInsertStopEdgesAt
protected

◆ myLastDepart

SUMOTime SUMORouteHandler::myLastDepart
protected

The insertion time of the vehicle read last.

Definition at line 199 of file SUMORouteHandler.h.

Referenced by checkLastDepart(), getLastDepart(), and registerLastDepart().

◆ myLoadedParameterised

Parameterised SUMORouteHandler::myLoadedParameterised
protected

Parameterised used for saving loaded generic parameters that aren't saved in Vehicles or Vehicle Types.

Definition at line 223 of file SUMORouteHandler.h.

Referenced by addParam(), and GNERouteHandler::closeRoute().

◆ myVehicleParameter

SUMOVehicleParameter* SUMORouteHandler::myVehicleParameter
protected

Parameter of the current vehicle, trip, person, container or flow.

Definition at line 196 of file SUMORouteHandler.h.

Referenced by MSRouteHandler::addFlowPerson(), addParam(), MSRouteHandler::addPersonTrip(), RORouteHandler::addPersonTrip(), MSRouteHandler::addStop(), RORouteHandler::addStop(), GNERouteHandler::addStop(), MSRouteHandler::addWalk(), RORouteHandler::addWalk(), checkLastDepart(), MSRouteHandler::closeContainer(), RORouteHandler::closeContainer(), MSRouteHandler::closeFlow(), RORouteHandler::closeFlow(), GNERouteHandler::closeFlow(), MSRouteHandler::closePerson(), RORouteHandler::closePerson(), GNERouteHandler::closePerson(), MSRouteHandler::closePersonFlow(), RORouteHandler::closePersonFlow(), GNERouteHandler::closePersonFlow(), MSRouteHandler::closeRoute(), RORouteHandler::closeRoute(), GNERouteHandler::closeRoute(), MSRouteHandler::closeRouteDistribution(), MSRouteHandler::closeTrip(), GNERouteHandler::closeTrip(), MSStateHandler::closeVehicle(), MSRouteHandler::closeVehicle(), RORouteHandler::closeVehicle(), GNERouteHandler::closeVehicle(), MSStateHandler::myEndElement(), myEndElement(), MSStateHandler::myStartElement(), MSRouteHandler::myStartElement(), myStartElement(), RORouteHandler::myStartElement(), GNERouteHandler::openFlow(), MSRouteHandler::openRoute(), RORouteHandler::openRoute(), MSRouteHandler::openRouteDistribution(), RORouteHandler::openRouteDistribution(), GNERouteHandler::openTrip(), MSRouteHandler::parseFromViaTo(), RORouteHandler::parseFromViaTo(), RORouteHandler::parseGeoEdges(), and registerLastDepart().


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