 |
Eclipse SUMO - Simulation of Urban MObility
|
Go to the documentation of this file.
43 const std::string& file)
45 myNet(optNet), myIgnoreErrors(ignoreErrors), myContainer(con) {}
68 if (edge ==
nullptr || laneIndex >= edge->
getNumLanes()) {
77 if (mml_type ==
"between") {
79 }
else if (mml_type ==
"source" || mml_type ==
"highway_source") {
81 }
else if (mml_type ==
"sink") {
87 throw ProcessError(
"Could not add detector '" +
id +
"' (probably the id is already used).");
int getNumLanes() const
Returns the number of lanes this edge has.
RODFDetectorHandler(RODFNet *optNet, bool ignoreErrors, RODFDetectorCon &con, const std::string &file)
Constructor.
Class representing a detector within the DFROUTER.
#define WRITE_WARNING(msg)
RODFDetectorCon & myContainer
the container to put the detectors into
SAX-handler base for SUMO-files.
ROEdge * getEdge(const std::string &name) const
Retrieves an edge from the network.
T get(int attr, const char *objectid, bool &ok, bool report=true) const
Tries to read given attribute assuming it is an int.
bool myIgnoreErrors
whether to ignore errors on parsing
A container for RODFDetectors.
@ SUMO_TAG_DETECTOR_DEFINITION
definition of a detector
virtual ~RODFDetectorHandler()
Destructor.
T getOpt(int attr, const char *objectid, bool &ok, T defaultValue, bool report=true) const
Tries to read given attribute assuming it is an int.
static int toIntSecure(const std::string &sData, int def)
converts a string into the integer value described by it
RODFDetectorType
Numerical representation of different detector types.
const std::string & getFileName() const
returns the current file name
A basic edge for routing applications.
@ TYPE_NOT_DEFINED
A not yet defined detector.
@ SOURCE_DETECTOR
A source detector.
@ BETWEEN_DETECTOR
An in-between detector.
@ SUMO_TAG_INDUCTION_LOOP
alternative tag for e1 detector
@ SUMO_TAG_E1DETECTOR
an e1 detector
Encapsulated SAX-Attributes.
bool addDetector(RODFDetector *dfd)
void myStartElement(int element, const SUMOSAXAttributes &attrs)
Called on the opening of a tag;.