Eclipse SUMO - Simulation of Urban MObility
|
The XML-Handler for network loading. More...
#include <MeanDataHandler.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 | |
MeanDataHandler () | |
Constructor. | |
void | parseSumoBaseObject (CommonXMLStructure::SumoBaseObject *obj) |
parse SumoBaseObject (it's called recursivelly) | |
virtual | ~MeanDataHandler () |
Destructor. | |
build functions | |
Builds edgeMeanData | |
virtual void | buildEdgeMeanData (const CommonXMLStructure::SumoBaseObject *sumoBaseObject, const std::string &ID, const std::string &file, SUMOTime period, SUMOTime begin, SUMOTime end, const bool trackVehicles, const std::vector< std::string > &writtenAttributes, const bool aggregate, const std::vector< std::string > &edges, const std::string &edgeFile, std::string excludeEmpty, const bool withInternal, const std::vector< std::string > &detectPersons, const double minSamples, const double maxTravelTime, const std::vector< std::string > &vTypes, const double speedThreshold)=0 |
virtual void | buildLaneMeanData (const CommonXMLStructure::SumoBaseObject *sumoBaseObject, const std::string &ID, const std::string &file, SUMOTime period, SUMOTime begin, SUMOTime end, const bool trackVehicles, const std::vector< std::string > &writtenAttributes, const bool aggregate, const std::vector< std::string > &edges, const std::string &edgeFile, std::string excludeEmpty, const bool withInternal, const std::vector< std::string > &detectPersons, const double minSamples, const double maxTravelTime, const std::vector< std::string > &vTypes, const double speedThreshold)=0 |
Builds laneMeanData. | |
Protected Member Functions | |
void | writeError (const std::string &error) |
write error and enable error creating element | |
Private Member Functions | |
MeanDataHandler (const MeanDataHandler &s)=delete | |
invalidate copy constructor | |
MeanDataHandler & | operator= (const MeanDataHandler &s)=delete |
invalidate assignment operator | |
parse meanMeanData attributes | |
parse edgeMeanData attributes | |
void | parseEdgeMeanData (const SUMOSAXAttributes &attrs) |
void | parseLaneMeanData (const SUMOSAXAttributes &attrs) |
parse laneMeanData attributes | |
Private Attributes | |
CommonXMLStructure | myCommonXMLStructure |
common XML Structure | |
bool | myErrorCreatingElement = false |
flag for check if a element wasn't created | |
The XML-Handler for network loading.
The SAX2-handler responsible for parsing networks and routes to load. This is an extension of the MSRouteHandler as routes and vehicles may also be loaded from network descriptions.
Definition at line 38 of file MeanDataHandler.h.
MeanDataHandler::MeanDataHandler | ( | ) |
Constructor.
Definition at line 33 of file MeanDataHandler.cpp.
|
virtual |
Destructor.
Definition at line 37 of file MeanDataHandler.cpp.
|
privatedelete |
invalidate copy constructor
bool MeanDataHandler::beginParseAttributes | ( | SumoXMLTag | tag, |
const SUMOSAXAttributes & | attrs | ||
) |
begin parse attributes
Definition at line 41 of file MeanDataHandler.cpp.
References CommonXMLStructure::abortSUMOBaseOBject(), myCommonXMLStructure, CommonXMLStructure::openSUMOBaseOBject(), parseEdgeMeanData(), parseLaneMeanData(), SUMO_TAG_MEANDATA_EDGE, SUMO_TAG_MEANDATA_LANE, SUMO_TAG_PARAM, TL, WRITE_WARNING, and writeError().
Referenced by GNEGeneralHandler::beginTag().
|
pure virtual |
Implemented in GNEMeanDataHandler.
Referenced by parseSumoBaseObject().
|
pure virtual |
Builds laneMeanData.
Implemented in GNEMeanDataHandler.
Referenced by parseSumoBaseObject().
void MeanDataHandler::endParseAttributes | ( | ) |
end parse attributes
Definition at line 69 of file MeanDataHandler.cpp.
References CommonXMLStructure::closeSUMOBaseOBject(), CommonXMLStructure::getCurrentSumoBaseObject(), CommonXMLStructure::SumoBaseObject::getTag(), myCommonXMLStructure, parseSumoBaseObject(), SUMO_TAG_MEANDATA_EDGE, and SUMO_TAG_MEANDATA_LANE.
Referenced by GNEGeneralHandler::endTag().
bool MeanDataHandler::isErrorCreatingElement | ( | ) | const |
get flag for check if a element wasn't created
Definition at line 148 of file MeanDataHandler.cpp.
References myErrorCreatingElement.
Referenced by GNEGeneralHandler::isErrorCreatingElement().
|
privatedelete |
invalidate assignment operator
|
private |
Definition at line 161 of file MeanDataHandler.cpp.
References CommonXMLStructure::SumoBaseObject::addBoolAttribute(), CommonXMLStructure::SumoBaseObject::addDoubleAttribute(), CommonXMLStructure::SumoBaseObject::addStringAttribute(), CommonXMLStructure::SumoBaseObject::addStringListAttribute(), CommonXMLStructure::SumoBaseObject::addTimeAttribute(), SUMOSAXAttributes::get(), CommonXMLStructure::getCurrentSumoBaseObject(), SUMOSAXAttributes::getOpt(), SUMOSAXAttributes::getOptSUMOTimeReporting(), myCommonXMLStructure, CommonXMLStructure::SumoBaseObject::setTag(), SUMO_ATTR_AGGREGATE, SUMO_ATTR_BEGIN, SUMO_ATTR_DETECT_PERSONS, SUMO_ATTR_EDGES, SUMO_ATTR_EDGESFILE, SUMO_ATTR_END, SUMO_ATTR_EXCLUDE_EMPTY, SUMO_ATTR_FILE, SUMO_ATTR_HALTING_SPEED_THRESHOLD, SUMO_ATTR_ID, SUMO_ATTR_MAX_TRAVELTIME, SUMO_ATTR_MIN_SAMPLES, SUMO_ATTR_PERIOD, SUMO_ATTR_TRACK_VEHICLES, SUMO_ATTR_VTYPES, SUMO_ATTR_WITH_INTERNAL, SUMO_ATTR_WRITE_ATTRIBUTES, and SUMO_TAG_MEANDATA_EDGE.
Referenced by beginParseAttributes().
|
private |
parse laneMeanData attributes
Definition at line 210 of file MeanDataHandler.cpp.
References CommonXMLStructure::SumoBaseObject::addBoolAttribute(), CommonXMLStructure::SumoBaseObject::addDoubleAttribute(), CommonXMLStructure::SumoBaseObject::addStringAttribute(), CommonXMLStructure::SumoBaseObject::addStringListAttribute(), CommonXMLStructure::SumoBaseObject::addTimeAttribute(), SUMOSAXAttributes::get(), CommonXMLStructure::getCurrentSumoBaseObject(), SUMOSAXAttributes::getOpt(), SUMOSAXAttributes::getOptSUMOTimeReporting(), myCommonXMLStructure, CommonXMLStructure::SumoBaseObject::setTag(), SUMO_ATTR_AGGREGATE, SUMO_ATTR_BEGIN, SUMO_ATTR_DETECT_PERSONS, SUMO_ATTR_EDGES, SUMO_ATTR_EDGESFILE, SUMO_ATTR_END, SUMO_ATTR_EXCLUDE_EMPTY, SUMO_ATTR_FILE, SUMO_ATTR_HALTING_SPEED_THRESHOLD, SUMO_ATTR_ID, SUMO_ATTR_MAX_TRAVELTIME, SUMO_ATTR_MIN_SAMPLES, SUMO_ATTR_PERIOD, SUMO_ATTR_TRACK_VEHICLES, SUMO_ATTR_VTYPES, SUMO_ATTR_WITH_INTERNAL, SUMO_ATTR_WRITE_ATTRIBUTES, and SUMO_TAG_MEANDATA_LANE.
Referenced by beginParseAttributes().
void MeanDataHandler::parseSumoBaseObject | ( | CommonXMLStructure::SumoBaseObject * | obj | ) |
parse SumoBaseObject (it's called recursivelly)
Definition at line 91 of file MeanDataHandler.cpp.
References buildEdgeMeanData(), buildLaneMeanData(), CommonXMLStructure::SumoBaseObject::getBoolAttribute(), CommonXMLStructure::SumoBaseObject::getDoubleAttribute(), CommonXMLStructure::SumoBaseObject::getStringAttribute(), CommonXMLStructure::SumoBaseObject::getStringListAttribute(), CommonXMLStructure::SumoBaseObject::getSumoBaseObjectChildren(), CommonXMLStructure::SumoBaseObject::getTag(), CommonXMLStructure::SumoBaseObject::getTimeAttribute(), parseSumoBaseObject(), SUMO_ATTR_AGGREGATE, SUMO_ATTR_BEGIN, SUMO_ATTR_DETECT_PERSONS, SUMO_ATTR_EDGES, SUMO_ATTR_EDGESFILE, SUMO_ATTR_END, SUMO_ATTR_EXCLUDE_EMPTY, SUMO_ATTR_FILE, SUMO_ATTR_HALTING_SPEED_THRESHOLD, SUMO_ATTR_ID, SUMO_ATTR_MAX_TRAVELTIME, SUMO_ATTR_MIN_SAMPLES, SUMO_ATTR_PERIOD, SUMO_ATTR_TRACK_VEHICLES, SUMO_ATTR_VTYPES, SUMO_ATTR_WITH_INTERNAL, SUMO_ATTR_WRITE_ATTRIBUTES, SUMO_TAG_MEANDATA_EDGE, and SUMO_TAG_MEANDATA_LANE.
Referenced by endParseAttributes(), and parseSumoBaseObject().
|
protected |
write error and enable error creating element
Definition at line 154 of file MeanDataHandler.cpp.
References myErrorCreatingElement, and WRITE_ERROR.
Referenced by beginParseAttributes(), GNEMeanDataHandler::buildEdgeMeanData(), GNEMeanDataHandler::buildLaneMeanData(), GNEMeanDataHandler::parseAttributes(), and GNEMeanDataHandler::parseEdges().
|
private |
common XML Structure
Definition at line 85 of file MeanDataHandler.h.
Referenced by beginParseAttributes(), endParseAttributes(), parseEdgeMeanData(), and parseLaneMeanData().
|
private |
flag for check if a element wasn't created
Definition at line 88 of file MeanDataHandler.h.
Referenced by isErrorCreatingElement(), and writeError().