30 #ifndef OGRLAYERPOOL_H_INCLUDED 31 #define OGRLAYERPOOL_H_INCLUDED 37 typedef OGRLayer* (*OpenLayerFunc)(
void* user_data);
38 typedef void (*FreeUserDataFunc)(
void* user_data);
46 class OGRAbstractProxiedLayer :
public OGRLayer 50 friend class OGRLayerPool;
52 OGRAbstractProxiedLayer *poPrevLayer;
53 OGRAbstractProxiedLayer *poNextLayer;
58 virtual void CloseUnderlyingLayer() = 0;
61 explicit OGRAbstractProxiedLayer(OGRLayerPool* poPool);
62 virtual ~OGRAbstractProxiedLayer();
74 OGRAbstractProxiedLayer *poMRULayer;
75 OGRAbstractProxiedLayer *poLRULayer;
77 int nMaxSimultaneouslyOpened;
80 explicit OGRLayerPool(
int nMaxSimultaneouslyOpened = 100);
83 void SetLastUsedLayer(OGRAbstractProxiedLayer* poProxiedLayer);
84 void UnchainLayer(OGRAbstractProxiedLayer* poProxiedLayer);
86 int GetMaxSimultaneouslyOpened()
const {
return nMaxSimultaneouslyOpened; }
87 int GetSize()
const {
return nMRUListSize; }
94 class OGRProxiedLayer :
public OGRAbstractProxiedLayer
98 OpenLayerFunc pfnOpenLayer;
99 FreeUserDataFunc pfnFreeUserData;
105 int OpenUnderlyingLayer();
109 virtual void CloseUnderlyingLayer()
override;
113 OGRProxiedLayer(OGRLayerPool* poPool,
114 OpenLayerFunc pfnOpenLayer,
115 FreeUserDataFunc pfnFreeUserData,
117 virtual ~OGRProxiedLayer();
122 virtual void SetSpatialFilter(
OGRGeometry * )
override;
123 virtual void SetSpatialFilter(
int iGeomField,
OGRGeometry * )
override;
125 virtual OGRErr SetAttributeFilter(
const char * )
override;
127 virtual void ResetReading()
override;
128 virtual OGRFeature *GetNextFeature()
override;
135 virtual const char *GetName()
override;
141 virtual GIntBig GetFeatureCount(
int bForce = TRUE )
override;
142 virtual OGRErr GetExtent(
int iGeomField, OGREnvelope *psExtent,
int bForce = TRUE)
override;
143 virtual OGRErr GetExtent(OGREnvelope *psExtent,
int bForce = TRUE)
override;
145 virtual int TestCapability(
const char * )
override;
148 int bApproxOK = TRUE )
override;
149 virtual OGRErr DeleteField(
int iField )
override;
150 virtual OGRErr ReorderFields(
int* panMap )
override;
151 virtual OGRErr AlterFieldDefn(
int iField,
OGRFieldDefn* poNewFieldDefn,
int nFlags )
override;
153 virtual OGRErr SyncToDisk()
override;
156 virtual void SetStyleTableDirectly(
OGRStyleTable *poStyleTable )
override;
158 virtual void SetStyleTable(
OGRStyleTable *poStyleTable)
override;
160 virtual OGRErr StartTransaction()
override;
161 virtual OGRErr CommitTransaction()
override;
162 virtual OGRErr RollbackTransaction()
override;
164 virtual const char *GetFIDColumn()
override;
165 virtual const char *GetGeometryColumn()
override;
167 virtual OGRErr SetIgnoredFields(
const char **papszFields )
override;
172 #endif // OGRLAYERPOOL_H_INCLUDED Definition of a feature class or feature layer.
Definition: ogr_feature.h:259
Definition of an attribute of an OGRFeatureDefn.
Definition: ogr_feature.h:92
OGRwkbGeometryType
List of well known binary geometry types.
Definition: ogr_core.h:317
Abstract base class for all geometry classes.
Definition: ogr_geometry.h:286
Classes related to registration of format support, and opening datasets.
This class represents an OpenGIS Spatial Reference System, and contains methods for converting betwee...
Definition: ogr_spatialref.h:147
This class represents a layer of simple features, with access methods.
Definition: ogrsf_frmts.h:70
A simple feature, including geometry and attributes.
Definition: ogr_feature.h:354
This class represents a style table.
Definition: ogr_featurestyle.h:84
long long GIntBig
Large signed integer type (generally 64-bit integer type).
Definition: cpl_port.h:248
int OGRErr
Simple container for a bounding region.
Definition: ogr_core.h:290
#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:989