47 const char* objectid,
bool& ok,
bool allowEmpty,
bool report) {
50 emitError(report,
"Shape", objecttype, objectid,
"the shape is empty");
59 if (pos.size() != 2 && pos.size() != 3) {
60 emitError(report,
"Shape", objecttype, objectid,
"the position is neither x,y nor x,y,z");
67 if (pos.size() == 2) {
74 emitError(report,
"Shape", objecttype, objectid,
"not numeric position entry");
78 emitError(report,
"Shape", objecttype, objectid,
"empty position entry");
89 const char* objectid,
bool& ok,
bool report) {
92 emitError(report,
"Bounding box", objecttype, objectid,
"mismatching entry number");
101 return Boundary(xmin, ymin, xmax, ymax);
103 emitError(report,
"Shape", objecttype, objectid,
"not numeric entry");
105 emitError(report,
"Shape", objecttype, objectid,
"empty entry");
114 const char* objectid,
const std::string& desc) {
118 std::ostringstream oss;
119 oss << what <<
" of ";
125 oss <<
" '" << objectid <<
"'";
127 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.