Eclipse SUMO - Simulation of Urban MObility
|
#include <RouteHandler.h>
Public Member Functions | |
bool | beginParseAttributes (SumoXMLTag tag, const SUMOSAXAttributes &attrs) |
begin parse attributes | |
void | endParseAttributes () |
end parse attributes | |
bool | isErrorCreatingElement () const |
get flag for check if a element wasn't created | |
void | parseSumoBaseObject (CommonXMLStructure::SumoBaseObject *obj) |
parse SumoBaseObject (it's called recursivelly) | |
RouteHandler (const std::string &filename, const bool hardFail) | |
Constructor. | |
virtual | ~RouteHandler () |
Destructor. | |
build functions | |
virtual void | buildVType (const CommonXMLStructure::SumoBaseObject *sumoBaseObject, const SUMOVTypeParameter &vTypeParameter)=0 |
build vType | |
virtual void | buildVTypeDistribution (const CommonXMLStructure::SumoBaseObject *sumoBaseObject, const std::string &id, const int deterministic, const std::vector< std::string > &vTypeIDs, const std::vector< double > &probabilities)=0 |
build vType distribution | |
virtual void | buildRoute (const CommonXMLStructure::SumoBaseObject *sumoBaseObject, const std::string &id, SUMOVehicleClass vClass, const std::vector< std::string > &edgeIDs, const RGBColor &color, const int repeat, const SUMOTime cycleTime, const double probability, const Parameterised::Map &routeParameters)=0 |
build route | |
virtual void | buildEmbeddedRoute (const CommonXMLStructure::SumoBaseObject *sumoBaseObject, const std::vector< std::string > &edgeIDs, const RGBColor &color, const int repeat, const SUMOTime cycleTime, const Parameterised::Map &routeParameters)=0 |
build embedded route | |
virtual void | buildRouteDistribution (const CommonXMLStructure::SumoBaseObject *sumoBaseObject, const std::string &id, const std::vector< std::string > &vTypeIDs, const std::vector< double > &probabilities)=0 |
build route distribution | |
virtual void | buildVehicleOverRoute (const CommonXMLStructure::SumoBaseObject *sumoBaseObject, const SUMOVehicleParameter &vehicleParameters)=0 |
build a vehicle over an existent route | |
virtual void | buildFlowOverRoute (const CommonXMLStructure::SumoBaseObject *sumoBaseObject, const SUMOVehicleParameter &vehicleParameters)=0 |
build a flow over an existent route | |
virtual void | buildTrip (const CommonXMLStructure::SumoBaseObject *sumoBaseObject, const SUMOVehicleParameter &vehicleParameters, const std::string &fromEdgeID, const std::string &toEdgeID)=0 |
build trip (from-to edges) | |
virtual void | buildTripJunctions (const CommonXMLStructure::SumoBaseObject *sumoBaseObject, const SUMOVehicleParameter &vehicleParameters, const std::string &fromJunctionID, const std::string &toJunctionID)=0 |
build trip (from-to junctions) | |
virtual void | buildTripTAZs (const CommonXMLStructure::SumoBaseObject *sumoBaseObject, const SUMOVehicleParameter &vehicleParameters, const std::string &fromTazID, const std::string &toTazID)=0 |
build trip (from-to TAZs) | |
virtual void | buildFlow (const CommonXMLStructure::SumoBaseObject *sumoBaseObject, const SUMOVehicleParameter &vehicleParameters, const std::string &fromEdgeID, const std::string &toEdgeID)=0 |
build flow (from-to edges) | |
virtual void | buildFlowJunctions (const CommonXMLStructure::SumoBaseObject *sumoBaseObject, const SUMOVehicleParameter &vehicleParameters, const std::string &fromJunctionID, const std::string &toJunctionID)=0 |
build flow (from-to junctions) | |
virtual void | buildFlowTAZs (const CommonXMLStructure::SumoBaseObject *sumoBaseObject, const SUMOVehicleParameter &vehicleParameters, const std::string &fromTAZID, const std::string &toTAZID)=0 |
build flow (from-to TAZs) | |
virtual void | buildPerson (const CommonXMLStructure::SumoBaseObject *sumoBaseObject, const SUMOVehicleParameter &personParameters)=0 |
build person | |
virtual void | buildPersonFlow (const CommonXMLStructure::SumoBaseObject *sumoBaseObject, const SUMOVehicleParameter &personFlowParameters)=0 |
build person flow | |
virtual void | buildPersonTrip (const CommonXMLStructure::SumoBaseObject *sumoBaseObject, const CommonXMLStructure::PlanParameters &planParameters, const double arrivalPos, const std::vector< std::string > &types, const std::vector< std::string > &modes, const std::vector< std::string > &lines, const double walkFactor, const std::string &group)=0 |
build person trip | |
virtual void | buildWalk (const CommonXMLStructure::SumoBaseObject *sumoBaseObject, const CommonXMLStructure::PlanParameters &planParameters, const double arrivalPos, const double speed, const SUMOTime duration)=0 |
build walk | |
virtual void | buildRide (const CommonXMLStructure::SumoBaseObject *sumoBaseObject, const CommonXMLStructure::PlanParameters &planParameters, const double arrivalPos, const std::vector< std::string > &lines, const std::string &group)=0 |
build ride | |
virtual void | buildContainer (const CommonXMLStructure::SumoBaseObject *sumoBaseObject, const SUMOVehicleParameter &containerParameters)=0 |
build container | |
virtual void | buildContainerFlow (const CommonXMLStructure::SumoBaseObject *sumoBaseObject, const SUMOVehicleParameter &containerFlowParameters)=0 |
build container flow | |
virtual void | buildTransport (const CommonXMLStructure::SumoBaseObject *sumoBaseObject, const CommonXMLStructure::PlanParameters &planParameters, const double arrivalPos, const std::vector< std::string > &lines, const std::string &group)=0 |
build transport | |
virtual void | buildTranship (const CommonXMLStructure::SumoBaseObject *sumoBaseObject, const CommonXMLStructure::PlanParameters &planParameters, const double arrivalPosition, const double departPosition, const double speed, const SUMOTime duration)=0 |
build tranship | |
virtual void | buildStop (const CommonXMLStructure::SumoBaseObject *sumoBaseObject, const CommonXMLStructure::PlanParameters &planParameters, const SUMOVehicleParameter::Stop &stopParameters)=0 |
build stop | |
Protected Member Functions | |
void | writeError (const std::string &error) |
write error and enable error creating element | |
Private Member Functions | |
void | checkParent (const SumoXMLTag currentTag, const std::vector< SumoXMLTag > &parentTags, bool &ok) |
check parents | |
bool | isEmbeddedRoute (const SUMOSAXAttributes &attrs) const |
check embedded route | |
RouteHandler & | operator= (const RouteHandler &s)=delete |
invalidate assignment operator | |
bool | parseStopParameters (SUMOVehicleParameter::Stop &stop, const SUMOSAXAttributes &attrs) |
parse stop parameters | |
RouteHandler (const RouteHandler &s)=delete | |
invalidate copy constructor | |
void | writeErrorInvalidDistribution (const SumoXMLTag tag, const std::string &id) |
write error "invalid distribution" | |
void | writeErrorInvalidID (const SumoXMLTag tag, const std::string &id) |
write error "invalid id" | |
parse route element attributes | |
parse vType | |
void | parseVType (const SUMOSAXAttributes &attrs) |
void | parseVTypeDistribution (const SUMOSAXAttributes &attrs) |
parse vType distribution | |
void | parseRoute (const SUMOSAXAttributes &attrs) |
parse route | |
void | parseRouteDistribution (const SUMOSAXAttributes &attrs) |
parse route distribution | |
void | parseTrip (const SUMOSAXAttributes &attrs) |
parse trip | |
void | parseVehicle (const SUMOSAXAttributes &attrs) |
parse vehicle (including vehicles over routes and vehicles with embedded routes) | |
void | parseFlow (const SUMOSAXAttributes &attrs) |
parse flow (including flows, flows over routes and flows with embedded routes) | |
void | parseStop (const SUMOSAXAttributes &attrs) |
parse stop | |
void | parsePerson (const SUMOSAXAttributes &attrs) |
parse person | |
void | parsePersonFlow (const SUMOSAXAttributes &attrs) |
parse person flow | |
void | parsePersonTrip (const SUMOSAXAttributes &attrs) |
parse person trip | |
void | parseWalk (const SUMOSAXAttributes &attrs) |
parse walk | |
void | parseRide (const SUMOSAXAttributes &attrs) |
parse ride | |
void | parseContainer (const SUMOSAXAttributes &attrs) |
parse container | |
void | parseContainerFlow (const SUMOSAXAttributes &attrs) |
parse container flow | |
void | parseTransport (const SUMOSAXAttributes &attrs) |
parse transport | |
void | parseTranship (const SUMOSAXAttributes &attrs) |
parse tranship | |
void | parseInterval (const SUMOSAXAttributes &attrs) |
parse interval | |
void | parseParameters (const SUMOSAXAttributes &attrs) |
parse generic parameters | |
bool | parseNestedCFM (const SumoXMLTag tag, const SUMOSAXAttributes &attrs, CommonXMLStructure::SumoBaseObject *vTypeObject) |
parse nested CarFollowingModel | |
Private Attributes | |
CommonXMLStructure | myCommonXMLStructure |
common XML Structure | |
bool | myErrorCreatingElement = false |
flag for check if a element wasn't created | |
const std::string | myFilename |
filename (needed for parsing vTypes) | |
SUMOTime | myFlowBeginDefault |
The default value for flow begins. | |
SUMOTime | myFlowEndDefault |
The default value for flow ends. | |
const bool | myHardFail |
enable or disable hardFail (stop parsing if parameter aren't correct) | |
Definition at line 30 of file RouteHandler.h.
RouteHandler::RouteHandler | ( | const std::string & | filename, |
const bool | hardFail | ||
) |
Constructor.
[in] | filename | Name of the parsed file |
[in] | hardFail | enable or disable hardFails (continue handling demand elements if there is an error) |
Definition at line 39 of file RouteHandler.cpp.
|
virtual |
Destructor.
Definition at line 47 of file RouteHandler.cpp.
|
privatedelete |
invalidate copy constructor
bool RouteHandler::beginParseAttributes | ( | SumoXMLTag | tag, |
const SUMOSAXAttributes & | attrs | ||
) |
begin parse attributes
Definition at line 51 of file RouteHandler.cpp.
References CommonXMLStructure::abortSUMOBaseOBject(), CommonXMLStructure::getCurrentSumoBaseObject(), CommonXMLStructure::SumoBaseObject::getParentSumoBaseObject(), myCommonXMLStructure, CommonXMLStructure::openSUMOBaseOBject(), parseContainer(), parseContainerFlow(), parseFlow(), parseInterval(), parseNestedCFM(), parseParameters(), parsePerson(), parsePersonFlow(), parsePersonTrip(), parseRide(), parseRoute(), parseRouteDistribution(), parseStop(), parseTranship(), parseTransport(), parseTrip(), parseVehicle(), parseVType(), parseVTypeDistribution(), parseWalk(), SUMO_TAG_CONTAINER, SUMO_TAG_CONTAINERFLOW, 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, and WRITE_ERROR.
Referenced by GNEGeneralHandler::beginTag().
|
pure virtual |
build container
Implemented in GNERouteHandler.
Referenced by parseSumoBaseObject().
|
pure virtual |
build container flow
Implemented in GNERouteHandler.
Referenced by parseSumoBaseObject().
|
pure virtual |
build embedded route
Implemented in GNERouteHandler.
Referenced by parseSumoBaseObject().
|
pure virtual |
build flow (from-to edges)
Implemented in GNERouteHandler.
Referenced by parseSumoBaseObject().
|
pure virtual |
build flow (from-to junctions)
Implemented in GNERouteHandler.
Referenced by parseSumoBaseObject().
|
pure virtual |
build a flow over an existent route
Implemented in GNERouteHandler.
Referenced by parseSumoBaseObject().
|
pure virtual |
build flow (from-to TAZs)
Implemented in GNERouteHandler.
Referenced by parseSumoBaseObject().
|
pure virtual |
build person
Implemented in GNERouteHandler.
Referenced by parseSumoBaseObject().
|
pure virtual |
build person flow
Implemented in GNERouteHandler.
Referenced by parseSumoBaseObject().
|
pure virtual |
build person trip
Implemented in GNERouteHandler.
Referenced by parseSumoBaseObject().
|
pure virtual |
build ride
Implemented in GNERouteHandler.
Referenced by parseSumoBaseObject().
|
pure virtual |
build route
Implemented in GNERouteHandler.
Referenced by parseSumoBaseObject().
|
pure virtual |
build route distribution
Implemented in GNERouteHandler.
Referenced by parseSumoBaseObject().
|
pure virtual |
build stop
Implemented in GNERouteHandler.
Referenced by parseSumoBaseObject().
|
pure virtual |
build tranship
Implemented in GNERouteHandler.
Referenced by parseSumoBaseObject().
|
pure virtual |
build transport
Implemented in GNERouteHandler.
Referenced by parseSumoBaseObject().
|
pure virtual |
build trip (from-to edges)
Implemented in GNERouteHandler.
Referenced by parseSumoBaseObject().
|
pure virtual |
build trip (from-to junctions)
Implemented in GNERouteHandler.
Referenced by parseSumoBaseObject().
|
pure virtual |
build trip (from-to TAZs)
Implemented in GNERouteHandler.
Referenced by parseSumoBaseObject().
|
pure virtual |
build a vehicle over an existent route
Implemented in GNERouteHandler.
Referenced by parseSumoBaseObject().
|
pure virtual |
build vType
Implemented in GNERouteHandler.
Referenced by parseSumoBaseObject().
|
pure virtual |
build vType distribution
Implemented in GNERouteHandler.
Referenced by parseSumoBaseObject().
|
pure virtual |
build walk
Implemented in GNERouteHandler.
Referenced by parseSumoBaseObject().
|
private |
check parents
Definition at line 1168 of file RouteHandler.cpp.
References CommonXMLStructure::getCurrentSumoBaseObject(), CommonXMLStructure::SumoBaseObject::getParentSumoBaseObject(), CommonXMLStructure::SumoBaseObject::getStringAttribute(), CommonXMLStructure::SumoBaseObject::getTag(), CommonXMLStructure::SumoBaseObject::hasStringAttribute(), myCommonXMLStructure, SUMO_ATTR_ID, toString(), and writeError().
Referenced by parseStop().
void RouteHandler::endParseAttributes | ( | ) |
end parse attributes
Definition at line 147 of file RouteHandler.cpp.
References CommonXMLStructure::closeSUMOBaseOBject(), CommonXMLStructure::getCurrentSumoBaseObject(), CommonXMLStructure::SumoBaseObject::getParentSumoBaseObject(), CommonXMLStructure::SumoBaseObject::getStringAttribute(), CommonXMLStructure::SumoBaseObject::getTag(), myCommonXMLStructure, parseSumoBaseObject(), SUMO_ATTR_ID, SUMO_TAG_CONTAINER, SUMO_TAG_CONTAINERFLOW, SUMO_TAG_FLOW, SUMO_TAG_NOTHING, SUMO_TAG_PERSON, SUMO_TAG_PERSONFLOW, SUMO_TAG_ROUTE, SUMO_TAG_ROUTE_DISTRIBUTION, SUMO_TAG_TRIP, SUMO_TAG_VEHICLE, SUMO_TAG_VTYPE, and SUMO_TAG_VTYPE_DISTRIBUTION.
Referenced by GNEGeneralHandler::endTag().
|
private |
check embedded route
Definition at line 1149 of file RouteHandler.cpp.
References CommonXMLStructure::getCurrentSumoBaseObject(), CommonXMLStructure::SumoBaseObject::getParentSumoBaseObject(), CommonXMLStructure::SumoBaseObject::getTag(), SUMOSAXAttributes::hasAttribute(), CommonXMLStructure::SumoBaseObject::hasStringAttribute(), myCommonXMLStructure, SUMO_ATTR_ID, SUMO_ATTR_ROUTE, SUMO_TAG_FLOW, and SUMO_TAG_VEHICLE.
Referenced by parseRoute().
bool RouteHandler::isErrorCreatingElement | ( | ) | const |
get flag for check if a element wasn't created
Definition at line 377 of file RouteHandler.cpp.
References myErrorCreatingElement.
Referenced by GNEGeneralHandler::isErrorCreatingElement().
|
privatedelete |
invalidate assignment operator
|
private |
parse container
Definition at line 805 of file RouteHandler.cpp.
References CommonXMLStructure::getCurrentSumoBaseObject(), myCommonXMLStructure, myHardFail, SUMOVehicleParserHelper::parseVehicleAttributes(), CommonXMLStructure::SumoBaseObject::setTag(), CommonXMLStructure::SumoBaseObject::setVehicleParameter(), and SUMO_TAG_CONTAINER.
Referenced by beginParseAttributes().
|
private |
parse container flow
Definition at line 820 of file RouteHandler.cpp.
References CommonXMLStructure::getCurrentSumoBaseObject(), myCommonXMLStructure, myFlowBeginDefault, myFlowEndDefault, myHardFail, SUMOVehicleParserHelper::parseFlowAttributes(), CommonXMLStructure::SumoBaseObject::setTag(), CommonXMLStructure::SumoBaseObject::setVehicleParameter(), and SUMO_TAG_CONTAINERFLOW.
Referenced by beginParseAttributes().
|
private |
parse flow (including flows, flows over routes and flows with embedded routes)
Definition at line 591 of file RouteHandler.cpp.
References CommonXMLStructure::SumoBaseObject::addStringAttribute(), CommonXMLStructure::SumoBaseObject::addStringListAttribute(), SUMOSAXAttributes::get(), CommonXMLStructure::getCurrentSumoBaseObject(), SUMOSAXAttributes::getOpt(), SUMOSAXAttributes::hasAttribute(), SUMOVehicleParameter::id, myCommonXMLStructure, myFlowBeginDefault, myFlowEndDefault, myHardFail, SUMOVehicleParserHelper::parseFlowAttributes(), CommonXMLStructure::SumoBaseObject::setTag(), CommonXMLStructure::SumoBaseObject::setVehicleParameter(), SUMO_ATTR_FROM, SUMO_ATTR_FROM_JUNCTION, SUMO_ATTR_FROM_TAZ, SUMO_ATTR_ROUTE, SUMO_ATTR_TO, SUMO_ATTR_TO_JUNCTION, SUMO_ATTR_TO_TAZ, SUMO_ATTR_VIA, SUMO_TAG_FLOW, TL, and writeError().
Referenced by beginParseAttributes().
|
private |
parse interval
Definition at line 885 of file RouteHandler.cpp.
References SUMOSAXAttributes::getSUMOTimeReporting(), myFlowBeginDefault, myFlowEndDefault, SUMO_ATTR_BEGIN, and SUMO_ATTR_END.
Referenced by beginParseAttributes().
|
private |
parse nested CarFollowingModel
Definition at line 929 of file RouteHandler.cpp.
References CommonXMLStructure::SumoBaseObject::getStringAttribute(), CommonXMLStructure::SumoBaseObject::getVehicleTypeParameter(), myHardFail, SUMOVehicleParserHelper::parseCFMParams(), CommonXMLStructure::SumoBaseObject::setVehicleTypeParameter(), SUMO_ATTR_ID, TL, WRITE_WARNINGF, and writeError().
Referenced by beginParseAttributes().
|
private |
parse generic parameters
Definition at line 895 of file RouteHandler.cpp.
References SUMOSAXAttributes::get(), CommonXMLStructure::getCurrentSumoBaseObject(), CommonXMLStructure::SumoBaseObject::getParentSumoBaseObject(), SUMOSAXAttributes::getString(), SUMOSAXAttributes::hasAttribute(), SUMOXMLDefinitions::isValidParameterKey(), myCommonXMLStructure, SUMO_ATTR_KEY, SUMO_ATTR_VALUE, SUMO_TAG_PARAM, SUMO_TAG_ROOTFILE, TL, toString(), WRITE_DEBUG, WRITE_WARNINGF, and writeError().
Referenced by beginParseAttributes().
|
private |
parse person
Definition at line 687 of file RouteHandler.cpp.
References CommonXMLStructure::getCurrentSumoBaseObject(), myCommonXMLStructure, myHardFail, SUMOVehicleParserHelper::parseVehicleAttributes(), CommonXMLStructure::SumoBaseObject::setTag(), CommonXMLStructure::SumoBaseObject::setVehicleParameter(), and SUMO_TAG_PERSON.
Referenced by beginParseAttributes().
|
private |
parse person flow
Definition at line 702 of file RouteHandler.cpp.
References CommonXMLStructure::getCurrentSumoBaseObject(), myCommonXMLStructure, myFlowBeginDefault, myFlowEndDefault, myHardFail, SUMOVehicleParserHelper::parseFlowAttributes(), CommonXMLStructure::SumoBaseObject::setTag(), CommonXMLStructure::SumoBaseObject::setVehicleParameter(), and SUMO_TAG_PERSONFLOW.
Referenced by beginParseAttributes().
|
private |
parse person trip
Definition at line 717 of file RouteHandler.cpp.
References CommonXMLStructure::SumoBaseObject::addDoubleAttribute(), CommonXMLStructure::SumoBaseObject::addStringAttribute(), CommonXMLStructure::SumoBaseObject::addStringListAttribute(), CommonXMLStructure::getCurrentSumoBaseObject(), SUMOSAXAttributes::getOpt(), myCommonXMLStructure, SUMOVehicleParameter::parsePersonModes(), CommonXMLStructure::SumoBaseObject::setPlanParameters(), CommonXMLStructure::SumoBaseObject::setTag(), SUMO_ATTR_ARRIVALPOS, SUMO_ATTR_DEPARTPOS, SUMO_ATTR_GROUP, SUMO_ATTR_LINES, SUMO_ATTR_MODES, SUMO_ATTR_VIA, SUMO_ATTR_VTYPES, SUMO_ATTR_WALKFACTOR, SUMO_TAG_PERSONTRIP, toString(), and WRITE_WARNING.
Referenced by beginParseAttributes().
|
private |
parse ride
Definition at line 783 of file RouteHandler.cpp.
References CommonXMLStructure::SumoBaseObject::addDoubleAttribute(), CommonXMLStructure::SumoBaseObject::addStringAttribute(), CommonXMLStructure::SumoBaseObject::addStringListAttribute(), CommonXMLStructure::getCurrentSumoBaseObject(), SUMOSAXAttributes::getOpt(), myCommonXMLStructure, CommonXMLStructure::SumoBaseObject::setPlanParameters(), CommonXMLStructure::SumoBaseObject::setTag(), SUMO_ATTR_ARRIVALPOS, SUMO_ATTR_GROUP, SUMO_ATTR_LINES, and SUMO_TAG_RIDE.
Referenced by beginParseAttributes().
|
private |
parse route
Definition at line 447 of file RouteHandler.cpp.
References CommonXMLStructure::SumoBaseObject::addColorAttribute(), CommonXMLStructure::SumoBaseObject::addDoubleAttribute(), CommonXMLStructure::SumoBaseObject::addIntAttribute(), CommonXMLStructure::SumoBaseObject::addStringAttribute(), CommonXMLStructure::SumoBaseObject::addStringListAttribute(), CommonXMLStructure::SumoBaseObject::addTimeAttribute(), SUMOSAXAttributes::get(), CommonXMLStructure::getCurrentSumoBaseObject(), SUMOSAXAttributes::getOpt(), SUMOSAXAttributes::getOptSUMOTimeReporting(), SUMOSAXAttributes::hasAttribute(), RGBColor::INVISIBLE, isEmbeddedRoute(), SUMOXMLDefinitions::isValidVehicleID(), myCommonXMLStructure, SUMOVehicleParserHelper::parseVehicleClass(), CommonXMLStructure::SumoBaseObject::setTag(), CommonXMLStructure::SumoBaseObject::setVClass(), SUMO_ATTR_COLOR, SUMO_ATTR_CYCLETIME, SUMO_ATTR_EDGES, SUMO_ATTR_ID, SUMO_ATTR_PROB, SUMO_ATTR_REPEAT, SUMO_TAG_DEST_PROB_REROUTE, SUMO_TAG_ROUTE, TL, TLF, toString(), writeError(), and writeErrorInvalidID().
Referenced by beginParseAttributes().
|
private |
parse route distribution
Definition at line 489 of file RouteHandler.cpp.
References CommonXMLStructure::SumoBaseObject::addDoubleListAttribute(), CommonXMLStructure::SumoBaseObject::addStringAttribute(), CommonXMLStructure::SumoBaseObject::addStringListAttribute(), SUMOSAXAttributes::get(), CommonXMLStructure::getCurrentSumoBaseObject(), SUMOSAXAttributes::getOpt(), SUMOXMLDefinitions::isValidVehicleID(), myCommonXMLStructure, CommonXMLStructure::SumoBaseObject::setTag(), SUMO_ATTR_ID, SUMO_ATTR_PROBS, SUMO_ATTR_ROUTES, SUMO_TAG_ROUTE_DISTRIBUTION, writeErrorInvalidDistribution(), and writeErrorInvalidID().
Referenced by beginParseAttributes().
|
private |
parse stop
Definition at line 660 of file RouteHandler.cpp.
References checkParent(), NamespaceIDs::containers, CommonXMLStructure::getCurrentSumoBaseObject(), myCommonXMLStructure, parseStopParameters(), NamespaceIDs::persons, NamespaceIDs::routes, CommonXMLStructure::SumoBaseObject::setPlanParameters(), CommonXMLStructure::SumoBaseObject::setStopParameter(), CommonXMLStructure::SumoBaseObject::setTag(), SUMO_TAG_STOP, and NamespaceIDs::vehicles.
Referenced by beginParseAttributes().
|
private |
parse stop parameters
Definition at line 949 of file RouteHandler.cpp.
References SUMOVehicleParameter::Stop::actType, SUMOVehicleParameter::Stop::arrival, SUMOVehicleParameter::Stop::awaitedContainers, SUMOVehicleParameter::Stop::awaitedPersons, SUMOVehicleParameter::Stop::busstop, SUMOVehicleParameter::Stop::chargingStation, SUMOVehicleParameter::Stop::containerstop, SUMOVehicleParameter::Stop::containerTriggered, SUMOVehicleParameter::Stop::duration, SUMOVehicleParameter::Stop::edge, SUMOVehicleParameter::Stop::ended, SUMOVehicleParameter::Stop::endPos, SUMOVehicleParameter::Stop::extension, SUMOVehicleParameter::Stop::friendlyPos, SUMOSAXAttributes::get(), SUMOSAXAttributes::getOpt(), SUMOSAXAttributes::getOptSUMOTimeReporting(), SUMOSAXAttributes::hasAttribute(), SUMOVehicleParameter::Stop::index, INVALID_DOUBLE, SUMOVehicleParameter::Stop::join, SUMOVehicleParameter::Stop::jump, SUMOVehicleParameter::Stop::lane, SUMOVehicleParameter::Stop::line, OFFROAD, SUMOVehicleParameter::Stop::onDemand, ONROAD, SUMOVehicleParameter::Stop::overheadWireSegment, SUMOVehicleParameter::Stop::parametersSet, SUMOVehicleParameter::Stop::parking, SUMOVehicleParameter::Stop::parkingarea, SUMOVehicleParameter::parseStopTriggers(), SUMOVehicleParameter::Stop::permitted, SUMOVehicleParameter::Stop::posLat, SUMOVehicleParameter::Stop::speed, SUMOVehicleParameter::Stop::split, SUMOVehicleParameter::Stop::started, SUMOVehicleParameter::Stop::startPos, STOP_ARRIVAL_SET, STOP_CONTAINER_TRIGGER_SET, STOP_DURATION_SET, STOP_END_SET, STOP_ENDED_SET, STOP_EXPECTED_CONTAINERS_SET, STOP_EXPECTED_SET, STOP_EXTENSION_SET, STOP_INDEX_END, STOP_INDEX_FIT, STOP_JOIN_SET, STOP_JUMP_SET, STOP_LINE_SET, STOP_ONDEMAND_SET, STOP_PARKING_SET, STOP_PERMITTED_SET, STOP_POSLAT_SET, STOP_SPEED_SET, STOP_SPLIT_SET, STOP_START_SET, STOP_STARTED_SET, STOP_TRIGGER_SET, STOP_TRIP_ID_SET, STOP_UNTIL_SET, SUMO_ATTR_ACTTYPE, SUMO_ATTR_ARRIVAL, SUMO_ATTR_BUS_STOP, SUMO_ATTR_CHARGING_STATION, SUMO_ATTR_CONTAINER_STOP, SUMO_ATTR_CONTAINER_TRIGGERED, SUMO_ATTR_DURATION, SUMO_ATTR_EDGE, SUMO_ATTR_ENDED, SUMO_ATTR_ENDPOS, SUMO_ATTR_EXPECTED, SUMO_ATTR_EXPECTED_CONTAINERS, SUMO_ATTR_EXTENSION, SUMO_ATTR_FRIENDLY_POS, SUMO_ATTR_INDEX, SUMO_ATTR_JOIN, SUMO_ATTR_JUMP, SUMO_ATTR_LANE, SUMO_ATTR_LINE, SUMO_ATTR_ONDEMAND, SUMO_ATTR_OVERHEAD_WIRE_SEGMENT, SUMO_ATTR_PARKING, SUMO_ATTR_PARKING_AREA, SUMO_ATTR_PERMITTED, SUMO_ATTR_POSITION_LAT, SUMO_ATTR_SPEED, SUMO_ATTR_SPLIT, SUMO_ATTR_STARTED, SUMO_ATTR_STARTPOS, SUMO_ATTR_TRAIN_STOP, SUMO_ATTR_TRIGGERED, SUMO_ATTR_TRIP_ID, SUMO_ATTR_UNTIL, SUMO_TAG_CONTAINER, TL, toString(), SUMOVehicleParameter::Stop::triggered, SUMOVehicleParameter::Stop::tripId, SUMOVehicleParameter::Stop::until, WRITE_WARNING, and writeError().
Referenced by parseStop().
void RouteHandler::parseSumoBaseObject | ( | CommonXMLStructure::SumoBaseObject * | obj | ) |
parse SumoBaseObject (it's called recursivelly)
Definition at line 200 of file RouteHandler.cpp.
References buildContainer(), buildContainerFlow(), buildEmbeddedRoute(), buildFlow(), buildFlowJunctions(), buildFlowOverRoute(), buildFlowTAZs(), buildPerson(), buildPersonFlow(), buildPersonTrip(), buildRide(), buildRoute(), buildRouteDistribution(), buildStop(), buildTranship(), buildTransport(), buildTrip(), buildTripJunctions(), buildTripTAZs(), buildVehicleOverRoute(), buildVType(), buildVTypeDistribution(), buildWalk(), CommonXMLStructure::SumoBaseObject::getColorAttribute(), CommonXMLStructure::SumoBaseObject::getDoubleAttribute(), CommonXMLStructure::SumoBaseObject::getDoubleListAttribute(), CommonXMLStructure::SumoBaseObject::getIntAttribute(), CommonXMLStructure::SumoBaseObject::getParameters(), CommonXMLStructure::SumoBaseObject::getPlanParameters(), CommonXMLStructure::SumoBaseObject::getStopParameter(), CommonXMLStructure::SumoBaseObject::getStringAttribute(), CommonXMLStructure::SumoBaseObject::getStringListAttribute(), CommonXMLStructure::SumoBaseObject::getSumoBaseObjectChildren(), CommonXMLStructure::SumoBaseObject::getTag(), CommonXMLStructure::SumoBaseObject::getTimeAttribute(), CommonXMLStructure::SumoBaseObject::getVClass(), CommonXMLStructure::SumoBaseObject::getVehicleParameter(), CommonXMLStructure::SumoBaseObject::getVehicleTypeParameter(), CommonXMLStructure::SumoBaseObject::hasStringAttribute(), parseSumoBaseObject(), SUMO_ATTR_ARRIVALPOS, SUMO_ATTR_COLOR, SUMO_ATTR_CYCLETIME, SUMO_ATTR_DEPARTPOS, SUMO_ATTR_DETERMINISTIC, SUMO_ATTR_DURATION, SUMO_ATTR_EDGES, SUMO_ATTR_FROM, SUMO_ATTR_FROM_JUNCTION, SUMO_ATTR_FROM_TAZ, SUMO_ATTR_GROUP, SUMO_ATTR_ID, SUMO_ATTR_LINES, SUMO_ATTR_MODES, SUMO_ATTR_PROB, SUMO_ATTR_PROBS, SUMO_ATTR_REPEAT, SUMO_ATTR_ROUTE, SUMO_ATTR_ROUTES, SUMO_ATTR_SPEED, SUMO_ATTR_TO, SUMO_ATTR_TO_JUNCTION, SUMO_ATTR_TO_TAZ, SUMO_ATTR_VTYPES, SUMO_ATTR_WALKFACTOR, SUMO_TAG_CONTAINER, SUMO_TAG_CONTAINERFLOW, SUMO_TAG_FLOW, 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, and SUMO_TAG_WALK.
Referenced by GNEContainerFrame::buildContainer(), GNEPersonFrame::buildPerson(), GNEVehicleFrame::buildVehicleOverRoute(), GNERouteFrame::createPath(), GNEVehicleFrame::createPath(), endParseAttributes(), and parseSumoBaseObject().
|
private |
parse tranship
Definition at line 857 of file RouteHandler.cpp.
References CommonXMLStructure::SumoBaseObject::addDoubleAttribute(), CommonXMLStructure::SumoBaseObject::addTimeAttribute(), CommonXMLStructure::getCurrentSumoBaseObject(), SUMOSAXAttributes::getOpt(), SUMOSAXAttributes::getOptSUMOTimeReporting(), SUMOSAXAttributes::hasAttribute(), myCommonXMLStructure, CommonXMLStructure::SumoBaseObject::setPlanParameters(), CommonXMLStructure::SumoBaseObject::setTag(), SUMO_ATTR_ARRIVALPOS, SUMO_ATTR_DEPARTPOS, SUMO_ATTR_DURATION, SUMO_ATTR_SPEED, SUMO_TAG_TRANSHIP, TL, and WRITE_ERROR.
Referenced by beginParseAttributes().
|
private |
parse transport
Definition at line 835 of file RouteHandler.cpp.
References CommonXMLStructure::SumoBaseObject::addDoubleAttribute(), CommonXMLStructure::SumoBaseObject::addStringAttribute(), CommonXMLStructure::SumoBaseObject::addStringListAttribute(), CommonXMLStructure::getCurrentSumoBaseObject(), SUMOSAXAttributes::getOpt(), myCommonXMLStructure, CommonXMLStructure::SumoBaseObject::setPlanParameters(), CommonXMLStructure::SumoBaseObject::setTag(), SUMO_ATTR_ARRIVALPOS, SUMO_ATTR_GROUP, SUMO_ATTR_LINES, and SUMO_TAG_TRANSPORT.
Referenced by beginParseAttributes().
|
private |
parse trip
Definition at line 515 of file RouteHandler.cpp.
References CommonXMLStructure::SumoBaseObject::addStringAttribute(), CommonXMLStructure::SumoBaseObject::addStringListAttribute(), SUMOSAXAttributes::get(), CommonXMLStructure::getCurrentSumoBaseObject(), SUMOSAXAttributes::getOpt(), SUMOSAXAttributes::hasAttribute(), SUMOVehicleParameter::id, myCommonXMLStructure, myHardFail, SUMOVehicleParserHelper::parseVehicleAttributes(), CommonXMLStructure::SumoBaseObject::setTag(), CommonXMLStructure::SumoBaseObject::setVehicleParameter(), SUMO_ATTR_FROM, SUMO_ATTR_FROM_JUNCTION, SUMO_ATTR_FROM_TAZ, SUMO_ATTR_TO, SUMO_ATTR_TO_JUNCTION, SUMO_ATTR_TO_TAZ, SUMO_ATTR_VIA, SUMO_TAG_TRIP, TL, and writeError().
Referenced by beginParseAttributes().
|
private |
parse vehicle (including vehicles over routes and vehicles with embedded routes)
Definition at line 576 of file RouteHandler.cpp.
References CommonXMLStructure::getCurrentSumoBaseObject(), myCommonXMLStructure, myHardFail, SUMOVehicleParserHelper::parseVehicleAttributes(), CommonXMLStructure::SumoBaseObject::setTag(), CommonXMLStructure::SumoBaseObject::setVehicleParameter(), and SUMO_TAG_VEHICLE.
Referenced by beginParseAttributes().
|
private |
Definition at line 404 of file RouteHandler.cpp.
References SUMOVehicleParserHelper::beginVTypeParsing(), CommonXMLStructure::getCurrentSumoBaseObject(), myCommonXMLStructure, myFilename, myHardFail, CommonXMLStructure::SumoBaseObject::setTag(), CommonXMLStructure::SumoBaseObject::setVehicleTypeParameter(), and SUMO_TAG_VTYPE.
Referenced by beginParseAttributes().
|
private |
parse vType distribution
Definition at line 419 of file RouteHandler.cpp.
References CommonXMLStructure::SumoBaseObject::addDoubleListAttribute(), CommonXMLStructure::SumoBaseObject::addIntAttribute(), CommonXMLStructure::SumoBaseObject::addStringAttribute(), CommonXMLStructure::SumoBaseObject::addStringListAttribute(), SUMOSAXAttributes::get(), CommonXMLStructure::getCurrentSumoBaseObject(), SUMOSAXAttributes::getOpt(), SUMOXMLDefinitions::isValidVehicleID(), myCommonXMLStructure, CommonXMLStructure::SumoBaseObject::setTag(), SUMO_ATTR_DETERMINISTIC, SUMO_ATTR_ID, SUMO_ATTR_PROBS, SUMO_ATTR_VTYPES, SUMO_TAG_VTYPE_DISTRIBUTION, writeErrorInvalidDistribution(), and writeErrorInvalidID().
Referenced by beginParseAttributes().
|
private |
parse walk
Definition at line 755 of file RouteHandler.cpp.
References CommonXMLStructure::SumoBaseObject::addDoubleAttribute(), CommonXMLStructure::SumoBaseObject::addTimeAttribute(), CommonXMLStructure::getCurrentSumoBaseObject(), SUMOSAXAttributes::getOpt(), SUMOSAXAttributes::getOptSUMOTimeReporting(), SUMOSAXAttributes::hasAttribute(), myCommonXMLStructure, CommonXMLStructure::SumoBaseObject::setPlanParameters(), CommonXMLStructure::SumoBaseObject::setTag(), SUMO_ATTR_ARRIVALPOS, SUMO_ATTR_DEPARTPOS, SUMO_ATTR_DURATION, SUMO_ATTR_SPEED, SUMO_TAG_WALK, TL, and WRITE_ERROR.
Referenced by beginParseAttributes().
|
protected |
write error and enable error creating element
Definition at line 383 of file RouteHandler.cpp.
References myErrorCreatingElement, and WRITE_ERROR.
Referenced by GNERouteHandler::buildContainer(), GNERouteHandler::buildContainerFlow(), GNERouteHandler::buildEmbeddedRoute(), GNERouteHandler::buildFlow(), GNERouteHandler::buildFlowJunctions(), GNERouteHandler::buildFlowOverRoute(), GNERouteHandler::buildFlowTAZs(), GNERouteHandler::buildPerson(), GNERouteHandler::buildPersonFlow(), GNERouteHandler::buildRide(), GNERouteHandler::buildRoute(), GNERouteHandler::buildRouteDistribution(), GNERouteHandler::buildStop(), GNERouteHandler::buildTrip(), GNERouteHandler::buildTripJunctions(), GNERouteHandler::buildTripTAZs(), GNERouteHandler::buildVehicleOverRoute(), GNERouteHandler::buildVType(), GNERouteHandler::buildVTypeDistribution(), checkParent(), GNERouteHandler::getDistributionElements(), GNERouteHandler::isContainerIdDuplicated(), GNERouteHandler::isPersonIdDuplicated(), GNERouteHandler::isVehicleIdDuplicated(), GNERouteHandler::isViaAttributeValid(), GNERouteHandler::parseEdge(), GNERouteHandler::parseEdges(), parseFlow(), GNERouteHandler::parseJunction(), parseNestedCFM(), parseParameters(), parseRoute(), parseStopParameters(), GNERouteHandler::parseTAZ(), parseTrip(), and GNERouteHandler::writeErrorInvalidNegativeValue().
|
private |
write error "invalid distribution"
Definition at line 397 of file RouteHandler.cpp.
References myErrorCreatingElement, TL, toString(), and WRITE_ERRORF.
Referenced by parseRouteDistribution(), and parseVTypeDistribution().
|
private |
write error "invalid id"
Definition at line 390 of file RouteHandler.cpp.
References myErrorCreatingElement, TL, toString(), and WRITE_ERRORF.
Referenced by parseRoute(), parseRouteDistribution(), and parseVTypeDistribution().
|
private |
common XML Structure
Definition at line 165 of file RouteHandler.h.
Referenced by beginParseAttributes(), checkParent(), endParseAttributes(), isEmbeddedRoute(), parseContainer(), parseContainerFlow(), parseFlow(), parseParameters(), parsePerson(), parsePersonFlow(), parsePersonTrip(), parseRide(), parseRoute(), parseRouteDistribution(), parseStop(), parseTranship(), parseTransport(), parseTrip(), parseVehicle(), parseVType(), parseVTypeDistribution(), and parseWalk().
|
private |
flag for check if a element wasn't created
Definition at line 168 of file RouteHandler.h.
Referenced by isErrorCreatingElement(), writeError(), writeErrorInvalidDistribution(), and writeErrorInvalidID().
|
private |
filename (needed for parsing vTypes)
Definition at line 153 of file RouteHandler.h.
Referenced by parseVType().
|
private |
The default value for flow begins.
Definition at line 159 of file RouteHandler.h.
Referenced by parseContainerFlow(), parseFlow(), parseInterval(), and parsePersonFlow().
|
private |
The default value for flow ends.
Definition at line 162 of file RouteHandler.h.
Referenced by parseContainerFlow(), parseFlow(), parseInterval(), and parsePersonFlow().
|
private |
enable or disable hardFail (stop parsing if parameter aren't correct)
Definition at line 156 of file RouteHandler.h.
Referenced by parseContainer(), parseContainerFlow(), parseFlow(), parseNestedCFM(), parsePerson(), parsePersonFlow(), parseTrip(), parseVehicle(), and parseVType().