MCPcopy Create free account
hub / github.com/OSGeo/gdal / GetDeclaredSubAlgorithmNames

Method GetDeclaredSubAlgorithmNames

gcore/gdalalgorithmregistry.cpp:274–294  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

272/************************************************************************/
273
274std::vector<std::string>
275GDALGlobalAlgorithmRegistry::GetDeclaredSubAlgorithmNames(
276 const std::vector<std::string> &path) const
277{
278 const GDALGlobalAlgorithmRegistry::Node *node = GetNodeFromPath(path);
279 std::vector<std::string> ret;
280 if (node)
281 {
282 for (const auto &[name, subnode] : node->children)
283 {
284 // If there is an instantiation function, run it, to avoid
285 // reporting algorithms that might be in drivers built as
286 // deferred loaded plugins, but not available at runtime.
287 if (!subnode.instantiateFunc || subnode.instantiateFunc())
288 {
289 ret.push_back(name);
290 }
291 }
292 }
293 return ret;
294}
295
296/************************************************************************/
297/* GDALGlobalAlgorithmRegistry::HasDeclaredSubAlgorithm() */

Callers 3

TEST_FFunction · 0.80
HasSubAlgorithmsMethod · 0.80
GetSubAlgorithmNamesMethod · 0.80

Calls 1

push_backMethod · 0.45

Tested by 1

TEST_FFunction · 0.64