QGIS API Documentation  3.0.2-Girona (307d082)
qgsprovidermetadata.h
Go to the documentation of this file.
1 /***************************************************************************
2  qgsprovidermetadata.h - Metadata class for
3  describing a data provider.
4  -------------------
5  begin : Sat Jan 10 2004
6  copyright : (C) 2004 by Gary E.Sherman
7  email : sherman at mrcc.com
8  ***************************************************************************/
9 
10 /***************************************************************************
11  * *
12  * This program is free software; you can redistribute it and/or modify *
13  * it under the terms of the GNU General Public License as published by *
14  * the Free Software Foundation; either version 2 of the License, or *
15  * (at your option) any later version. *
16  * *
17  ***************************************************************************/
18 
19 #ifndef QGSPROVIDERMETADATA_H
20 #define QGSPROVIDERMETADATA_H
21 
22 
23 #include <QString>
24 #include "qgis.h"
25 #include "qgis_core.h"
26 #include <functional>
27 
28 class QgsDataProvider;
29 
47 class CORE_EXPORT QgsProviderMetadata
48 {
49  public:
50 
55  SIP_SKIP typedef std::function < QgsDataProvider*( const QString & ) > CreateDataProviderFunction;
56 
57  QgsProviderMetadata( const QString &_key, const QString &_description, const QString &_library );
58 
65  SIP_SKIP QgsProviderMetadata( const QString &key, const QString &description, const QgsProviderMetadata::CreateDataProviderFunction &createFunc );
66 
72  QString key() const;
73 
79  QString description() const;
80 
86  QString library() const;
87 
94  SIP_SKIP CreateDataProviderFunction createFunction() const;
95 
96  private:
97 
99  QString key_;
100 
102  QString description_;
103 
105  QString library_;
106 
107  CreateDataProviderFunction mCreateFunc = nullptr;
108 
109 };
110 
111 #endif //QGSPROVIDERMETADATA_H
112 
std::function< QgsDataProvider *(const QString &) > CreateDataProviderFunction
Typedef for data provider creation function.
Abstract base class for spatial data provider implementations.
#define SIP_SKIP
Definition: qgis_sip.h:119
Holds data provider key, description, and associated shared library file or function pointer informat...