|
GDAL
|
00001 /****************************************************************************** 00002 * $Id: ogrlayerdecorator.h 36501 2016-11-25 14:09:24Z rouault $ 00003 * 00004 * Project: OpenGIS Simple Features Reference Implementation 00005 * Purpose: Defines OGRLayerDecorator class 00006 * Author: Even Rouault, even dot rouault at mines dash paris dot org 00007 * 00008 ****************************************************************************** 00009 * Copyright (c) 2012-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 OGRLAYERDECORATOR_H_INCLUDED 00031 #define OGRLAYERDECORATOR_H_INCLUDED 00032 00033 #ifndef DOXYGEN_SKIP 00034 00035 #include "ogrsf_frmts.h" 00036 00037 class CPL_DLL OGRLayerDecorator : public OGRLayer 00038 { 00039 protected: 00040 OGRLayer *m_poDecoratedLayer; 00041 int m_bHasOwnership; 00042 00043 public: 00044 00045 OGRLayerDecorator(OGRLayer* poDecoratedLayer, 00046 int bTakeOwnership); 00047 virtual ~OGRLayerDecorator(); 00048 00049 virtual OGRGeometry *GetSpatialFilter() override; 00050 virtual void SetSpatialFilter( OGRGeometry * ) override; 00051 virtual void SetSpatialFilterRect( double dfMinX, double dfMinY, 00052 double dfMaxX, double dfMaxY ) override; 00053 virtual void SetSpatialFilter( int iGeomField, OGRGeometry * ) override; 00054 virtual void SetSpatialFilterRect( int iGeomField, double dfMinX, double dfMinY, 00055 double dfMaxX, double dfMaxY ) override; 00056 00057 virtual OGRErr SetAttributeFilter( const char * ) override; 00058 00059 virtual void ResetReading() override; 00060 virtual OGRFeature *GetNextFeature() override; 00061 virtual OGRErr SetNextByIndex( GIntBig nIndex ) override; 00062 virtual OGRFeature *GetFeature( GIntBig nFID ) override; 00063 virtual OGRErr ISetFeature( OGRFeature *poFeature ) override; 00064 virtual OGRErr ICreateFeature( OGRFeature *poFeature ) override; 00065 virtual OGRErr DeleteFeature( GIntBig nFID ) override; 00066 00067 virtual const char *GetName() override; 00068 virtual OGRwkbGeometryType GetGeomType() override; 00069 virtual OGRFeatureDefn *GetLayerDefn() override; 00070 00071 virtual OGRSpatialReference *GetSpatialRef() override; 00072 00073 virtual GIntBig GetFeatureCount( int bForce = TRUE ) override; 00074 virtual OGRErr GetExtent(int iGeomField, OGREnvelope *psExtent, int bForce = TRUE) override; 00075 virtual OGRErr GetExtent(OGREnvelope *psExtent, int bForce = TRUE) override; 00076 00077 virtual int TestCapability( const char * ) override; 00078 00079 virtual OGRErr CreateField( OGRFieldDefn *poField, 00080 int bApproxOK = TRUE ) override; 00081 virtual OGRErr DeleteField( int iField ) override; 00082 virtual OGRErr ReorderFields( int* panMap ) override; 00083 virtual OGRErr AlterFieldDefn( int iField, OGRFieldDefn* poNewFieldDefn, int nFlags ) override; 00084 00085 virtual OGRErr CreateGeomField( OGRGeomFieldDefn *poField, 00086 int bApproxOK = TRUE ) override; 00087 00088 virtual OGRErr SyncToDisk() override; 00089 00090 virtual OGRStyleTable *GetStyleTable() override; 00091 virtual void SetStyleTableDirectly( OGRStyleTable *poStyleTable ) override; 00092 00093 virtual void SetStyleTable(OGRStyleTable *poStyleTable) override; 00094 00095 virtual OGRErr StartTransaction() override; 00096 virtual OGRErr CommitTransaction() override; 00097 virtual OGRErr RollbackTransaction() override; 00098 00099 virtual const char *GetFIDColumn() override; 00100 virtual const char *GetGeometryColumn() override; 00101 00102 virtual OGRErr SetIgnoredFields( const char **papszFields ) override; 00103 00104 virtual char **GetMetadata( const char * pszDomain = "" ) override; 00105 virtual CPLErr SetMetadata( char ** papszMetadata, 00106 const char * pszDomain = "" ) override; 00107 virtual const char *GetMetadataItem( const char * pszName, 00108 const char * pszDomain = "" ) override; 00109 virtual CPLErr SetMetadataItem( const char * pszName, 00110 const char * pszValue, 00111 const char * pszDomain = "" ) override; 00112 00113 OGRLayer* GetBaseLayer() { return m_poDecoratedLayer; } 00114 }; 00115 00116 #endif /* #ifndef DOXYGEN_SKIP */ 00117 00118 #endif // OGRLAYERDECORATOR_H_INCLUDED
1.7.6.1.