QGIS API Documentation  2.99.0-Master (dc72e14)
qgsprovidermetadata.cpp
Go to the documentation of this file.
1 /***************************************************************************
2  qgsprovidermetadata.cpp - 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 #include "qgsprovidermetadata.h"
20 
21 
22 
24  QString const &_description,
25  QString const &_library )
26  : key_( _key )
27  , description_( _description )
28  , library_( _library )
29 {}
30 
31 QgsProviderMetadata::QgsProviderMetadata( const QString &key, const QString &description, const CreateDataProviderFunction &createFunc )
32  : key_( key )
33  , description_( description )
34  , mCreateFunc( createFunc )
35 {}
36 
37 QString QgsProviderMetadata::key() const
38 {
39  return key_;
40 }
41 
43 {
44  return description_;
45 }
46 
48 {
49  return library_;
50 }
51 
53 {
54  return mCreateFunc;
55 }
QString description() const
This returns descriptive text for the provider.
QString key() const
This returns the unique key associated with the provider.
QString library() const
This returns the library file name.
std::function< QgsDataProvider *(const QString &) > CreateDataProviderFunction
Typedef for data provider creation function.
QgsProviderMetadata(const QString &_key, const QString &_description, const QString &_library)
CreateDataProviderFunction createFunction() const
Returns a pointer to the direct provider creation function, if supported by the provider.