41 #ifdef CHECK_MEMORY_LEAKS 43 #endif // CHECK_MEMORY_LEAKS 51 const char* objectid,
bool& ok,
bool allowEmpty,
bool report) {
54 emitError(report,
"Shape", objecttype, objectid,
"the shape is empty");
63 if (pos.size() != 2 && pos.size() != 3) {
64 emitError(report,
"Shape", objecttype, objectid,
"the position is neither x,y nor x,y,z");
71 if (pos.size() == 2) {
78 emitError(report,
"Shape", objecttype, objectid,
"not numeric position entry");
82 emitError(report,
"Shape", objecttype, objectid,
"empty position entry");
93 const char* objectid,
bool& ok,
bool report) {
96 emitError(report,
"Bounding box", objecttype, objectid,
"mismatching entry number");
105 return Boundary(xmin, ymin, xmax, ymax);
107 emitError(report,
"Shape", objecttype, objectid,
"not numeric entry");
109 emitError(report,
"Shape", objecttype, objectid,
"empty entry");
118 const char* objectid,
const std::string& desc) {
122 std::ostringstream oss;
123 oss << what <<
" of ";
129 oss <<
" '" << objectid <<
"'";
131 oss <<
" is broken: " << desc <<
".";
static void emitError(bool report, const std::string &what, const std::string &objecttype, const char *objectid, const std::string &desc)
Writes an error message into the MessageHandler.
static SUMOReal _2SUMOReal(const E *const data)
static Boundary parseBoundaryReporting(const std::string &def, const std::string &objecttype, const char *objectid, bool &ok, bool report=true)
Builds a boundary from its string representation, reporting occured errors.
A class that stores a 2D geometrical boundary.
A point in 2D or 3D with translation and scaling methods.
static PositionVector parseShapeReporting(const std::string &shpdef, const std::string &objecttype, const char *objectid, bool &ok, bool allowEmpty, bool report=true)
Builds a PositionVector from a string representation, reporting occured errors.