Eclipse SUMO - Simulation of Urban MObility
Loading...
Searching...
No Matches
MeanDataHandler Class Referenceabstract

The XML-Handler for network loading. More...

#include <MeanDataHandler.h>

Inheritance diagram for MeanDataHandler:
[legend]
Collaboration diagram for MeanDataHandler:
[legend]

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
 
MeanDataHandleroperator= (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
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ MeanDataHandler() [1/2]

MeanDataHandler::MeanDataHandler ( )

Constructor.

Definition at line 33 of file MeanDataHandler.cpp.

◆ ~MeanDataHandler()

MeanDataHandler::~MeanDataHandler ( )
virtual

Destructor.

Definition at line 37 of file MeanDataHandler.cpp.

◆ MeanDataHandler() [2/2]

MeanDataHandler::MeanDataHandler ( const MeanDataHandler s)
privatedelete

invalidate copy constructor

Member Function Documentation

◆ beginParseAttributes()

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().

Here is the caller graph for this function:

◆ buildEdgeMeanData()

virtual void MeanDataHandler::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 
)
pure virtual

Implemented in GNEMeanDataHandler.

Referenced by parseSumoBaseObject().

Here is the caller graph for this function:

◆ buildLaneMeanData()

virtual void MeanDataHandler::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 
)
pure virtual

Builds laneMeanData.

Implemented in GNEMeanDataHandler.

Referenced by parseSumoBaseObject().

Here is the caller graph for this function:

◆ endParseAttributes()

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().

Here is the caller graph for this function:

◆ isErrorCreatingElement()

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().

Here is the caller graph for this function:

◆ operator=()

MeanDataHandler & MeanDataHandler::operator= ( const MeanDataHandler s)
privatedelete

invalidate assignment operator

◆ parseEdgeMeanData()

◆ parseLaneMeanData()

◆ parseSumoBaseObject()

◆ writeError()

void MeanDataHandler::writeError ( const std::string &  error)
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().

Here is the caller graph for this function:

Field Documentation

◆ myCommonXMLStructure

CommonXMLStructure MeanDataHandler::myCommonXMLStructure
private

common XML Structure

Definition at line 85 of file MeanDataHandler.h.

Referenced by beginParseAttributes(), endParseAttributes(), parseEdgeMeanData(), and parseLaneMeanData().

◆ myErrorCreatingElement

bool MeanDataHandler::myErrorCreatingElement = false
private

flag for check if a element wasn't created

Definition at line 88 of file MeanDataHandler.h.

Referenced by isErrorCreatingElement(), and writeError().


The documentation for this class was generated from the following files: