00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030 #ifndef _OGRMUTEXEDLAYER_H_INCLUDED
00031 #define _OGRMUTEXEDLAYER_H_INCLUDED
00032
00033 #include "ogrlayerdecorator.h"
00034
00042 class CPL_DLL OGRMutexedLayer : public OGRLayerDecorator
00043 {
00044 protected:
00045 void *m_hMutex;
00046
00047 public:
00048
00049
00050 OGRMutexedLayer(OGRLayer* poDecoratedLayer,
00051 int bTakeOwnership,
00052 void* hMutex);
00053
00054
00055 virtual ~OGRMutexedLayer();
00056
00057 virtual OGRGeometry *GetSpatialFilter();
00058 virtual void SetSpatialFilter( OGRGeometry * );
00059 virtual void SetSpatialFilterRect( double dfMinX, double dfMinY,
00060 double dfMaxX, double dfMaxY );
00061 virtual void SetSpatialFilter( int iGeomField, OGRGeometry * );
00062 virtual void SetSpatialFilterRect( int iGeomField, double dfMinX, double dfMinY,
00063 double dfMaxX, double dfMaxY );
00064
00065 virtual OGRErr SetAttributeFilter( const char * );
00066
00067 virtual void ResetReading();
00068 virtual OGRFeature *GetNextFeature();
00069 virtual OGRErr SetNextByIndex( long nIndex );
00070 virtual OGRFeature *GetFeature( long nFID );
00071 virtual OGRErr SetFeature( OGRFeature *poFeature );
00072 virtual OGRErr CreateFeature( OGRFeature *poFeature );
00073 virtual OGRErr DeleteFeature( long nFID );
00074
00075 virtual const char *GetName();
00076 virtual OGRwkbGeometryType GetGeomType();
00077 virtual OGRFeatureDefn *GetLayerDefn();
00078
00079 virtual OGRSpatialReference *GetSpatialRef();
00080
00081 virtual int GetFeatureCount( int bForce = TRUE );
00082 virtual OGRErr GetExtent(int iGeomField, OGREnvelope *psExtent, int bForce = TRUE);
00083 virtual OGRErr GetExtent(OGREnvelope *psExtent, int bForce = TRUE);
00084
00085 virtual int TestCapability( const char * );
00086
00087
00088
00089
00090 virtual OGRErr CreateField( OGRFieldDefn *poField,
00091 int bApproxOK = TRUE );
00092 virtual OGRErr DeleteField( int iField );
00093 virtual OGRErr ReorderFields( int* panMap );
00094 virtual OGRErr AlterFieldDefn( int iField, OGRFieldDefn* poNewFieldDefn, int nFlags );
00095
00096 virtual OGRErr SyncToDisk();
00097
00098 virtual OGRStyleTable *GetStyleTable();
00099 virtual void SetStyleTableDirectly( OGRStyleTable *poStyleTable );
00100
00101 virtual void SetStyleTable(OGRStyleTable *poStyleTable);
00102
00103 virtual OGRErr StartTransaction();
00104 virtual OGRErr CommitTransaction();
00105 virtual OGRErr RollbackTransaction();
00106
00107 virtual const char *GetFIDColumn();
00108 virtual const char *GetGeometryColumn();
00109
00110 virtual OGRErr SetIgnoredFields( const char **papszFields );
00111 };
00112
00113 #endif // _OGRMUTEXEDLAYER_H_INCLUDED