44 #ifdef CHECK_MEMORY_LEAKS
46 #endif // CHECK_MEMORY_LEAKS
54 myOptions(oc), myContainer(con) {}
77 if (!
myContainer.
add(
id, type, color, prefix, layer, discard, allowFill)) {
78 WRITE_ERROR(
"Could not add polygon type '" +
id +
"' (probably the id is already used).");
virtual ~PCTypeDefHandler()
Destructor.
SAX-handler base for SUMO-files.
PCTypeMap & myContainer
The type map to fill.
std::string getString(const std::string &name) const
Returns the string-value of the named option (only for Option_String)
A storage for type mappings.
bool add(const std::string &id, const std::string &newid, const std::string &color, const std::string &prefix, int layer, bool discard, bool allowFill)
Adds a type definition.
Encapsulated SAX-Attributes.
PCTypeDefHandler(OptionsCont &oc, PCTypeMap &con)
Constructor.
A storage for options typed value containers)
OptionsCont & myOptions
The options (program settings)
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.
int getInt(const std::string &name) const
Returns the int-value of the named option (only for Option_Integer)
void myStartElement(int element, const SUMOSAXAttributes &attrs)
Called on the opening of a tag;.