QGIS API Documentation  2.99.0-Master (f867b65)
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 
46 class CORE_EXPORT QgsProviderMetadata
47 {
48  public:
49 
54  SIP_SKIP typedef std::function < QgsDataProvider*( const QString & ) > CreateDataProviderFunction;
55 
56  QgsProviderMetadata( const QString &_key, const QString &_description, const QString &_library );
57 
64  SIP_SKIP QgsProviderMetadata( const QString &key, const QString &description, QgsProviderMetadata::CreateDataProviderFunction createFunc );
65 
70  QString key() const;
71 
76  QString description() const;
77 
82  QString library() const;
83 
90  SIP_SKIP CreateDataProviderFunction createFunction() const;
91 
92  private:
93 
95  QString key_;
96 
98  QString description_;
99 
101  QString library_;
102 
103  CreateDataProviderFunction mCreateFunc = nullptr;
104 
105 };
106 
107 #endif //QGSPROVIDERMETADATA_H
108 
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...