 |
Eclipse SUMO - Simulation of Urban MObility
|
Go to the documentation of this file.
39 const char* objectid,
bool& ok,
bool allowEmpty,
bool report) {
42 emitError(report,
"Shape", objecttype, objectid,
"the shape is empty");
51 if (pos.size() != 2 && pos.size() != 3) {
52 emitError(report,
"Shape", objecttype, objectid,
"the position is neither x,y nor x,y,z");
59 if (pos.size() == 2) {
66 emitError(report,
"Shape", objecttype, objectid,
"not numeric position entry");
70 emitError(report,
"Shape", objecttype, objectid,
"empty position entry");
81 const char* objectid,
bool& ok,
bool report) {
84 emitError(report,
"Bounding box", objecttype, objectid,
"mismatching entry number");
93 return Boundary(xmin, ymin, xmax, ymax);
95 emitError(report,
"Shape", objecttype, objectid,
"not numeric entry");
97 emitError(report,
"Shape", objecttype, objectid,
"empty entry");
106 const char* objectid,
const std::string& desc) {
110 std::ostringstream oss;
111 oss << what <<
" of ";
112 if (objectid ==
nullptr) {
116 if (objectid !=
nullptr) {
117 oss <<
" '" << objectid <<
"'";
119 oss <<
" is broken: " << desc <<
".";
bool hasNext()
returns the information whether further substrings exist
static double toDouble(const std::string &sData)
converts a string into the double value described by it by calling the char-type converter
std::string next()
returns the next substring when it exists. Otherwise the behaviour is undefined
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 occurred errors.
A class that stores a 2D geometrical boundary.
A point in 2D or 3D with translation and scaling methods.
int size() const
returns the number of existing substrings
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 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 occurred errors.