59 SUMORouteHandler(
const std::string& file,
const std::string& expectedRoot,
const bool hardFail);
66 static StopPos checkStopPos(
double& startPos,
double& endPos,
const double laneLength,
const double minLength,
const bool friendlyPos);
69 static bool isStopPosValid(
const double startPos,
const double endPos,
const double laneLength,
const double minLength,
const bool friendlyPos);
131 virtual void closeRoute(
const bool mayBeDisconnected =
false) = 0;
std::vector< SUMOVehicleParameter::Stop > StopParVector
An upper class for objects with additional parameters.
Parser for routes during their loading.
bool parseStop(SUMOVehicleParameter::Stop &stop, const SUMOSAXAttributes &attrs, std::string errorSuffix, MsgHandler *const errorOutput)
parses attributes common to all stops
virtual void openTrip(const SUMOSAXAttributes &attrs)=0
opens a trip for reading
@ STOPPOS_INVALID_LANELENGTH
@ STOPPOS_INVALID_STARTPOS
std::set< std::string > mySkippedVehicles
IDs of skipped vehicles to suppress errors for the triggered transportables within.
void registerLastDepart()
save last depart (only to be used if vehicle is not discarded)
virtual void openFlow(const SUMOSAXAttributes &attrs)=0
opens a flow for reading
virtual void closeContainer()=0
Ends the processing of a container.
SUMOTime myFirstDepart
the first read departure time
virtual void addWalk(const SUMOSAXAttributes &attrs)=0
add a fully specified walk
static bool isStopPosValid(const double startPos, const double endPos, const double laneLength, const double minLength, const bool friendlyPos)
check if start and end position of a stop is valid
SUMOTime myBeginDefault
The default value for flow begins.
double myCurrentCosts
The currently parsed route costs.
virtual void openRouteDistribution(const SUMOSAXAttributes &attrs)=0
opens a route distribution for reading
bool myAllowInternalRoutes
whether references to internal routes are allowed in this context
std::string myActiveRouteID
The id of the current route.
virtual void openRoute(const SUMOSAXAttributes &attrs)=0
opens a route for reading
virtual void openVehicleTypeDistribution(const SUMOSAXAttributes &attrs)=0
opens a type distribution for reading
virtual ~SUMORouteHandler()
standard destructor
SUMORouteHandler(const SUMORouteHandler &s)=delete
Invalidated copy constructor.
virtual void closeVehicle()=0
Ends the processing of a vehicle.
virtual void closeFlow()=0
Ends the processing of a flow.
virtual void closePersonFlow()=0
Ends the processing of a person flow.
std::vector< Parameterised * > myParamStack
The stack of currently parsed parameterised objects.
SUMOVehicleParameter * myVehicleParameter
Parameter of the current vehicle, trip, person, container or flow.
virtual void addRide(const SUMOSAXAttributes &attrs)=0
Processing of a ride.
virtual void addTranship(const SUMOSAXAttributes &attrs)=0
Processing of a tranship.
SUMOTime getLastDepart() const
Returns the last loaded depart time.
const bool myHardFail
flag to enable or disable hard fails
std::vector< int > myElementStack
hierarchy of elements being parsed
StopParVector myActiveRouteStops
List of the stops on the parsed route.
SUMOVTypeParameter * myCurrentVType
The currently parsed vehicle type.
virtual void addTransport(const SUMOSAXAttributes &attrs)=0
Processing of a transport.
virtual void closeRoute(const bool mayBeDisconnected=false)=0
virtual void closePerson()=0
Ends the processing of a person.
SUMOTime myLastDepart
The insertion time of the vehicle read last.
SUMOTime myEndDefault
The default value for flow ends.
virtual void closeVehicleTypeDistribution()=0
closes (ends) the building of a distribution
static StopPos checkStopPos(double &startPos, double &endPos, const double laneLength, const double minLength, const bool friendlyPos)
check start and end position of a stop
virtual void myStartElement(int element, const SUMOSAXAttributes &attrs)
Called on the opening of a tag;.
void addParam(const SUMOSAXAttributes &attrs)
assign arbitrary vehicle parameters
virtual void closeContainerFlow()=0
Ends the processing of a container flow.
virtual Parameterised * addStop(const SUMOSAXAttributes &attrs)=0
Processing of a stop.
virtual void closeTrip()=0
Ends the processing of a trip.
double myActiveRouteProbability
The probability of the current route.
SUMOTime getFirstDepart() const
returns the first departure time that was ever read
SUMORouteHandler & operator=(const SUMORouteHandler &s)=delete
Invalidated assignment operator.
virtual void openRouteFlow(const SUMOSAXAttributes &attrs)=0
opens a route flow for reading
int myInsertStopEdgesAt
where stop edges can be inserted into the current route (-1 means no insertion)
virtual void addTransportable(const SUMOSAXAttributes &attrs, const bool isPerson)
Processing of a person or container.
std::string myActiveRouteRefID
The id of the route the current route references to.
const RGBColor * myActiveRouteColor
The currently parsed route's color.
virtual void addPersonTrip(const SUMOSAXAttributes &attrs)=0
add a routing request for a walking or intermodal person
virtual void myEndElement(int element)
Called when a closing tag occurs.
virtual void closeVType()=0
Ends the processing of a vehicle type.
virtual void closeRouteDistribution()=0
closes (ends) the building of a distribution
virtual bool checkLastDepart()
Checks whether the route file is sorted by departure time if needed.
Encapsulated SAX-Attributes.
SAX-handler base for SUMO-files.
Structure representing possible vehicle parameter.
Definition of vehicle stop (position and duration)
Structure representing possible vehicle parameter.
#define UNUSED_PARAMETER(x)