GDAL
ogrmutexedlayer.h
00001 /******************************************************************************
00002  * $Id: ogrmutexedlayer.h 36501 2016-11-25 14:09:24Z rouault $
00003  *
00004  * Project:  OpenGIS Simple Features Reference Implementation
00005  * Purpose:  Defines OGRLMutexedLayer class
00006  * Author:   Even Rouault, even dot rouault at mines dash paris dot org
00007  *
00008  ******************************************************************************
00009  * Copyright (c) 2013, Even Rouault <even dot rouault at mines-paris dot org>
00010  *
00011  * Permission is hereby granted, free of charge, to any person obtaining a
00012  * copy of this software and associated documentation files (the "Software"),
00013  * to deal in the Software without restriction, including without limitation
00014  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
00015  * and/or sell copies of the Software, and to permit persons to whom the
00016  * Software is furnished to do so, subject to the following conditions:
00017  *
00018  * The above copyright notice and this permission notice shall be included
00019  * in all copies or substantial portions of the Software.
00020  *
00021  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
00022  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
00023  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
00024  * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
00025  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
00026  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
00027  * DEALINGS IN THE SOFTWARE.
00028  ****************************************************************************/
00029 
00030 #ifndef OGRMUTEXEDLAYER_H_INCLUDED
00031 #define OGRMUTEXEDLAYER_H_INCLUDED
00032 
00033 #ifndef DOXYGEN_SKIP
00034 
00035 #include "ogrlayerdecorator.h"
00036 #include "cpl_multiproc.h"
00037 
00045 class CPL_DLL OGRMutexedLayer : public OGRLayerDecorator
00046 {
00047   protected:
00048         CPLMutex          *m_hMutex;
00049 
00050   public:
00051 
00052     /* The construction of the object isn't protected by the mutex */
00053                        OGRMutexedLayer(OGRLayer* poDecoratedLayer,
00054                                        int bTakeOwnership,
00055                                        CPLMutex* hMutex);
00056 
00057     /* The destruction of the object isn't protected by the mutex */
00058     virtual           ~OGRMutexedLayer();
00059 
00060     virtual OGRGeometry *GetSpatialFilter() override;
00061     virtual void        SetSpatialFilter( OGRGeometry * ) override;
00062     virtual void        SetSpatialFilterRect( double dfMinX, double dfMinY,
00063                                               double dfMaxX, double dfMaxY ) override;
00064     virtual void        SetSpatialFilter( int iGeomField, OGRGeometry * ) override;
00065     virtual void        SetSpatialFilterRect( int iGeomField, double dfMinX, double dfMinY,
00066                                               double dfMaxX, double dfMaxY ) override;
00067 
00068     virtual OGRErr      SetAttributeFilter( const char * ) override;
00069 
00070     virtual void        ResetReading() override;
00071     virtual OGRFeature *GetNextFeature() override;
00072     virtual OGRErr      SetNextByIndex( GIntBig nIndex ) override;
00073     virtual OGRFeature *GetFeature( GIntBig nFID ) override;
00074     virtual OGRErr      ISetFeature( OGRFeature *poFeature ) override;
00075     virtual OGRErr      ICreateFeature( OGRFeature *poFeature ) override;
00076     virtual OGRErr      DeleteFeature( GIntBig nFID ) override;
00077 
00078     virtual const char *GetName() override;
00079     virtual OGRwkbGeometryType GetGeomType() override;
00080     virtual OGRFeatureDefn *GetLayerDefn() override;
00081 
00082     virtual OGRSpatialReference *GetSpatialRef() override;
00083 
00084     virtual GIntBig     GetFeatureCount( int bForce = TRUE ) override;
00085     virtual OGRErr      GetExtent(int iGeomField, OGREnvelope *psExtent, int bForce = TRUE) override;
00086     virtual OGRErr      GetExtent(OGREnvelope *psExtent, int bForce = TRUE) override;
00087 
00088     virtual int         TestCapability( const char * ) override;
00089 
00090     virtual OGRErr      CreateField( OGRFieldDefn *poField,
00091                                      int bApproxOK = TRUE ) override;
00092     virtual OGRErr      DeleteField( int iField ) override;
00093     virtual OGRErr      ReorderFields( int* panMap ) override;
00094     virtual OGRErr      AlterFieldDefn( int iField, OGRFieldDefn* poNewFieldDefn, int nFlags ) override;
00095 
00096     virtual OGRErr      SyncToDisk() override;
00097 
00098     virtual OGRStyleTable *GetStyleTable() override;
00099     virtual void        SetStyleTableDirectly( OGRStyleTable *poStyleTable ) override;
00100 
00101     virtual void        SetStyleTable(OGRStyleTable *poStyleTable) override;
00102 
00103     virtual OGRErr      StartTransaction() override;
00104     virtual OGRErr      CommitTransaction() override;
00105     virtual OGRErr      RollbackTransaction() override;
00106 
00107     virtual const char *GetFIDColumn() override;
00108     virtual const char *GetGeometryColumn() override;
00109 
00110     virtual OGRErr      SetIgnoredFields( const char **papszFields ) override;
00111 
00112     virtual char      **GetMetadata( const char * pszDomain = "" ) override;
00113     virtual CPLErr      SetMetadata( char ** papszMetadata,
00114                                      const char * pszDomain = "" ) override;
00115     virtual const char *GetMetadataItem( const char * pszName,
00116                                          const char * pszDomain = "" ) override;
00117     virtual CPLErr      SetMetadataItem( const char * pszName,
00118                                          const char * pszValue,
00119                                          const char * pszDomain = "" ) override;
00120 };
00121 
00122 #endif /* #ifndef DOXYGEN_SKIP */
00123 
00124 #endif // OGRMUTEXEDLAYER_H_INCLUDED

Generated for GDAL by doxygen 1.7.6.1.