GDAL
Classes | Public Member Functions | Static Public Attributes | Protected Member Functions | List of all members
GDALAlgorithmRegistry Class Reference

Registry of GDAL algorithms. More...

#include <gdalalgorithm_cpp.h>

Inheritance diagram for GDALAlgorithmRegistry:
GDALGlobalAlgorithmRegistry

Classes

class  AlgInfo
 Algorithm information. More...
 

Public Member Functions

template<class MyAlgorithm >
bool Register ()
 Register the algorithm of type MyAlgorithm.
 
bool Register (const AlgInfo &info)
 Register an algorithm by its AlgInfo structure.
 
std::vector< std::string > GetNames () const
 Get the names of registered algorithms.
 
std::unique_ptr< GDALAlgorithmInstantiate (const std::string &name) const
 Instantiate an algorithm by its name or one of its alias.
 
std::unique_ptr< GDALAlgorithmInstantiate (const std::vector< std::string > &path) const
 Instantiate an algorithm by its path.
 
template<typename... V>
std::unique_ptr< GDALAlgorithmInstantiate (const std::string &first, V &&...rest)
 Instantiate an algorithm by its path.
 
const AlgInfoGetInfo (const std::string &name) const
 Get an algorithm by its name.
 
bool empty () const
 Returns true if there are no algorithms registered.
 

Static Public Attributes

static constexpr const char * HIDDEN_ALIAS_SEPARATOR = "==hide=="
 Special value to put in m_aliases to separate public alias from hidden aliases.
 

Protected Member Functions

virtual std::unique_ptr< GDALAlgorithmInstantiateTopLevel (const std::string &name) const
 Instantiate an algorithm by its name or one of its alias.
 

Detailed Description

Registry of GDAL algorithms.

Member Function Documentation

◆ GetNames()

std::vector< std::string > GDALAlgorithmRegistry::GetNames ( ) const

Get the names of registered algorithms.

This only returns the main name of each algorithm, not its potential alternate names.

◆ Instantiate() [1/3]

template<typename... V>
std::unique_ptr< GDALAlgorithm > GDALAlgorithmRegistry::Instantiate ( const std::string &  first,
V &&...  rest 
)
inline

Instantiate an algorithm by its path.

Returns
algorithm, or nullptr
Since
3.12

◆ Instantiate() [2/3]

std::unique_ptr< GDALAlgorithm > GDALAlgorithmRegistry::Instantiate ( const std::string &  name) const

Instantiate an algorithm by its name or one of its alias.

Returns
algorithm, or nullptr

◆ Instantiate() [3/3]

std::unique_ptr< GDALAlgorithm > GDALAlgorithmRegistry::Instantiate ( const std::vector< std::string > &  path) const

Instantiate an algorithm by its path.

Returns
algorithm, or nullptr
Since
3.12

◆ InstantiateTopLevel()

std::unique_ptr< GDALAlgorithm > GDALAlgorithmRegistry::InstantiateTopLevel ( const std::string &  name) const
protectedvirtual

Instantiate an algorithm by its name or one of its alias.

Reimplemented in GDALGlobalAlgorithmRegistry.


The documentation for this class was generated from the following files: