19 #ifndef SUMORouteHandler_h 20 #define SUMORouteHandler_h 54 SUMORouteHandler(
const std::string& file,
const std::string& expectedRoot,
const bool hardFail);
60 static bool checkStopPos(
double& startPos,
double& endPos,
const double laneLength,
61 const double minLength,
const bool friendlyPos);
120 virtual void closeRoute(
const bool mayBeDisconnected =
false) = 0;
virtual void openVehicleTypeDistribution(const SUMOSAXAttributes &attrs)=0
opens a type distribution for reading
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.
SUMOTime myFirstDepart
the first read departure time
SUMORouteHandler & operator=(const SUMORouteHandler &s)=delete
Invalidated assignment operator.
SUMOVehicleParameter * myVehicleParameter
Parameter of the current vehicle, trip, person, container or flow.
SUMOTime myEndDefault
The default value for flow ends.
Structure representing possible vehicle parameter.
virtual void addStop(const SUMOSAXAttributes &attrs)=0
Processing of a stop.
SUMOVTypeParameter * myCurrentVType
The currently parsed vehicle type.
virtual void addContainer(const SUMOSAXAttributes &attrs)=0
Processing of a container.
virtual void closeTrip()=0
Ends the processing of a trip.
virtual void openTrip(const SUMOSAXAttributes &attrs)=0
opens a trip for reading
double myActiveRouteProbability
The probability of the current route.
virtual void openRouteDistribution(const SUMOSAXAttributes &attrs)=0
opens a route distribution for reading
void registerLastDepart()
save last depart (only to be used if vehicle is not discarded)
std::string myActiveRouteID
The id of the current route.
virtual void addTranship(const SUMOSAXAttributes &attrs)=0
Processing of a tranship.
SAX-handler base for SUMO-files.
int myInsertStopEdgesAt
where stop edges can be inserted into the current route (-1 means no insertion)
SUMOTime getLastDepart() const
Returns the last loaded depart time.
IDSupplier myIdSupplier
generates numerical ids
SUMOTime getFirstDepart() const
returns the first departure time that was ever read
virtual void addRide(const SUMOSAXAttributes &attrs)=0
Processing of a ride.
SUMOTime myBeginDefault
The default value for flow begins.
virtual void closePersonFlow()=0
Ends the processing of a person.
virtual void closeVehicle()=0
Ends the processing of a vehicle.
virtual void addTransport(const SUMOSAXAttributes &attrs)=0
Processing of a transport.
virtual void closeContainer()=0
Ends the processing of a container.
Encapsulated SAX-Attributes.
void addParam(const SUMOSAXAttributes &attrs)
assign arbitrary vehicle parameters
virtual ~SUMORouteHandler()
standard destructor
An upper class for objects with additional parameters.
Definition of vehicle stop (position and duration)
virtual void closeRoute(const bool mayBeDisconnected=false)=0
Parser for routes during their loading.
static bool checkStopPos(double &startPos, double &endPos, const double laneLength, const double minLength, const bool friendlyPos)
check start and end position of a stop
std::vector< SUMOVehicleParameter::Stop > myActiveRouteStops
List of the stops on the parsed route.
Structure representing possible vehicle parameter.
virtual void myStartElement(int element, const SUMOSAXAttributes &attrs)
Called on the opening of a tag;.
virtual void closeVehicleTypeDistribution()=0
closes (ends) the building of a distribution
SUMOTime myLastDepart
The insertion time of the vehicle read last.
bool parseStop(SUMOVehicleParameter::Stop &stop, const SUMOSAXAttributes &attrs, std::string errorSuffix, MsgHandler *const errorOutput)
parses attributes common to all stops
virtual void closeRouteDistribution()=0
closes (ends) the building of a distribution
Parameterised myLoadedParameterised
Parameterised used for saving loaded generic parameters that aren't saved in Vehicles or Vehicle Type...
virtual void closeFlow()=0
Ends the processing of a flow.
const RGBColor * myActiveRouteColor
The currently parsed route's color.
double myCurrentCosts
The currently parsed route costs.
virtual void closePerson()=0
Ends the processing of a person.
virtual void openFlow(const SUMOSAXAttributes &attrs)=0
opens a flow for reading
const bool myHardFail
flag to enable or disable hard fails
virtual void addPerson(const SUMOSAXAttributes &attrs)=0
Processing of a person.
virtual void addWalk(const SUMOSAXAttributes &attrs)=0
add a fully specified walk
bool checkLastDepart()
Checks whether the route file is sorted by departure time if needed.
std::string myActiveRouteRefID
The id of the route the current route references to.
virtual void openRoute(const SUMOSAXAttributes &attrs)=0
opens a route for reading
SUMORouteHandler(const std::string &file, const std::string &expectedRoot, const bool hardFail)
standard constructor