| 272 | /************************************************************************/ |
| 273 | |
| 274 | std::vector<std::string> |
| 275 | GDALGlobalAlgorithmRegistry::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() */ |