QGIS/python/core/processing/qgsprocessingoutputs.sip
Nyall Dawson fb811766f8 Add framework for algorithm outputs
This somewhat changes the meaning of outputs from processing 2.x.
In 2.x processing outputs were used both as a method of specifying
inputs to algorithms (file paths to destination layers created
by the algorithm) AND pure outputs (such as statistics calculated
by the algorithm).

This is now split. The old input-type-outputs (destination layers)
are now input parameters (since the parameter value IS an input to the
algorithm). To differentiate them from parameters indicating pure
input layers a new "isDestination()" method was added to
QgsProcessingParameterDefinition.

Output definitions are now purely indications of values CREATED
by the algorithms. Suitable candidates are the existing calculated
stats and actual file path/URI of any layers created by the algorithm.
Moving forward we should ensure all algorithms output as much
useful information as possible - e.g. number of features processed,
number of skipped features, count null geometries encountered, etc...
2017-06-06 07:41:19 +10:00

126 lines
3.4 KiB
Plaintext

/************************************************************************
* This file has been generated automatically from *
* *
* src/core/processing/qgsprocessingoutputs.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/
class QgsProcessingOutputDefinition
{
%Docstring
Base class for the definition of processing outputs.
Output definitions encapsulate the properties regarding the outputs from algorithms, such
as generated layers or calculated values.
.. versionadded:: 3.0
%End
%TypeHeaderCode
#include "qgsprocessingoutputs.h"
%End
public:
QgsProcessingOutputDefinition( const QString &name, const QString &description = QString() );
%Docstring
Constructor for QgsProcessingOutputDefinition.
%End
virtual ~QgsProcessingOutputDefinition();
virtual QString type() const = 0;
%Docstring
Unique output type name.
:rtype: str
%End
QString name() const;
%Docstring
Returns the name of the output. This is the internal identifier by which
algorithms access this output.
@see setName()
:rtype: str
%End
void setName( const QString &name );
%Docstring
Sets the ``name`` of the output. This is the internal identifier by which
algorithms access this output.
@see name()
%End
QString description() const;
%Docstring
Returns the description for the output. This is the user-visible string
used to identify this output.
@see setDescription()
:rtype: str
%End
void setDescription( const QString &description );
%Docstring
Sets the ``description`` for the output. This is the user-visible string
used to identify this output.
@see description()
%End
protected:
};
typedef QList< const QgsProcessingOutputDefinition * > QgsProcessingOutputDefinitions;
class QgsProcessingOutputVectorLayer : QgsProcessingOutputDefinition
{
%Docstring
A vector layer output for processing algorithms.
.. versionadded:: 3.0
%End
%TypeHeaderCode
#include "qgsprocessingoutputs.h"
%End
public:
QgsProcessingOutputVectorLayer( const QString &name, const QString &description = QString(), QgsProcessingParameterDefinition::LayerType type = QgsProcessingParameterDefinition::TypeVectorAny );
%Docstring
Constructor for QgsProcessingOutputVectorLayer.
%End
virtual QString type() const;
QgsProcessingParameterDefinition::LayerType dataType() const;
%Docstring
Returns the layer type for the output layer.
.. seealso:: setDataType()
:rtype: QgsProcessingParameterDefinition.LayerType
%End
void setDataType( QgsProcessingParameterDefinition::LayerType type );
%Docstring
Sets the layer ``type`` for the output layer.
.. seealso:: dataType()
%End
};
/************************************************************************
* This file has been generated automatically from *
* *
* src/core/processing/qgsprocessingoutputs.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/