QGIS API Documentation
3.8.0-Zanzibar (11aff65)
|
Holds data provider key, description, and associated shared library file or function pointer information. More...
#include <qgsprovidermetadata.h>
Public Types | |
typedef std::function< QgsDataProvider *(const QString &, const QgsDataProvider::ProviderOptions &) > | CreateDataProviderFunction |
Typedef for data provider creation function. More... | |
Public Member Functions | |
QgsProviderMetadata (const QString &_key, const QString &_description, const QString &_library) | |
QgsProviderMetadata (const QString &key, const QString &description, const QgsProviderMetadata::CreateDataProviderFunction &createFunc) | |
Metadata for provider with direct provider creation function pointer, where no library is involved. More... | |
CreateDataProviderFunction | createFunction () const |
Returns a pointer to the direct provider creation function, if supported by the provider. More... | |
QString | description () const |
This returns descriptive text for the provider. More... | |
QString | key () const |
This returns the unique key associated with the provider. More... | |
QString | library () const |
This returns the library file name. More... | |
Holds data provider key, description, and associated shared library file or function pointer information.
Provider metadata refers either to providers which are loaded via libraries or which are native providers that are included in the core QGIS installation and accessed through function pointers.
For library based providers, the metadata class is used in a lazy load implementation in QgsProviderRegistry. To save memory, data providers are only actually loaded via QLibrary calls if they're to be used. (Though they're all iteratively loaded once to get their metadata information, and then unloaded when the QgsProviderRegistry is created.) QgsProviderMetadata supplies enough information to be able to later load the associated shared library object.
Definition at line 46 of file qgsprovidermetadata.h.
typedef std::function< QgsDataProvider*( const QString &, const QgsDataProvider::ProviderOptions & ) > QgsProviderMetadata::CreateDataProviderFunction |
Typedef for data provider creation function.
Definition at line 54 of file qgsprovidermetadata.h.
QgsProviderMetadata::QgsProviderMetadata | ( | const QString & | _key, |
const QString & | _description, | ||
const QString & | _library | ||
) |
Definition at line 23 of file qgsprovidermetadata.cpp.
QgsProviderMetadata::QgsProviderMetadata | ( | const QString & | key, |
const QString & | description, | ||
const QgsProviderMetadata::CreateDataProviderFunction & | createFunc | ||
) |
Metadata for provider with direct provider creation function pointer, where no library is involved.
Definition at line 31 of file qgsprovidermetadata.cpp.
QgsProviderMetadata::CreateDataProviderFunction QgsProviderMetadata::createFunction | ( | ) | const |
Returns a pointer to the direct provider creation function, if supported by the provider.
Definition at line 52 of file qgsprovidermetadata.cpp.
QString QgsProviderMetadata::description | ( | ) | const |
This returns descriptive text for the provider.
This is used to provide a descriptive list of available data providers.
Definition at line 42 of file qgsprovidermetadata.cpp.
QString QgsProviderMetadata::key | ( | ) | const |
This returns the unique key associated with the provider.
This key string is used for the associative container in QgsProviderRegistry
Definition at line 37 of file qgsprovidermetadata.cpp.
QString QgsProviderMetadata::library | ( | ) | const |
This returns the library file name.
This is used to QLibrary calls to load the data provider.
Definition at line 47 of file qgsprovidermetadata.cpp.