43 #ifdef CHECK_MEMORY_LEAKS 45 #endif // CHECK_MEMORY_LEAKS 59 myObjectType(objectType) {}
64 bool& ok,
bool report)
const {
90 bool& ok,
SUMOTime defaultValue,
bool report)
const {
115 std::ostringstream oss;
116 oss <<
"Attribute '" << attrname <<
"' is missing in definition of ";
117 if (objectid == 0 || objectid[0] == 0) {
129 std::ostringstream oss;
130 oss <<
"Attribute '" << attrname <<
"' in definition of ";
131 if (objectid == 0 || objectid[0] == 0) {
143 std::ostringstream oss;
144 oss <<
"Attribute '" << attrname <<
"' in definition of ";
145 if (objectid == 0 || objectid[0] == 0) {
150 oss <<
" is not " << type <<
".";
157 if (def.find(
';') != std::string::npos || def.find(
',') != std::string::npos) {
159 WRITE_WARNING(
"Please note that using ';' and ',' as XML list separators is deprecated.\n From 1.0 onwards, only ' ' will be accepted.");
165 into.push_back(st.
next());
172 if (def.find(
';') != std::string::npos || def.find(
',') != std::string::npos) {
174 WRITE_WARNING(
"Please note that using ';' and ',' as XML list separators is deprecated.\n From 1.0 onwards, only ' ' will be accepted.");
180 into.insert(st.
next());
SUMOSAXAttributes(const std::string &objectType)
virtual RGBColor getColor() const =0
Returns the value of the named attribute.
static void parseStringSet(const std::string &def, std::set< std::string > &into)
Splits the given string, stores it in a set.
virtual PositionVector getShape(int attr) const =0
Tries to read given attribute assuming it is a PositionVector.
virtual std::string getName(int attr) const =0
Converts the given attribute id into a man readable string.
std::string myObjectType
the object type to use in error reporting
void emitUngivenError(const std::string &attrname, const char *objectid) const
virtual bool hasAttribute(int id) const =0
Returns the information whether the named (by its enum-value) attribute is within the current list...
A class that stores a 2D geometrical boundary.
#define WRITE_WARNING(msg)
virtual std::string getString(int id) const =0
Returns the string-value of the named (by its enum-value) attribute.
SUMOTime getOptSUMOTimeReporting(int attr, const char *objectid, bool &ok, SUMOTime defaultValue, bool report=true) const
Tries to read given attribute assuming it is a SUMOTime.
T getInternal(const int attr) const
static void parseStringVector(const std::string &def, std::vector< std::string > &into)
Splits the given string.
virtual long long int getLong(int id) const =0
Returns the long-value of the named (by its enum-value) attribute.
virtual SUMOReal getFloat(int id) const =0
Returns the SUMOReal-value of the named (by its enum-value) attribute.
static const std::string ENCODING
The encoding of parsed strings.
virtual Boundary getBoundary(int attr) const =0
Tries to read given attribute assuming it is a Boundary.
SUMOTime getSUMOTimeReporting(int attr, const char *objectid, bool &ok, bool report=true) const
Tries to read given attribute assuming it is a SUMOTime.
static bool myHaveInformedAboutDeprecatedDivider
Information whether the usage of a deprecated divider was reported.
virtual int getInt(int id) const =0
Returns the int-value of the named (by its enum-value) attribute.
virtual bool getBool(int id) const =0
Returns the bool-value of the named (by its enum-value) attribute.
void emitEmptyError(const std::string &attrname, const char *objectid) const
void emitFormatError(const std::string &attrname, const std::string &type, const char *objectid) const