46 const char* objectid,
bool& ok,
bool allowEmpty,
bool report) {
49 emitError(report,
"Shape", objecttype, objectid,
"the shape is empty");
58 if (pos.size() != 2 && pos.size() != 3) {
59 emitError(report,
"Shape", objecttype, objectid,
"the position is neither x,y nor x,y,z");
66 if (pos.size() == 2) {
73 emitError(report,
"Shape", objecttype, objectid,
"not numeric position entry");
77 emitError(report,
"Shape", objecttype, objectid,
"empty position entry");
88 const char* objectid,
bool& ok,
bool report) {
91 emitError(report,
"Bounding box", objecttype, objectid,
"mismatching entry number");
100 return Boundary(xmin, ymin, xmax, ymax);
102 emitError(report,
"Shape", objecttype, objectid,
"not numeric entry");
104 emitError(report,
"Shape", objecttype, objectid,
"empty entry");
113 const char* objectid,
const std::string& desc) {
117 std::ostringstream oss;
118 oss << what <<
" of ";
124 oss <<
" '" << objectid <<
"'";
126 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 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 double _2double(const E *const data)
converts a char-type array into the double value described by it
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.