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

Method parsePair

plugins/tiledb/io/TileDBUtils.cpp:40–66  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

38{
39
40void DomainBounds::parsePair(std::istringstream& ss, const std::string& dimName)
41{
42 Utils::eatwhitespace(ss);
43 if (!Utils::eatcharacter(ss, '['))
44 throw error("No opening '[' for '" + dimName + "' range.");
45
46 double low{0.0};
47 ss >> low;
48 if (!ss.good())
49 throw error("No valid minimum value for '" + dimName + "' range.");
50
51 Utils::eatwhitespace(ss);
52 if (!Utils::eatcharacter(ss, ','))
53 throw error("No ',' separating minimum/maximum values on '" + dimName +
54 "'.");
55
56 double high{0.0};
57 ss >> high;
58 if (!ss.good())
59 throw error("No valid maximum value for '" + dimName + "' range.");
60
61 Utils::eatwhitespace(ss);
62 if (!Utils::eatcharacter(ss, ']'))
63 throw error("No closing ']' for '" + dimName + "' range.");
64
65 m_data.push_back({low, high});
66}
67
68void DomainBounds::parse(std::string input)
69{

Callers 1

TESTFunction · 0.80

Calls 1

errorClass · 0.70

Tested by 1

TESTFunction · 0.64