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

Function extractOption

pdal/PipelineReaderJSON.cpp:295–314  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

293}
294
295bool extractOption(Options& options, const std::string& name, const NL::json& node)
296{
297 if (node.is_string())
298 options.add(name, node.get<std::string>());
299 else if (node.is_number_unsigned())
300 options.add(name, node.get<uint64_t>());
301 else if (node.is_number_integer())
302 options.add(name, node.get<int64_t>());
303 else if (node.is_number_float())
304 options.add(name, node.get<double>());
305 else if (node.is_boolean())
306 options.add(name, node.get<bool>());
307 else if (node.is_array())
308 options.add(name, node.get<NL::json::array_t>());
309 else if (node.is_null())
310 options.add(name, "");
311 else
312 return false;
313 return true;
314}
315
316void handleInputTag(const std::string& tag, const TagMap& tags, std::vector<Stage *>& inputs)
317{

Callers 1

extractOptionsFunction · 0.85

Calls 1

addMethod · 0.45

Tested by

no test coverage detected