 |
Eclipse SUMO - Simulation of Urban MObility
|
Go to the documentation of this file.
44 myOptions(oc), myContainer(con) {}
69 if (!
myContainer.
add(
id, type, color, prefix, layer, angle, imgFile, discard, allowFill)) {
70 WRITE_ERROR(
"Could not add polygon type '" +
id +
"' (probably the id is already used).");
PCTypeMap & myContainer
The type map to fill.
SAX-handler base for SUMO-files.
T get(int attr, const char *objectid, bool &ok, bool report=true) const
Tries to read given attribute assuming it is an int.
std::string getString(const std::string &name) const
Returns the string-value of the named option (only for Option_String)
bool getBool(const std::string &name) const
Returns the boolean-value of the named option (only for Option_Bool)
OptionsCont & myOptions
The options (program settings)
A storage for options typed value containers)
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.
void myStartElement(int element, const SUMOSAXAttributes &attrs)
Called on the opening of a tag;.
double getFloat(const std::string &name) const
Returns the double-value of the named option (only for Option_Float)
PCTypeDefHandler(OptionsCont &oc, PCTypeMap &con)
Constructor.
bool add(const std::string &id, const std::string &newid, const std::string &color, const std::string &prefix, double layer, double angle, const std::string &imgFile, bool discard, bool allowFill)
Adds a type definition.
virtual ~PCTypeDefHandler()
Destructor.
static const double DEFAULT_ANGLE
static const std::string DEFAULT_IMG_FILE
A storage for type mappings.
Encapsulated SAX-Attributes.