OGR
ogrlayerdecorator.h
1 /******************************************************************************
2  * $Id: ogrlayerdecorator.h 24633 2012-07-01 14:37:25Z rouault $
3  *
4  * Project: OpenGIS Simple Features Reference Implementation
5  * Purpose: Defines OGRLayerDecorator class
6  * Author: Even Rouault, even dot rouault at mines dash paris dot org
7  *
8  ******************************************************************************
9  * Copyright (c) 2012, Even Rouault <even dot rouault at mines dash paris dot org>
10  *
11  * Permission is hereby granted, free of charge, to any person obtaining a
12  * copy of this software and associated documentation files (the "Software"),
13  * to deal in the Software without restriction, including without limitation
14  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
15  * and/or sell copies of the Software, and to permit persons to whom the
16  * Software is furnished to do so, subject to the following conditions:
17  *
18  * The above copyright notice and this permission notice shall be included
19  * in all copies or substantial portions of the Software.
20  *
21  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
22  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
23  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
24  * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
25  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
26  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
27  * DEALINGS IN THE SOFTWARE.
28  ****************************************************************************/
29 
30 #ifndef _OGRLAYERDECORATOR_H_INCLUDED
31 #define _OGRLAYERDECORATOR_H_INCLUDED
32 
33 #include "ogrsf_frmts.h"
34 
36 {
37  protected:
38  OGRLayer *m_poDecoratedLayer;
39  int m_bHasOwnership;
40 
41  public:
42 
43  OGRLayerDecorator(OGRLayer* poDecoratedLayer,
44  int bTakeOwnership);
45  virtual ~OGRLayerDecorator();
46 
47  virtual OGRGeometry *GetSpatialFilter();
48  virtual void SetSpatialFilter( OGRGeometry * );
49  virtual void SetSpatialFilterRect( double dfMinX, double dfMinY,
50  double dfMaxX, double dfMaxY );
51 
52  virtual OGRErr SetAttributeFilter( const char * );
53 
54  virtual void ResetReading();
55  virtual OGRFeature *GetNextFeature();
56  virtual OGRErr SetNextByIndex( long nIndex );
57  virtual OGRFeature *GetFeature( long nFID );
58  virtual OGRErr SetFeature( OGRFeature *poFeature );
59  virtual OGRErr CreateFeature( OGRFeature *poFeature );
60  virtual OGRErr DeleteFeature( long nFID );
61 
62  virtual const char *GetName();
64  virtual OGRFeatureDefn *GetLayerDefn();
65 
67 
68  virtual int GetFeatureCount( int bForce = TRUE );
69  virtual OGRErr GetExtent(OGREnvelope *psExtent, int bForce = TRUE);
70 
71  virtual int TestCapability( const char * );
72 
73  /* Deprecated (and un-implemented method) --> we won't decorate it ! */
74  /* virtual const char *GetInfo( const char * ); */
75 
76  virtual OGRErr CreateField( OGRFieldDefn *poField,
77  int bApproxOK = TRUE );
78  virtual OGRErr DeleteField( int iField );
79  virtual OGRErr ReorderFields( int* panMap );
80  virtual OGRErr AlterFieldDefn( int iField, OGRFieldDefn* poNewFieldDefn, int nFlags );
81 
82  virtual OGRErr SyncToDisk();
83 
84  virtual OGRStyleTable *GetStyleTable();
85  virtual void SetStyleTableDirectly( OGRStyleTable *poStyleTable );
86 
87  virtual void SetStyleTable(OGRStyleTable *poStyleTable);
88 
89  virtual OGRErr StartTransaction();
90  virtual OGRErr CommitTransaction();
91  virtual OGRErr RollbackTransaction();
92 
93  virtual const char *GetFIDColumn();
94  virtual const char *GetGeometryColumn();
95 
96  virtual OGRErr SetIgnoredFields( const char **papszFields );
97 };
98 
99 #endif // _OGRLAYERDECORATOR_H_INCLUDED

Generated for GDAL by doxygen 1.8.4.