20 #ifndef SUMOVehicleParserHelper_h 21 #define SUMOVehicleParserHelper_h 81 const bool optionalID =
false,
const bool skipDepart =
false,
const bool isPerson =
false);
106 const bool fromVType =
false);
148 static double parseWalkPos(
SumoXMLAttr attr,
const std::string&
id,
double maxPos,
const std::string& val, std::mt19937* rng = 0);
175 typedef std::map<SumoXMLTag, std::set<SumoXMLAttr> >
CFAttrMap;
176 typedef std::map<LaneChangeModel, std::set<SumoXMLAttr> >
LCAttrMap;
SumoXMLTag
Numbers representing SUMO-XML - element names.
static std::set< SumoXMLAttr > allowedJMAttrs
static SUMOVehicleShape parseGuiShape(const SUMOSAXAttributes &attrs, const std::string &id)
Parses the vehicle class.
SUMOVehicleClass
Definition of vehicle classes to differ between different lane usage and authority types...
Structure representing possible vehicle parameter.
static SUMOVehicleParameter * parseVehicleAttributes(const SUMOSAXAttributes &attrs, const bool optionalID=false, const bool skipDepart=false, const bool isPerson=false)
Parses a vehicle's attributes.
static void parseVTypeEmbedded(SUMOVTypeParameter &into, const SumoXMLTag element, const SUMOSAXAttributes &attrs, const bool fromVType=false)
Parses an element embedded in vtype definition.
static SUMOTime processActionStepLength(double given)
Checks and converts given value for the action step length from seconds to miliseconds assuring it be...
static LCAttrMap allowedLCModelAttrs
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
static double parseWalkPos(SumoXMLAttr attr, const std::string &id, double maxPos, const std::string &val, std::mt19937 *rng=0)
parse departPos or arrivalPos for a walk
static SUMOVehicleClass parseVehicleClass(const SUMOSAXAttributes &attrs, const std::string &id)
Parses the vehicle class.
static void parseLCParams(SUMOVTypeParameter &into, LaneChangeModel model, const SUMOSAXAttributes &attrs)
Parses lane change model attributes.
static const CFAttrMap & getAllowedCFModelAttrs()
Encapsulated SAX-Attributes.
static SUMOVehicleParameter * parseFlowAttributes(const SUMOSAXAttributes &attrs, const SUMOTime beginDefault, const SUMOTime endDefault)
Parses a flow's attributes.
static void parseCommonAttributes(const SUMOSAXAttributes &attrs, SUMOVehicleParameter *ret, std::string element)
Parses attributes common to vehicles and flows.
std::map< SumoXMLTag, std::set< SumoXMLAttr > > CFAttrMap
Helper methods for parsing vehicle attributes.
Structure representing possible vehicle parameter.
SUMOVehicleShape
Definition of vehicle classes to differ between different appearences.
static void parseJMParams(SUMOVTypeParameter &into, const SUMOSAXAttributes &attrs)
Parses junction model attributes.
static CFAttrMap allowedCFModelAttrs
static SUMOVTypeParameter * beginVTypeParsing(const SUMOSAXAttributes &attrs, const std::string &file)
Starts to parse a vehicle type.
std::map< LaneChangeModel, std::set< SumoXMLAttr > > LCAttrMap