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

Function extractType

pdal/PipelineReaderJSON.cpp:274–293  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

272}
273
274std::string extractType(NL::json& node)
275{
276 std::string type;
277
278 auto it = node.find("type");
279 if (it != node.end())
280 {
281 NL::json& val = *it;
282 if (!val.is_null())
283 {
284 if (val.is_string())
285 type = val.get<std::string>();
286 else
287 throw pdal_error("JSON pipeline: 'type' must be specified as "
288 "a string.");
289 }
290 node.erase(it);
291 }
292 return type;
293}
294
295bool extractOption(Options& options, const std::string& name, const NL::json& node)
296{

Callers 1

parsePipelineFunction · 0.85

Calls 3

findMethod · 0.45
endMethod · 0.45
eraseMethod · 0.45

Tested by

no test coverage detected