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 #include "cpl_multiproc.h"
00035
00043 class CPL_DLL OGRMutexedLayer : public OGRLayerDecorator
00044 {
00045 protected:
00046 CPLMutex *m_hMutex;
00047
00048 public:
00049
00050
00051 OGRMutexedLayer(OGRLayer* poDecoratedLayer,
00052 int bTakeOwnership,
00053 CPLMutex* hMutex);
00054
00055
00056 virtual ~OGRMutexedLayer();
00057
00058 virtual OGRGeometry *GetSpatialFilter();
00059 virtual void SetSpatialFilter( OGRGeometry * );
00060 virtual void SetSpatialFilterRect( double dfMinX, double dfMinY,
00061 double dfMaxX, double dfMaxY );
00062 virtual void SetSpatialFilter( int iGeomField, OGRGeometry * );
00063 virtual void SetSpatialFilterRect( int iGeomField, double dfMinX, double dfMinY,
00064 double dfMaxX, double dfMaxY );
00065
00066 virtual OGRErr SetAttributeFilter( const char * );
00067
00068 virtual void ResetReading();
00069 virtual OGRFeature *GetNextFeature();
00070 virtual OGRErr SetNextByIndex( GIntBig nIndex );
00071 virtual OGRFeature *GetFeature( GIntBig nFID );
00072 virtual OGRErr ISetFeature( OGRFeature *poFeature );
00073 virtual OGRErr ICreateFeature( OGRFeature *poFeature );
00074 virtual OGRErr DeleteFeature( GIntBig nFID );
00075
00076 virtual const char *GetName();
00077 virtual OGRwkbGeometryType GetGeomType();
00078 virtual OGRFeatureDefn *GetLayerDefn();
00079
00080 virtual OGRSpatialReference *GetSpatialRef();
00081
00082 virtual GIntBig GetFeatureCount( int bForce = TRUE );
00083 virtual OGRErr GetExtent(int iGeomField, OGREnvelope *psExtent, int bForce = TRUE);
00084 virtual OGRErr GetExtent(OGREnvelope *psExtent, int bForce = TRUE);
00085
00086 virtual int TestCapability( const char * );
00087
00088 virtual OGRErr CreateField( OGRFieldDefn *poField,
00089 int bApproxOK = TRUE );
00090 virtual OGRErr DeleteField( int iField );
00091 virtual OGRErr ReorderFields( int* panMap );
00092 virtual OGRErr AlterFieldDefn( int iField, OGRFieldDefn* poNewFieldDefn, int nFlags );
00093
00094 virtual OGRErr SyncToDisk();
00095
00096 virtual OGRStyleTable *GetStyleTable();
00097 virtual void SetStyleTableDirectly( OGRStyleTable *poStyleTable );
00098
00099 virtual void SetStyleTable(OGRStyleTable *poStyleTable);
00100
00101 virtual OGRErr StartTransaction();
00102 virtual OGRErr CommitTransaction();
00103 virtual OGRErr RollbackTransaction();
00104
00105 virtual const char *GetFIDColumn();
00106 virtual const char *GetGeometryColumn();
00107
00108 virtual OGRErr SetIgnoredFields( const char **papszFields );
00109
00110 virtual char **GetMetadata( const char * pszDomain = "" );
00111 virtual CPLErr SetMetadata( char ** papszMetadata,
00112 const char * pszDomain = "" );
00113 virtual const char *GetMetadataItem( const char * pszName,
00114 const char * pszDomain = "" );
00115 virtual CPLErr SetMetadataItem( const char * pszName,
00116 const char * pszValue,
00117 const char * pszDomain = "" );
00118 };
00119
00120 #endif // _OGRMUTEXEDLAYER_H_INCLUDED