13#ifndef OGREDITABLELAYER_H_INCLUDED
14#define OGREDITABLELAYER_H_INCLUDED
17#include "ogrlayerdecorator.h"
21class CPL_DLL IOGREditableLayerSynchronizer
24 virtual ~IOGREditableLayerSynchronizer();
30class CPL_DLL OGREditableLayer :
public OGRLayerDecorator
35 IOGREditableLayerSynchronizer *m_poSynchronizer;
36 bool m_bTakeOwnershipSynchronizer;
39 std::set<GIntBig> m_oSetCreated{};
40 std::set<GIntBig> m_oSetEdited{};
41 std::set<GIntBig> m_oSetDeleted{};
42 std::set<GIntBig>::iterator m_oIter{};
43 std::set<CPLString> m_oSetDeletedFields{};
45 bool m_bStructureModified;
46 bool m_bSupportsCreateGeomField;
47 bool m_bSupportsCurveGeometries;
48 std::map<CPLString, int> m_oMapEditableFDefnFieldNameToIdx{};
51 OGRFeature *poSrcFeature,
bool bCanStealSrcFeature,
52 bool bHideDeletedFields);
54 int GetSrcGeomFieldIndex(
int iGeomField);
57 OGREditableLayer(
OGRLayer *poDecoratedLayer,
58 bool bTakeOwnershipDecoratedLayer,
59 IOGREditableLayerSynchronizer *poSynchronizer,
60 bool bTakeOwnershipSynchronizer);
61 ~OGREditableLayer()
override;
63 void SetNextFID(
GIntBig nNextFID);
64 void SetSupportsCreateGeomField(
bool SupportsCreateGeomField);
65 void SetSupportsCurveGeometries(
bool bSupportsCurveGeometries);
68 virtual OGRErr ISetSpatialFilter(
int iGeomField,
71 OGRErr SetAttributeFilter(
const char *)
override;
72 virtual bool GetArrowStream(
struct ArrowArrayStream *out_stream,
75 void ResetReading()
override;
83 const int *panUpdatedFieldsIdx,
84 int nUpdatedGeomFieldsCount,
85 const int *panUpdatedGeomFieldsIdx,
86 bool bUpdateStyleString)
override;
90 using OGRLayerDecorator::GetLayerDefn;
95 GIntBig GetFeatureCount(
int bForce = TRUE)
override;
97 bool bForce)
override;
99 int TestCapability(
const char *)
const override;
102 int bApproxOK = TRUE)
override;
103 OGRErr DeleteField(
int iField)
override;
104 OGRErr ReorderFields(
int *panMap)
override;
106 int nFlags)
override;
108 AlterGeomFieldDefn(
int iGeomField,
110 int nFlags)
override;
113 int bApproxOK = TRUE)
override;
115 OGRErr SyncToDisk()
override;
117 OGRErr StartTransaction()
override;
118 OGRErr CommitTransaction()
override;
119 OGRErr RollbackTransaction()
override;
121 const char *GetGeometryColumn()
const override;
Simple container for a bounding region (rectangle)
Definition ogr_core.h:44
Definition of a feature class or feature layer.
Definition ogr_feature.h:504
A simple feature, including geometry and attributes.
Definition ogr_feature.h:934
Definition of an attribute of an OGRFeatureDefn.
Definition ogr_feature.h:69
Definition of a geometry field of an OGRFeatureDefn.
Definition ogr_feature.h:332
Abstract base class for all geometry classes.
Definition ogr_geometry.h:357
This class represents a layer of simple features, with access methods.
Definition ogrsf_frmts.h:61
This class represents an OpenGIS Spatial Reference System, and contains methods for converting betwee...
Definition ogr_spatialref.h:152
#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:936
char ** CSLConstList
Type of a constant null-terminated list of nul terminated strings.
Definition cpl_port.h:1087
long long GIntBig
Large signed integer type (generally 64-bit integer type).
Definition cpl_port.h:205
OGRwkbGeometryType
List of well known binary geometry types.
Definition ogr_core.h:405
int OGRErr
Type for a OGR error.
Definition ogr_core.h:370