Eclipse SUMO - Simulation of Urban MObility
GNEMeanDataHandler Class Reference

#include <GNEMeanDataHandler.h>

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

Public Member Functions

bool beginParseAttributes (SumoXMLTag tag, const SUMOSAXAttributes &attrs)
 begin parse attributes More...
 
void endParseAttributes ()
 end parse attributes More...
 
 GNEMeanDataHandler (GNENet *net, const bool allowUndoRedo, const bool overwrite)
 Constructor. More...
 
bool isErrorCreatingElement () const
 get flag for check if a element wasn't created More...
 
void parseSumoBaseObject (CommonXMLStructure::SumoBaseObject *obj)
 parse SumoBaseObject (it's called recursivelly) More...
 
virtual ~GNEMeanDataHandler ()
 Destructor. More...
 
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. More...
 

Protected Member Functions

std::vector< SumoXMLAttrparseAttributes (const SumoXMLTag tag, const std::vector< std::string > &attrStrs)
 parse attributes More...
 
std::vector< GNEEdge * > parseEdges (const SumoXMLTag tag, const std::vector< std::string > &edgeIDs)
 parse edges More...
 
void writeError (const std::string &error)
 write error and enable error creating element More...
 

Protected Attributes

const bool myAllowUndoRedo
 allow undo/redo More...
 
GNENetmyNet
 pointer to GNENet More...
 
const bool myOverwrite
 check if overwrite More...
 

Private Member Functions

 GNEMeanDataHandler (const GNEMeanDataHandler &s)=delete
 invalidate copy constructor More...
 
GNEMeanDataHandleroperator= (const GNEMeanDataHandler &s)=delete
 invalidate assignment operator More...
 
parse meanMeanData attributes

parse edgeMeanData attributes

void parseEdgeMeanData (const SUMOSAXAttributes &attrs)
 
void parseLaneMeanData (const SUMOSAXAttributes &attrs)
 parse laneMeanData attributes More...
 

Private Attributes

CommonXMLStructure myCommonXMLStructure
 common XML Structure More...
 
bool myErrorCreatingElement = false
 flag for check if a element wasn't created More...
 

Detailed Description

Definition at line 36 of file GNEMeanDataHandler.h.

Constructor & Destructor Documentation

◆ GNEMeanDataHandler() [1/2]

GNEMeanDataHandler::GNEMeanDataHandler ( GNENet net,
const bool  allowUndoRedo,
const bool  overwrite 
)

Constructor.

Definition at line 41 of file GNEMeanDataHandler.cpp.

◆ ~GNEMeanDataHandler()

GNEMeanDataHandler::~GNEMeanDataHandler ( )
virtual

Destructor.

Definition at line 48 of file GNEMeanDataHandler.cpp.

◆ GNEMeanDataHandler() [2/2]

GNEMeanDataHandler::GNEMeanDataHandler ( const GNEMeanDataHandler s)
privatedelete

invalidate copy constructor

Member Function Documentation

◆ beginParseAttributes()

bool MeanDataHandler::beginParseAttributes ( SumoXMLTag  tag,
const SUMOSAXAttributes attrs 
)
inherited

begin parse attributes

Definition at line 41 of file MeanDataHandler.cpp.

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

Here is the caller graph for this function:

◆ buildEdgeMeanData()

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

◆ buildLaneMeanData()

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

◆ endParseAttributes()

void MeanDataHandler::endParseAttributes ( )
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().

Here is the caller graph for this function:

◆ isErrorCreatingElement()

bool MeanDataHandler::isErrorCreatingElement ( ) const
inherited

get flag for check if a element wasn't created

Definition at line 146 of file MeanDataHandler.cpp.

References MeanDataHandler::myErrorCreatingElement.

Referenced by GNEGeneralHandler::isErrorCreatingElement().

Here is the caller graph for this function:

◆ operator=()

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

invalidate assignment operator

◆ parseAttributes()

std::vector< SumoXMLAttr > GNEMeanDataHandler::parseAttributes ( const SumoXMLTag  tag,
const std::vector< std::string > &  attrStrs 
)
protected

parse attributes

Definition at line 128 of file GNEMeanDataHandler.cpp.

References SUMOXMLDefinitions::Attrs, nlohmann::detail::get(), SUMOXMLDefinitions::Tags, TLF, toString(), and MeanDataHandler::writeError().

Referenced by buildEdgeMeanData(), and buildLaneMeanData().

Here is the caller graph for this function:

◆ parseEdgeMeanData()

◆ parseEdges()

std::vector< GNEEdge * > GNEMeanDataHandler::parseEdges ( const SumoXMLTag  tag,
const std::vector< std::string > &  edgeIDs 
)
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().

Here is the caller graph for this function:

◆ parseLaneMeanData()

◆ parseSumoBaseObject()

◆ writeError()

void MeanDataHandler::writeError ( const std::string &  error)
protectedinherited

write error and enable error creating element

Definition at line 152 of file MeanDataHandler.cpp.

References MeanDataHandler::myErrorCreatingElement, and WRITE_ERROR.

Referenced by MeanDataHandler::beginParseAttributes(), buildEdgeMeanData(), buildLaneMeanData(), parseAttributes(), and parseEdges().

Here is the caller graph for this function:

Field Documentation

◆ myAllowUndoRedo

const bool GNEMeanDataHandler::myAllowUndoRedo
protected

allow undo/redo

Definition at line 70 of file GNEMeanDataHandler.h.

Referenced by buildEdgeMeanData(), and buildLaneMeanData().

◆ myCommonXMLStructure

CommonXMLStructure MeanDataHandler::myCommonXMLStructure
privateinherited

◆ myErrorCreatingElement

bool MeanDataHandler::myErrorCreatingElement = false
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().

◆ myNet

GNENet* GNEMeanDataHandler::myNet
protected

pointer to GNENet

Definition at line 67 of file GNEMeanDataHandler.h.

Referenced by buildEdgeMeanData(), buildLaneMeanData(), and parseEdges().

◆ myOverwrite

const bool GNEMeanDataHandler::myOverwrite
protected

check if overwrite

Definition at line 73 of file GNEMeanDataHandler.h.


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