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

Method parse

pdal/FileSpec.cpp:177–200  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

175}
176
177Utils::StatusWithReason FileSpec::Private::parse(NL::json& node)
178{
179 if (node.is_null())
180 return { -1, "'filename' argument contains no data" };
181 if (node.is_string())
182 setFilePath(node.get<std::string>());
183 else if (node.is_object())
184 {
185 auto status = extractPath(node);
186 if (!status)
187 return { -1, status.what() };
188 status = extractHeaders(node);
189 if (!status)
190 return { -1, status.what() };
191 status = extractQuery(node);
192 if (!status)
193 return { -1, status.what() };
194 if (!node.empty())
195 return { -1, "Invalid item in filename object: " + node.dump() };
196 }
197 else
198 return { -1, "'filename' must be specified as a string." };
199 return true;
200}
201
202
203Utils::StatusWithReason FileSpec::Private::extractPath(NL::json& node)

Callers 10

parseArgsMethod · 0.45
TESTFunction · 0.45
TESTFunction · 0.45
TESTFunction · 0.45
handleOptionsMethod · 0.45
fromStringFunction · 0.45
doSwitchesMethod · 0.45
ingestMethod · 0.45
doSwitchesMethod · 0.45
parseArgsMethod · 0.45

Calls 3

whatMethod · 0.45
emptyMethod · 0.45
dumpMethod · 0.45

Tested by

no test coverage detected