Permalink
Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Merge pull request #4487 from nyalldawson/memory
Move memory provider to core
- Loading branch information
Showing
45 changed files
with
690 additions
and
278 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
/************************************************************************ | ||
* This file has been generated automatically from * | ||
* * | ||
* src/core/providers/memory/qgsmemoryproviderutils.h * | ||
* * | ||
* Do not edit manually ! Edit header and run scripts/sipify.pl again * | ||
************************************************************************/ | ||
|
||
|
||
|
||
|
||
|
||
class QgsMemoryProviderUtils | ||
{ | ||
%Docstring | ||
Utility functions for use with the memory vector data provider. | ||
.. versionadded:: 3.0 | ||
%End | ||
|
||
%TypeHeaderCode | ||
#include "qgsmemoryproviderutils.h" | ||
%End | ||
public: | ||
|
||
static QgsVectorLayer *createMemoryLayer( const QString &name, | ||
const QgsFields &fields, | ||
QgsWkbTypes::Type geometryType = QgsWkbTypes::NoGeometry, | ||
const QgsCoordinateReferenceSystem &crs = QgsCoordinateReferenceSystem() ) /Factory/; | ||
%Docstring | ||
Creates a new memory layer using the specified parameters. The caller takes responsibility | ||
for deleting the newly created layer. | ||
\param name layer name | ||
\param fields fields for layer | ||
\param geometryType optional layer geometry type | ||
\param crs optional layer CRS for layers with geometry | ||
:rtype: QgsVectorLayer | ||
%End | ||
}; | ||
|
||
|
||
|
||
/************************************************************************ | ||
* This file has been generated automatically from * | ||
* * | ||
* src/core/providers/memory/qgsmemoryproviderutils.h * | ||
* * | ||
* Do not edit manually ! Edit header and run scripts/sipify.pl again * | ||
************************************************************************/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,43 +1,75 @@ | ||
/************************************************************************ | ||
* This file has been generated automatically from * | ||
* * | ||
* src/core/qgsprovidermetadata.h * | ||
* * | ||
* Do not edit manually ! Edit header and run scripts/sipify.pl again * | ||
************************************************************************/ | ||
|
||
|
||
|
||
|
||
/** \ingroup core | ||
* Holds data provider key, description, and associated shared library file information. | ||
|
||
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. | ||
|
||
*/ | ||
class QgsProviderMetadata | ||
{ | ||
%TypeHeaderCode | ||
#include <qgsprovidermetadata.h> | ||
%Docstring | ||
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. | ||
%End | ||
|
||
%TypeHeaderCode | ||
#include "qgsprovidermetadata.h" | ||
%End | ||
public: | ||
|
||
|
||
QgsProviderMetadata( const QString &_key, const QString &_description, const QString &_library ); | ||
|
||
/** This returns the unique key associated with the provider | ||
|
||
This key string is used for the associative container in QgsProviderRegistry | ||
*/ | ||
QString key() const; | ||
%Docstring | ||
This returns the unique key associated with the provider | ||
|
||
/** This returns descriptive text for the provider | ||
This key string is used for the associative container in QgsProviderRegistry | ||
:rtype: str | ||
%End | ||
|
||
This is used to provide a descriptive list of available data providers. | ||
*/ | ||
QString description() const; | ||
%Docstring | ||
This returns descriptive text for the provider | ||
|
||
/** This returns the library file name | ||
This is used to provide a descriptive list of available data providers. | ||
:rtype: str | ||
%End | ||
|
||
This is used to QLibrary calls to load the data provider. | ||
*/ | ||
QString library() const; | ||
%Docstring | ||
This returns the library file name | ||
|
||
This is used to QLibrary calls to load the data provider. | ||
:rtype: str | ||
%End | ||
|
||
|
||
}; | ||
|
||
|
||
}; // class QgsProviderMetadata | ||
/************************************************************************ | ||
* This file has been generated automatically from * | ||
* * | ||
* src/core/qgsprovidermetadata.h * | ||
* * | ||
* Do not edit manually ! Edit header and run scripts/sipify.pl again * | ||
************************************************************************/ |
Oops, something went wrong.