QGIS API Documentation
4.3.0-Master (16eddb2670e)
Toggle main menu visibility
Loading...
Searching...
No Matches
src
core
qgsproxyfeaturesink.h
Go to the documentation of this file.
1
/***************************************************************************
2
qgsproxyfeaturesink.h
3
----------------------
4
begin : April 2020
5
copyright : (C) 2020 by Nyall Dawson
6
email : nyall dot dawson at gmail dot com
7
***************************************************************************/
8
9
/***************************************************************************
10
* *
11
* This program is free software; you can redistribute it and/or modify *
12
* it under the terms of the GNU General Public License as published by *
13
* the Free Software Foundation; either version 2 of the License, or *
14
* (at your option) any later version. *
15
* *
16
***************************************************************************/
17
18
#ifndef QGSPROXYFEATURESINK_H
19
#define QGSPROXYFEATURESINK_H
20
21
#include "
qgis.h
"
22
#include "qgis_core.h"
23
#include "
qgsfeaturesink.h
"
24
37
class
CORE_EXPORT
QgsProxyFeatureSink
:
public
QgsFeatureSink
38
{
39
public
:
43
QgsProxyFeatureSink
(
QgsFeatureSink
*sink );
44
bool
addFeature
(
QgsFeature
&feature,
QgsFeatureSink::Flags
flags =
QgsFeatureSink::Flags
() )
override
;
45
bool
addFeatures
(
QgsFeatureList
&features,
QgsFeatureSink::Flags
flags =
QgsFeatureSink::Flags
() )
override
;
46
bool
addFeatures
(
QgsFeatureIterator
&iterator,
QgsFeatureSink::Flags
flags =
QgsFeatureSink::Flags
() )
override
;
47
QString
lastError
()
const override
;
48
bool
flushBuffer
()
override
;
49
void
finalize
()
override
;
50
54
QgsFeatureSink
*
destinationSink
() {
return
mSink
; }
55
56
protected
:
58
QgsFeatureSink
*
mSink
=
nullptr
;
59
};
60
61
62
#endif
// QGSPROXYFEATURESINK_H
QgsFeatureIterator
Wrapper for iterator of features from vector data provider or vector layer.
Definition
qgsfeatureiterator.h:284
QgsFeatureSink
An interface for objects which accept features via addFeature(s) methods.
Definition
qgsfeaturesink.h:33
QgsFeatureSink::flushBuffer
virtual bool flushBuffer()
Flushes any internal buffer which may exist in the sink, causing any buffered features to be added to...
Definition
qgsfeaturesink.h:113
QgsFeatureSink::addFeature
virtual bool addFeature(QgsFeature &feature, QgsFeatureSink::Flags flags=QgsFeatureSink::Flags())
Adds a single feature to the sink.
Definition
qgsfeaturesink.cpp:25
QgsFeatureSink::lastError
virtual QString lastError() const
Returns the most recent error encountered by the sink, e.g.
Definition
qgsfeaturesink.h:120
QgsFeatureSink::addFeatures
virtual bool addFeatures(QgsFeatureList &features, QgsFeatureSink::Flags flags=QgsFeatureSink::Flags())=0
Adds a list of features to the sink.
QgsFeatureSink::finalize
virtual void finalize()
Finalizes the sink, flushing any buffered features to the destination.
Definition
qgsfeaturesink.cpp:20
QgsFeatureSink::Flags
QFlags< Flag > Flags
Definition
qgsfeaturesink.h:78
QgsFeature
The feature class encapsulates a single feature including its unique ID, geometry and a list of field...
Definition
qgsfeature.h:60
QgsProxyFeatureSink::mSink
QgsFeatureSink * mSink
Underlying destination sink.
Definition
qgsproxyfeaturesink.h:58
QgsProxyFeatureSink::destinationSink
QgsFeatureSink * destinationSink()
Returns the destination QgsFeatureSink which the proxy will forward features to.
Definition
qgsproxyfeaturesink.h:54
QgsProxyFeatureSink::QgsProxyFeatureSink
QgsProxyFeatureSink(QgsFeatureSink *sink)
Constructs a new QgsProxyFeatureSink which forwards features onto a destination sink.
Definition
qgsproxyfeaturesink.cpp:20
qgis.h
QgsFeatureList
QList< QgsFeature > QgsFeatureList
Definition
qgsfeature.h:1289
qgsfeaturesink.h
Generated on
for QGIS API Documentation by
1.17.0