GDAL

- Main Page
- Related Pages
- Classes
- Files
- Download
- Issue Tracker

- File List
- File Members

ogr_attrind.h
1 /******************************************************************************
2 * $Id: ogr_attrind.h 34921 2016-08-04 22:26:31Z rouault $
3 *
4 * Project: OpenGIS Simple Features Reference Implementation
5 * Purpose: Classes related to generic implementation of attribute indexing.
6 * Author: Frank Warmerdam, warmerdam@pobox.com
7 *
8 ******************************************************************************
9 * Copyright (c) 2003, Frank Warmerdam <warmerdam@pobox.com>
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 OGR_ATTRIND_H_INCLUDED
31 #define OGR_ATTRIND_H_INCLUDED
32
33 #include "ogrsf_frmts.h"
34
36
37 /************************************************************************/
38 /* OGRAttrIndex */
39 /* */
40 /* Base class for accessing the indexing info about one field. */
41 /************************************************************************/
42
43 class CPL_DLL OGRAttrIndex
44 {
45 protected:
46 OGRAttrIndex();
47
48 public:
49 virtual ~OGRAttrIndex();
50
51 virtual GIntBig GetFirstMatch( OGRField *psKey ) = 0;
52 virtual GIntBig *GetAllMatches( OGRField *psKey ) = 0;
53 virtual GIntBig *GetAllMatches( OGRField *psKey, GIntBig* panFIDList, int* nFIDCount, int* nLength ) = 0;
54
55 virtual OGRErr AddEntry( OGRField *psKey, GIntBig nFID ) = 0;
56 virtual OGRErr RemoveEntry( OGRField *psKey, GIntBig nFID ) = 0;
57
58 virtual OGRErr Clear() = 0;
59 };
60
61 /************************************************************************/
62 /* OGRLayerAttrIndex */
63 /* */
64 /* Base class representing attribute indexes for all indexed */
65 /* fields in a layer. */
66 /************************************************************************/
67
68 class CPL_DLL OGRLayerAttrIndex
69 {
70 protected:
71 OGRLayer *poLayer;
72 char *pszIndexPath;
73
74 OGRLayerAttrIndex();
75
76 public:
77 virtual ~OGRLayerAttrIndex();
78
79 virtual OGRErr Initialize( const char *pszIndexPath, OGRLayer * ) = 0;
80
81 virtual OGRErr CreateIndex( int iField ) = 0;
82 virtual OGRErr DropIndex( int iField ) = 0;
83 virtual OGRErr IndexAllFeatures( int iField = -1 ) = 0;
84
85 virtual OGRErr AddToIndex( OGRFeature *poFeature, int iField = -1 ) = 0;
86 virtual OGRErr RemoveFromIndex( OGRFeature *poFeature ) = 0;
87
88 virtual OGRAttrIndex *GetFieldIndex( int iField ) = 0;
89 };
90
91 OGRLayerAttrIndex CPL_DLL *OGRCreateDefaultLayerIndex();
92
94
95 #endif /* ndef OGR_ATTRIND_H_INCLUDED */
96
ogrsf_frmts.h
Classes related to registration of format support, and opening datasets.
OGRField
OGRFeature field attribute value union.
Definition: ogr_core.h:661
OGRLayer
This class represents a layer of simple features, with access methods.
Definition: ogrsf_frmts.h:68
OGRFeature
A simple feature, including geometry and attributes.
Definition: ogr_feature.h:279
GIntBig
long long GIntBig
Large signed integer type (generally 64-bit integer type).
Definition: cpl_port.h:250
OGRErr
int OGRErr
Simple container for a bounding region.
Definition: ogr_core.h:285

Generated for GDAL by 1.8.9.1.