30 #ifndef OGREDITABLELAYER_H_INCLUDED
31 #define OGREDITABLELAYER_H_INCLUDED
34 #include "ogrlayerdecorator.h"
38 class CPL_DLL IOGREditableLayerSynchronizer
41 virtual ~IOGREditableLayerSynchronizer();
47 class CPL_DLL OGREditableLayer :
public OGRLayerDecorator
52 IOGREditableLayerSynchronizer *m_poSynchronizer;
53 bool m_bTakeOwnershipSynchronizer;
56 std::set<GIntBig> m_oSetCreated{};
57 std::set<GIntBig> m_oSetEdited{};
58 std::set<GIntBig> m_oSetDeleted{};
59 std::set<GIntBig>::iterator m_oIter{};
60 std::set<CPLString> m_oSetDeletedFields{};
62 bool m_bStructureModified;
63 bool m_bSupportsCreateGeomField;
64 bool m_bSupportsCurveGeometries;
65 std::map<CPLString, int> m_oMapEditableFDefnFieldNameToIdx{};
68 OGRFeature *poSrcFeature,
bool bCanStealSrcFeature,
69 bool bHideDeletedFields);
71 int GetSrcGeomFieldIndex(
int iGeomField);
74 OGREditableLayer(
OGRLayer *poDecoratedLayer,
75 bool bTakeOwnershipDecoratedLayer,
76 IOGREditableLayerSynchronizer *poSynchronizer,
77 bool bTakeOwnershipSynchronizer);
78 virtual ~OGREditableLayer();
80 void SetNextFID(
GIntBig nNextFID);
81 void SetSupportsCreateGeomField(
bool SupportsCreateGeomField);
82 void SetSupportsCurveGeometries(
bool bSupportsCurveGeometries);
85 virtual void SetSpatialFilter(
OGRGeometry *)
override;
86 virtual void SetSpatialFilterRect(
double dfMinX,
double dfMinY,
87 double dfMaxX,
double dfMaxY)
override;
88 virtual void SetSpatialFilter(
int iGeomField,
OGRGeometry *)
override;
89 virtual void SetSpatialFilterRect(
int iGeomField,
double dfMinX,
90 double dfMinY,
double dfMaxX,
91 double dfMaxY)
override;
93 virtual OGRErr SetAttributeFilter(
const char *)
override;
94 virtual bool GetArrowStream(
struct ArrowArrayStream *out_stream,
97 virtual void ResetReading()
override;
105 const int *panUpdatedFieldsIdx,
106 int nUpdatedGeomFieldsCount,
107 const int *panUpdatedGeomFieldsIdx,
108 bool bUpdateStyleString)
override;
116 virtual GIntBig GetFeatureCount(
int bForce = TRUE)
override;
118 int bForce = TRUE)
override;
121 virtual int TestCapability(
const char *)
override;
124 int bApproxOK = TRUE)
override;
125 virtual OGRErr DeleteField(
int iField)
override;
126 virtual OGRErr ReorderFields(
int *panMap)
override;
128 int nFlags)
override;
130 AlterGeomFieldDefn(
int iGeomField,
132 int nFlags)
override;
135 int bApproxOK = TRUE)
override;
137 virtual OGRErr SyncToDisk()
override;
139 virtual OGRErr StartTransaction()
override;
140 virtual OGRErr CommitTransaction()
override;
141 virtual OGRErr RollbackTransaction()
override;
143 virtual const char *GetGeometryColumn()
override;
Simple container for a bounding region (rectangle)
Definition: ogr_core.h:61
Definition of a feature class or feature layer.
Definition: ogr_feature.h:517
A simple feature, including geometry and attributes.
Definition: ogr_feature.h:893
Definition of an attribute of an OGRFeatureDefn.
Definition: ogr_feature.h:111
Definition of a geometry field of an OGRFeatureDefn.
Definition: ogr_feature.h:346
Abstract base class for all geometry classes.
Definition: ogr_geometry.h:377
This class represents a layer of simple features, with access methods.
Definition: ogrsf_frmts.h:74
This class represents an OpenGIS Spatial Reference System, and contains methods for converting betwee...
Definition: ogr_spatialref.h:169
#define CPL_DISALLOW_COPY_ASSIGN(ClassName)
Helper to remove the copy and assignment constructors so that the compiler will not generate the defa...
Definition: cpl_port.h:1042
char ** CSLConstList
Type of a constant null-terminated list of nul terminated strings.
Definition: cpl_port.h:1183
long long GIntBig
Large signed integer type (generally 64-bit integer type).
Definition: cpl_port.h:215
OGRwkbGeometryType
List of well known binary geometry types.
Definition: ogr_core.h:416
int OGRErr
Type for a OGR error.
Definition: ogr_core.h:387