53 #ifdef CHECK_MEMORY_LEAKS 55 #endif // CHECK_MEMORY_LEAKS 67 if (!oc.
isSet(
"xml-files")) {
73 for (std::vector<std::string>::const_iterator file = files.begin(); file != files.end(); ++file) {
75 throw ProcessError(
"Could not open xml-file '" + *file +
"'.");
std::vector< std::string > getStringVector(const std::string &name) const
Returns the list of string-vector-value of the named option (only for Option_String) ...
static RGBColor parseColor(std::string coldef)
Parses a color information.
PCLoaderXML(PCPolyContainer &toFill, PCTypeMap &tm, OptionsCont &oc)
Constructor.
A single definition of values that shall be used for a given type.
A reader for polygons and pois stored in XML-format.
bool isInStringVector(const std::string &optionName, const std::string &itemName)
Returns the named option is a list of string values containing the specified item.
static bool isReadable(std::string path)
Checks whether the given file is readable.
PCTypeMap & myTypeMap
The type map to use.
bool getBool(const std::string &name) const
Returns the boolean-value of the named option (only for Option_Bool)
OptionsCont & myOptions
Settings to use.
SUMOReal layer
The layer to use.
SUMOReal getFloat(const std::string &name) const
Returns the SUMOReal-value of the named option (only for Option_Float)
static bool runParser(GenericSAXHandler &handler, const std::string &file, const bool isNet=false)
Runs the given handler on the given file; returns if everything's ok.
bool discard
Information whether polygons of this type shall be discarded.
A storage for loaded polygons and pois.
RGBColor color
The color to use.
The XML-Handler for network loading.
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.
const TypeDef & get(const std::string &id)
Returns a type definition.
Encapsulated SAX-Attributes.
A point in 2D or 3D with translation and scaling methods.
bool has(const std::string &id)
Returns the information whether the named type is known.
void addPOI(const SUMOSAXAttributes &attrs, const bool ignorePruning, const bool useProcessing)
adds a POI
#define PROGRESS_BEGIN_MESSAGE(msg)
~PCLoaderXML()
Destructor.
void addPoly(const SUMOSAXAttributes &attrs, const bool ignorePruning, const bool useProcessing)
adds a polygon
Position getLanePos(const std::string &poiID, const std::string &laneID, SUMOReal lanePos)
get position for a given laneID
virtual void myStartElement(int element, const SUMOSAXAttributes &attrs)
Called on the opening of a tag;.
std::string prefix
The prefix to use.
void setDefaults(const std::string &prefix, const RGBColor &color, const SUMOReal layer, const bool fill=false)
A storage for options typed value containers)
ShapeContainer & myShapeContainer
static void loadIfSet(OptionsCont &oc, PCPolyContainer &toFill, PCTypeMap &tm)
Loads pois/polygons assumed to be stored as XML.
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.
#define PROGRESS_DONE_MESSAGE()
bool allowFill
Information whether polygons of this type can be filled.
static const Position INVALID
bool isSet(const std::string &name, bool failOnNonExistant=true) const
Returns the information whether the named option is set.