66 const std::string allowFillS = attrs.
get<std::string>(
SUMO_ATTR_FILL,
id.c_str(), ok);
67 if (allowFillS ==
"force") {
79 if (!
myContainer.add(
id, type, color, prefix, icon, layer, angle, imgFile, discard, allowFill)) {
80 WRITE_ERRORF(
TL(
"Could not add polygon type '%' (probably the id is already used)."),
id);
#define WRITE_ERRORF(...)
@ SUMO_TAG_POLYTYPE
type of polygon
@ SUMO_ATTR_FILL
Fill the polygon.
@ SUMO_ATTR_LAYER
A layer number.
@ SUMO_ATTR_COLOR
A color information.
A storage for options typed value containers).
virtual ~PCTypeDefHandler()
Destructor.
OptionsCont & myOptions
The options (program settings).
void myStartElement(int element, const SUMOSAXAttributes &attrs)
Called on the opening of a tag;.
bool myOverwriteType
whether to replace the loaded type with a custom value
PCTypeDefHandler(OptionsCont &oc, PCTypeMap &con)
Constructor.
PCTypeMap & myContainer
The type map to fill.
A storage for type mappings.
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.
virtual bool hasAttribute(int id) const =0
Returns the information whether the named (by its enum-value) attribute is within the current list.
SUMOSAXHandler(const std::string &file="", const std::string &expectedRoot="")
Constructor.
static const std::string DEFAULT_IMG_FILE
static const double DEFAULT_ANGLE
static bool toBool(const std::string &sData)
converts a string into the bool value described by it by calling the char-type converter