42 const std::string& file)
44 myNet(optNet), myIgnoreErrors(ignoreErrors), myContainer(con) {}
67 if (edge ==
nullptr || laneIndex >= edge->
getNumLanes()) {
76 if (mml_type ==
"between") {
78 }
else if (mml_type ==
"source" || mml_type ==
"highway_source") {
80 }
else if (mml_type ==
"sink") {
86 throw ProcessError(
TLF(
"Could not add detector '%' (probably the id is already used).",
id));
#define WRITE_WARNING(msg)
RODFDetectorType
Numerical representation of different detector types.
@ BETWEEN_DETECTOR
An in-between detector.
@ SOURCE_DETECTOR
A source detector.
@ TYPE_NOT_DEFINED
A not yet defined detector.
@ SUMO_TAG_E1DETECTOR
an e1 detector
@ SUMO_TAG_DETECTOR_DEFINITION
definition of a detector
@ SUMO_TAG_INDUCTION_LOOP
alternative tag for e1 detector
const std::string & getFileName() const
returns the current file name
A container for RODFDetectors.
bool addDetector(RODFDetector *dfd)
RODFDetectorCon & myContainer
the container to put the detectors into
void myStartElement(int element, const SUMOSAXAttributes &attrs)
Called on the opening of a tag;.
RODFDetectorHandler(RODFNet *optNet, bool ignoreErrors, RODFDetectorCon &con, const std::string &file)
Constructor.
virtual ~RODFDetectorHandler()
Destructor.
bool myIgnoreErrors
whether to ignore errors on parsing
Class representing a detector within the DFROUTER.
A basic edge for routing applications.
int getNumLanes() const
Returns the number of lanes this edge has.
ROEdge * getEdge(const std::string &name) const
Retrieves an edge from the network.
Encapsulated SAX-Attributes.
T getOpt(int attr, const char *objectid, bool &ok, T defaultValue=T(), bool report=true) const
Tries to read given attribute assuming it is an int.
T get(int attr, const char *objectid, bool &ok, bool report=true) const
Tries to read given attribute assuming it is an int.
SAX-handler base for SUMO-files.
static std::string getEdgeIDFromLane(const std::string laneID)
return edge id when given the lane ID
static int getIndexFromLane(const std::string laneID)
return lane index when given the lane ID