20 #ifndef GNEAdditionalHandler_h 21 #define GNEAdditionalHandler_h 213 static bool buildBusStop(
GNEViewNet* viewNet,
const std::string&
id,
GNELane* lane,
double startPos,
double endPos,
const std::vector<std::string>& lines);
240 static bool buildChargingStation(
GNEViewNet* viewNet,
const std::string&
id,
GNELane* lane,
double startPos,
double endPos,
double chargingPower,
double efficiency,
bool chargeInTransit,
double chargeDelay);
253 static bool buildDetectorE1(
GNEViewNet* viewNet,
const std::string&
id,
GNELane* lane,
double pos,
double freq,
const std::string& filename,
bool splitByType);
271 bool cont,
const double timeThreshold,
double speedThreshold,
double jamThreshold);
284 static bool buildDetectorE3(
GNEViewNet* viewNet,
const std::string&
id,
Position pos,
double freq,
const std::string& filename,
const double timeThreshold,
double speedThreshold);
321 const std::vector<GNECalibratorRoute>& calibratorRoutes,
const std::vector<GNECalibratorFlow>& calibratorFlows,
322 const std::vector<GNECalibratorVehicleType>& calibratorVehicleTypes);
333 static bool buildRerouter(
GNEViewNet* viewNet,
const std::string&
id,
Position pos,
const std::vector<GNEEdge*>& edges,
double prob,
const std::string& file,
bool off);
356 static bool buildVariableSpeedSign(
GNEViewNet* viewNet,
const std::string&
id,
Position pos,
const std::vector<GNELane*>& destLanes,
const std::string& file,
const std::vector<GNEVariableSpeedSignStep>& steps);
394 bool checkStopPos(
double& startPos,
double& endPos,
const double laneLength,
const double minLength,
const bool friendlyPos);
void parseVariableSpeedSignStep(const SUMOSAXAttributes &attrs, const SumoXMLTag &tag)
Parses step values of VariableSpeedSigns.
SumoXMLTag
Numbers representing SUMO-XML - element names.
void parseCalibratorVehicleType(const SUMOSAXAttributes &attrs, const SumoXMLTag &tag)
Parses vehicle type values of Calibrators.
void parseCalibratorFlow(const SUMOSAXAttributes &attrs, const SumoXMLTag &tag)
Parses flow values of Calibrators.
void parseAndBuildDetectorE1(const SUMOSAXAttributes &attrs, const SumoXMLTag &tag)
Parses his values and builds a induction loop detector (E1)
static bool buildRouteProbe(GNEViewNet *viewNet, const std::string &id, GNEEdge *edge, double freq, const std::string &file, double begin)
builds a Route probe
void myStartElement(int element, const SUMOSAXAttributes &attrs)
Called on the opening of a tag;.
static bool buildVariableSpeedSign(GNEViewNet *viewNet, const std::string &id, Position pos, const std::vector< GNELane *> &destLanes, const std::string &file, const std::vector< GNEVariableSpeedSignStep > &steps)
Builds a VariableSpeedSign (lane speed trigger)
void parseAndBuildChargingStation(const SUMOSAXAttributes &attrs, const SumoXMLTag &tag)
Parses his values and builds a charging station.
const std::string & getFileName() const
returns the current file name
static bool buildDetectorE2(GNEViewNet *viewNet, const std::string &id, GNELane *lane, double pos, double length, double freq, const std::string &filename, bool cont, const double timeThreshold, double speedThreshold, double jamThreshold)
Builds a lane Area Detector (E2)
GNEAdditionalHandler(const std::string &file, GNEViewNet *viewNet)
Constructor.
static bool buildAdditional(GNEViewNet *viewNet, SumoXMLTag tag, std::map< SumoXMLAttr, std::string > values)
Build additionals.
void parseAndBuildDetectorExit(const SUMOSAXAttributes &attrs, const SumoXMLTag &tag)
Parses his values and builds a Exit detector.
A NBNetBuilder extended by visualisation and editing capabilities.
This lane is powered by an underlying GNEEdge and basically knows how to draw itself.
static bool buildBusStop(GNEViewNet *viewNet, const std::string &id, GNELane *lane, double startPos, double endPos, const std::vector< std::string > &lines)
Builds a bus stop.
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
std::vector< GNECalibratorVehicleType > myLoadingCalibratorVehicleTypes
vector in wich save calibratorVehicleTypes during loading calibrators
GNEVariableSpeedSign * myVariableSpeedSignParent
Pointer to the last inserted variableSpeedSign.
SAX-handler base for SUMO-files.
static bool buildDetectorEntry(GNEViewNet *viewNet, GNEDetectorE3 *E3Parent, GNELane *lane, double pos)
Builds a entry detector (E3)
Builds trigger objects for GNENet (busStops, chargingStations, detectors, etc..)
void parseAndBuildVariableSpeedSign(const SUMOSAXAttributes &attrs, const SumoXMLTag &tag)
Parses his values and builds a Variable Speed Signal (lane speed trigger)
void parseAndBuildDetectorE2(const SUMOSAXAttributes &attrs, const SumoXMLTag &tag)
Parses his values and builds a lane area detector (E2)
bool checkStopPos(double &startPos, double &endPos, const double laneLength, const double minLength, const bool friendlyPos)
check if the position of an stoppingPlace over a lane is valid
GNECalibratorFlow::TypeOfFlow getTypeOfFlowDistribution(std::string flowID, double vehsPerHour, double period, double probability)
get a error message, if configuration of flow distribution is invalid
bool getFriendlyPosition(const SUMOSAXAttributes &attrs, const char *objectid)
get special attribute friendly position, used in stopping places
~GNEAdditionalHandler()
Destructor.
Encapsulated SAX-Attributes.
A point in 2D or 3D with translation and scaling methods.
static bool buildContainerStop(GNEViewNet *viewNet, const std::string &id, GNELane *lane, double startPos, double endPos, const std::vector< std::string > &lines)
Builds a container stop.
void parseAndBuildRerouter(const SUMOSAXAttributes &attrs, const SumoXMLTag &tag)
Parses his values and builds a rerouter.
static bool buildVaporizer(GNEViewNet *viewNet, GNEEdge *edge, double startTime, double end)
Builds a vaporizer (lane speed trigger)
static bool buildDetectorE1(GNEViewNet *viewNet, const std::string &id, GNELane *lane, double pos, double freq, const std::string &filename, bool splitByType)
Builds a induction loop detector (E1)
bool checkAdditionalParent(SumoXMLTag currentTag)
used to check hierarchy of aditionals with parents and childs (for example, E3)
GNEViewNet * myViewNet
pointer to View's Net
GNECalibrator * myCalibratorParent
Pointer to the last inserted Calibrator.
static bool buildChargingStation(GNEViewNet *viewNet, const std::string &id, GNELane *lane, double startPos, double endPos, double chargingPower, double efficiency, bool chargeInTransit, double chargeDelay)
Builds a charging Station.
static bool buildDetectorE3(GNEViewNet *viewNet, const std::string &id, Position pos, double freq, const std::string &filename, const double timeThreshold, double speedThreshold)
Builds a multi entry exit detector (E3)
void parseAndBuildDetectorE3(const SUMOSAXAttributes &attrs, const SumoXMLTag &tag)
Parses his values and builds a multi entry exit detector (E3)
void parseAndBuildRouteProbe(const SUMOSAXAttributes &attrs, const SumoXMLTag &tag)
Parses his values and builds routeProbe.
GNEDetectorE3 * myE3Parent
Pointer to the last inserted E3.
A road/street connecting two junctions (netedit-version)
void parseAndBuildCalibrator(const SUMOSAXAttributes &attrs, const SumoXMLTag &tag)
Parses his values and builds a mesoscopic or microscopic calibrator.
void parseAndBuildBusStop(const SUMOSAXAttributes &attrs, const SumoXMLTag &tag)
Parses his values and builds a bus stop.
void parseAndBuildContainerStop(const SUMOSAXAttributes &attrs, const SumoXMLTag &tag)
Parses his values and builds a container stop.
static bool buildCalibrator(GNEViewNet *viewNet, const std::string &id, GNELane *lane, double pos, const std::string &outfile, double freq, const std::vector< GNECalibratorRoute > &calibratorRoutes, const std::vector< GNECalibratorFlow > &calibratorFlows, const std::vector< GNECalibratorVehicleType > &calibratorVehicleTypes)
builds a microscopic calibrator
static T getParsedAttribute(const SUMOSAXAttributes &attrs, const char *objectid, SumoXMLTag tag, SumoXMLAttr attribute, bool &abort, bool report=true)
get parsed attribute of XML and show warnings if there are problems
void parseAndBuildVaporizer(const SUMOSAXAttributes &attrs, const SumoXMLTag &tag)
Builds a vaporization.
void resetLastTag()
reset last Tag and clear non-valid Additionals (For example, created E3 withouts Entry/Exit childs) ...
SumoXMLTag myLastTag
last used Tag
GNERerouterInterval * rerouterIntervalToInsertValues
pointer to rerouterInterval in which insert GNEClosingReroute, GNEDestProbReroute, etc.
double getPosition(const SUMOSAXAttributes &attrs, GNELane &lane, const std::string &tt, const std::string &tid)
extracts the position, checks whether it shall be mirrored and checks whether it is within the lane...
void parseCalibratorRoute(const SUMOSAXAttributes &attrs, const SumoXMLTag &tag)
Parses route values of Calibrators.
void parseAndBuildDetectorEntry(const SUMOSAXAttributes &attrs, const SumoXMLTag &tag)
Parses his values and builds a Entry detector.
static bool buildDetectorExit(GNEViewNet *viewNet, GNEDetectorE3 *E3Parent, GNELane *lane, double pos)
Builds a exit detector (E3)
static bool buildRerouter(GNEViewNet *viewNet, const std::string &id, Position pos, const std::vector< GNEEdge *> &edges, double prob, const std::string &file, bool off)
builds a rerouter