46 #ifdef CHECK_MEMORY_LEAKS
48 #endif // CHECK_MEMORY_LEAKS
55 const std::string& file)
57 myNet(optNet), myIgnoreErrors(ignoreErrors), myContainer(con) {}
80 if (edge == 0 || laneIndex >= edge->
getLaneNo()) {
89 if (mml_type ==
"between") {
91 }
else if (mml_type ==
"source" || mml_type ==
"highway_source") {
93 }
else if (mml_type ==
"sink") {
99 throw ProcessError(
"Could not add detector '" +
id +
"' (probably the id is already used).");
virtual ~RODFDetectorHandler()
Destructor.
RODFDetectorType
Numerical representation of different detector types.
bool addDetector(RODFDetector *dfd)
ROEdge * getEdge(const std::string &name) const
Retrieves an edge from the network.
SAX-handler base for SUMO-files.
A container for RODFDetectors.
#define WRITE_WARNING(msg)
void myStartElement(int element, const SUMOSAXAttributes &attrs)
Called on the opening of a tag;.
A not yet defined detector.
bool myIgnoreErrors
whether to ignore errors on parsing
const std::string & getFileName() const
returns the current file name
Encapsulated SAX-Attributes.
RODFDetectorCon & myContainer
the container to put the detectors into
A basic edge for routing applications.
Class representing a detector within the DFROUTER.
RODFDetectorHandler(RODFNet *optNet, bool ignoreErrors, RODFDetectorCon &con, const std::string &file)
Constructor.
int getLaneNo() const
Returns the number of lanes this edge has.
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.
T get(int attr, const char *objectid, bool &ok, bool report=true) const
Tries to read given attribute assuming it is an int.
static int _2intSec(const E *const data, int def)
converts a 0-terminated char-type array into the integer value described by it