Eclipse SUMO - Simulation of Urban MObility
|
#include <GNEMeanDataHandler.h>
Public Member Functions | |
bool | beginParseAttributes (SumoXMLTag tag, const SUMOSAXAttributes &attrs) |
begin parse attributes | |
void | endParseAttributes () |
end parse attributes | |
GNEMeanDataHandler (GNENet *net, const bool allowUndoRedo, const bool overwrite) | |
Constructor. | |
bool | isErrorCreatingElement () const |
get flag for check if a element wasn't created | |
void | parseSumoBaseObject (CommonXMLStructure::SumoBaseObject *obj) |
parse SumoBaseObject (it's called recursivelly) | |
virtual | ~GNEMeanDataHandler () |
Destructor. | |
build functions | |
Builds edgeMeanData | |
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 > &edgeIDs, 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) |
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 > &edgeIDs, 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) |
Builds laneMeanData. | |
Protected Member Functions | |
std::vector< SumoXMLAttr > | parseAttributes (const SumoXMLTag tag, const std::vector< std::string > &attrStrs) |
parse attributes | |
std::vector< GNEEdge * > | parseEdges (const SumoXMLTag tag, const std::vector< std::string > &edgeIDs) |
parse edges | |
void | writeError (const std::string &error) |
write error and enable error creating element | |
Protected Attributes | |
const bool | myAllowUndoRedo |
allow undo/redo | |
GNENet * | myNet |
pointer to GNENet | |
const bool | myOverwrite |
check if overwrite | |
Private Member Functions | |
GNEMeanDataHandler (const GNEMeanDataHandler &s)=delete | |
invalidate copy constructor | |
GNEMeanDataHandler & | operator= (const GNEMeanDataHandler &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 | |
Definition at line 36 of file GNEMeanDataHandler.h.
GNEMeanDataHandler::GNEMeanDataHandler | ( | GNENet * | net, |
const bool | allowUndoRedo, | ||
const bool | overwrite | ||
) |
Constructor.
Definition at line 41 of file GNEMeanDataHandler.cpp.
|
virtual |
Destructor.
Definition at line 48 of file GNEMeanDataHandler.cpp.
|
privatedelete |
invalidate copy constructor
|
inherited |
begin parse attributes
Definition at line 41 of file MeanDataHandler.cpp.
References CommonXMLStructure::abortSUMOBaseOBject(), MeanDataHandler::myCommonXMLStructure, CommonXMLStructure::openSUMOBaseOBject(), MeanDataHandler::parseEdgeMeanData(), MeanDataHandler::parseLaneMeanData(), SUMO_TAG_MEANDATA_EDGE, SUMO_TAG_MEANDATA_LANE, SUMO_TAG_PARAM, TL, WRITE_WARNING, and MeanDataHandler::writeError().
Referenced by GNEGeneralHandler::beginTag().
|
virtual |
Implements MeanDataHandler.
Definition at line 52 of file GNEMeanDataHandler.cpp.
References GNEUndoList::add(), GNEUndoList::begin(), GNEUndoList::end(), GNENet::getAttributeCarriers(), GNEViewNet::getUndoList(), GNENet::getViewNet(), GNEReferenceCounter::incRef(), myAllowUndoRedo, myNet, parseAttributes(), parseEdges(), GNENetHelper::AttributeCarriers::retrieveMeanData(), SUMO_TAG_MEANDATA_EDGE, TL, TLF, and MeanDataHandler::writeError().
|
virtual |
Builds laneMeanData.
Implements MeanDataHandler.
Definition at line 81 of file GNEMeanDataHandler.cpp.
References GNEUndoList::add(), GNEUndoList::begin(), GNEUndoList::end(), GNENet::getAttributeCarriers(), GNEViewNet::getUndoList(), GNENet::getViewNet(), GNEReferenceCounter::incRef(), myAllowUndoRedo, myNet, parseAttributes(), parseEdges(), GNENetHelper::AttributeCarriers::retrieveMeanData(), SUMO_TAG_MEANDATA_LANE, TL, TLF, and MeanDataHandler::writeError().
|
inherited |
end parse attributes
Definition at line 69 of file MeanDataHandler.cpp.
References CommonXMLStructure::closeSUMOBaseOBject(), CommonXMLStructure::getCurrentSumoBaseObject(), CommonXMLStructure::SumoBaseObject::getTag(), MeanDataHandler::myCommonXMLStructure, MeanDataHandler::parseSumoBaseObject(), SUMO_TAG_MEANDATA_EDGE, and SUMO_TAG_MEANDATA_LANE.
Referenced by GNEGeneralHandler::endTag().
|
inherited |
get flag for check if a element wasn't created
Definition at line 148 of file MeanDataHandler.cpp.
References MeanDataHandler::myErrorCreatingElement.
Referenced by GNEGeneralHandler::isErrorCreatingElement().
|
privatedelete |
invalidate assignment operator
|
protected |
parse attributes
Definition at line 128 of file GNEMeanDataHandler.cpp.
References SUMOXMLDefinitions::Attrs, SUMOXMLDefinitions::Tags, TLF, toString(), and MeanDataHandler::writeError().
Referenced by buildEdgeMeanData(), and buildLaneMeanData().
|
privateinherited |
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(), MeanDataHandler::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 MeanDataHandler::beginParseAttributes().
|
protected |
parse edges
Definition at line 110 of file GNEMeanDataHandler.cpp.
References GNENet::getAttributeCarriers(), myNet, GNENetHelper::AttributeCarriers::retrieveEdge(), TL, TLF, toString(), and MeanDataHandler::writeError().
Referenced by buildEdgeMeanData(), and buildLaneMeanData().
|
privateinherited |
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(), MeanDataHandler::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 MeanDataHandler::beginParseAttributes().
|
inherited |
parse SumoBaseObject (it's called recursivelly)
Definition at line 91 of file MeanDataHandler.cpp.
References MeanDataHandler::buildEdgeMeanData(), MeanDataHandler::buildLaneMeanData(), CommonXMLStructure::SumoBaseObject::getBoolAttribute(), CommonXMLStructure::SumoBaseObject::getDoubleAttribute(), CommonXMLStructure::SumoBaseObject::getStringAttribute(), CommonXMLStructure::SumoBaseObject::getStringListAttribute(), CommonXMLStructure::SumoBaseObject::getSumoBaseObjectChildren(), CommonXMLStructure::SumoBaseObject::getTag(), CommonXMLStructure::SumoBaseObject::getTimeAttribute(), MeanDataHandler::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 MeanDataHandler::endParseAttributes(), and MeanDataHandler::parseSumoBaseObject().
|
protectedinherited |
write error and enable error creating element
Definition at line 154 of file MeanDataHandler.cpp.
References MeanDataHandler::myErrorCreatingElement, and WRITE_ERROR.
Referenced by MeanDataHandler::beginParseAttributes(), buildEdgeMeanData(), buildLaneMeanData(), parseAttributes(), and parseEdges().
|
protected |
allow undo/redo
Definition at line 70 of file GNEMeanDataHandler.h.
Referenced by buildEdgeMeanData(), and buildLaneMeanData().
|
privateinherited |
common XML Structure
Definition at line 85 of file MeanDataHandler.h.
Referenced by MeanDataHandler::beginParseAttributes(), MeanDataHandler::endParseAttributes(), MeanDataHandler::parseEdgeMeanData(), and MeanDataHandler::parseLaneMeanData().
|
privateinherited |
flag for check if a element wasn't created
Definition at line 88 of file MeanDataHandler.h.
Referenced by MeanDataHandler::isErrorCreatingElement(), and MeanDataHandler::writeError().
|
protected |
pointer to GNENet
Definition at line 67 of file GNEMeanDataHandler.h.
Referenced by buildEdgeMeanData(), buildLaneMeanData(), and parseEdges().
|
protected |
check if overwrite
Definition at line 73 of file GNEMeanDataHandler.h.