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