MCPcopy Create free account
hub / github.com/PDAL/PDAL / parsePair

Function parsePair

pdal/util/Bounds.cpp:256–276  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

254
255template <typename T>
256void parsePair(std::istringstream& ss, double& low, double& high)
257{
258 low = high = 0;
259
260 if (!discardSpacesBefore(ss, '['))
261 throw typename T::error("No opening '[' in range.");
262
263 ss >> low;
264 if (!ss.good())
265 throw typename T::error("No valid minimum value for range.");
266
267 if (!discardSpacesBefore(ss, ','))
268 throw typename T::error("No ',' separating minimum/maximum values.");
269
270 ss >> high;
271 if (!ss.good())
272 throw typename T::error("No valid maximum value for range.");
273
274 if (!discardSpacesBefore(ss, ']'))
275 throw typename T::error("No closing ']' in range.");
276}
277
278} // unnamed namespace
279

Callers 1

parseMethod · 0.85

Calls 2

discardSpacesBeforeFunction · 0.85
errorClass · 0.70

Tested by

no test coverage detected