File: qgsfeaturesink.sip.in

package info (click to toggle)
qgis 3.40.11%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,183,800 kB
  • sloc: cpp: 1,595,841; python: 372,637; xml: 23,474; sh: 3,761; perl: 3,664; ansic: 2,257; sql: 2,137; yacc: 1,068; lex: 577; javascript: 540; lisp: 411; makefile: 154
file content (101 lines) | stat: -rw-r--r-- 3,195 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
/************************************************************************
 * This file has been generated automatically from                      *
 *                                                                      *
 * src/core/qgsfeaturesink.h                                            *
 *                                                                      *
 * Do not edit manually ! Edit header and run scripts/sipify.py again   *
 ************************************************************************/




class QgsFeatureSink
{
%Docstring(signature="appended")
An interface for objects which accept features via addFeature(s)
methods.
%End

%TypeHeaderCode
#include "qgsfeaturesink.h"
%End
  public:

    enum SinkFlag /BaseType=IntEnum/
    {

      RegeneratePrimaryKey,
    };
    typedef QFlags<QgsFeatureSink::SinkFlag> SinkFlags;


    enum Flag /BaseType=IntEnum/
    {

      FastInsert,

      RollBackOnErrors,
    };
    typedef QFlags<QgsFeatureSink::Flag> Flags;


    virtual ~QgsFeatureSink();

    virtual bool addFeature( QgsFeature &feature, QgsFeatureSink::Flags flags = QgsFeatureSink::Flags() );
%Docstring
Adds a single ``feature`` to the sink. Feature addition behavior is
controlled by the specified ``flags``.

.. seealso:: :py:func:`addFeatures`

:return: ``True`` in case of success and ``False`` in case of failure
%End

    virtual bool addFeatures( QgsFeatureList &features, QgsFeatureSink::Flags flags = QgsFeatureSink::Flags() ) = 0;
%Docstring
Adds a list of ``features`` to the sink. Feature addition behavior is
controlled by the specified ``flags``.

.. seealso:: :py:func:`addFeature`

:return: ``True`` in case of success and ``False`` in case of failure
%End

    virtual bool addFeatures( QgsFeatureIterator &iterator, QgsFeatureSink::Flags flags = QgsFeatureSink::Flags() );
%Docstring
Adds all features from the specified ``iterator`` to the sink. Feature
addition behavior is controlled by the specified ``flags``.

:return: ``True`` if all features were added successfully, or ``False``
         if any feature could not be added
%End

    virtual bool flushBuffer();
%Docstring
Flushes any internal buffer which may exist in the sink, causing any
buffered features to be added to the sink's destination.

:return: ``False`` if any buffered features could not be added to the
         sink.
%End

    virtual QString lastError() const;
%Docstring
Returns the most recent error encountered by the sink, e.g. when a call
to :py:func:`~QgsFeatureSink.addFeatures` returns ``False``.

.. versionadded:: 3.16
%End
};

QFlags<QgsFeatureSink::Flag> operator|(QgsFeatureSink::Flag f1, QFlags<QgsFeatureSink::Flag> f2);



/************************************************************************
 * This file has been generated automatically from                      *
 *                                                                      *
 * src/core/qgsfeaturesink.h                                            *
 *                                                                      *
 * Do not edit manually ! Edit header and run scripts/sipify.py again   *
 ************************************************************************/