Skip to content

Commit b538a4f

Browse files
authored
Merge pull request #155 from thbeu/fix-const-correctness
API doc: Fix const-correctness
2 parents bcd39fc + d232cb2 commit b538a4f

File tree

2 files changed

+27
-21
lines changed

2 files changed

+27
-21
lines changed

web/dbf_api.html

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ <h2>DBFCreate()</h2>
5454
<h2>DBFGetFieldCount()</h2>
5555

5656
<pre>
57-
int DBFGetFieldCount( DBFHandle hDBF );
57+
int DBFGetFieldCount( const DBFHandle hDBF );
5858

5959
hDBF: The access handle for the file to be queried, as returned
6060
by DBFOpen(), or DBFCreate().
@@ -68,7 +68,7 @@ <h2>DBFGetFieldCount()</h2>
6868
<h2>DBFGetRecordCount()</h2>
6969

7070
<pre>
71-
int DBFGetRecordCount( DBFHandle hDBF );
71+
int DBFGetRecordCount( const DBFHandle hDBF );
7272

7373
hDBF: The access handle for the file to be queried, as returned by
7474
DBFOpen(), or DBFCreate().
@@ -83,7 +83,7 @@ <h2>DBFGetRecordCount()</h2>
8383
<h2>DBFGetFieldIndex()</h2>
8484

8585
<pre>
86-
int DBFGetFieldIndex( DBFHandle hDBF, const char *pszFieldName );
86+
int DBFGetFieldIndex( const DBFHandle hDBF, const char *pszFieldName );
8787

8888
hDBF: The access handle for the file to be queried, as returned by
8989
DBFOpen(), or DBFCreate().
@@ -99,7 +99,8 @@ <h2>DBFGetFieldIndex()</h2>
9999
<h2>DBFGetFieldInfo()</h2>
100100

101101
<pre>
102-
DBFFieldType DBFGetFieldInfo( DBFHandle hDBF, int iField, char * pszFieldName,
102+
DBFFieldType DBFGetFieldInfo( const DBFHandle hDBF, int iField,
103+
char * pszFieldName,
103104
int * pnWidth, int * pnDecimals );
104105

105106
hDBF: The access handle for the file to be queried, as returned by
@@ -127,16 +128,16 @@ <h2>DBFGetFieldInfo()</h2>
127128
The DBFGetFieldInfo() returns the type of the requested field, which is
128129
one of the DBFFieldType enumerated values. As well, the field name, and
129130
field width information can optionally be returned. The field type returned
130-
does not correspond one to one with the xBase field types. For instance
131-
the xBase field type for Date will just be returned as being FTInteger. <p>
131+
does not correspond one to one with the xBase field types. <p>
132132

133133
<pre>
134134
typedef enum {
135-
FTString, /* fixed length string field */
136-
FTInteger, /* numeric field with no decimals */
137-
FTDouble, /* numeric field with decimals */
138-
FTLogical, /* logical field. */
139-
FTInvalid /* not a recognised field type */
135+
FTString, /* fixed length string field */
136+
FTInteger, /* numeric field with no decimals */
137+
FTDouble, /* numeric field with decimals */
138+
FTLogical, /* logical field */
139+
FTDate, /* date field */
140+
FTInvalid /* not a recognised field type */
140141
} DBFFieldType;
141142
</pre>
142143

@@ -251,7 +252,7 @@ <h2>DBFReadStringAttribute()</h2>
251252
<h2>DBFIsAttributeNULL()</h2>
252253

253254
<pre>
254-
int DBFIsAttributeNULL( DBFHandle hDBF, int iShape, int iField );
255+
int DBFIsAttributeNULL( const DBFHandle hDBF, int iShape, int iField );
255256

256257
hDBF: The access handle for the file to be queried, as returned by
257258
DBFOpen(), or DBFCreate().
@@ -382,7 +383,7 @@ <h2>DBFClose()</h2>
382383
<h2>DBFIsRecordDeleted()</h2>
383384

384385
<pre>
385-
int DBFIsRecordDeleted( DBFHandle hDBF, int iShape );
386+
int DBFIsRecordDeleted( const DBFHandle hDBF, int iShape );
386387

387388
hDBF: The access handle for the file to be checked.
388389
iShape: The record index to check.
@@ -410,7 +411,7 @@ <h2>DBFMarkRecordDeleted()</h2>
410411
<h2>DBFGetNativeFieldType()</h2>
411412

412413
<pre>
413-
char DBFGetNativeFieldType( DBFHandle hDBF, int iField );
414+
char DBFGetNativeFieldType( const DBFHandle hDBF, int iField );
414415

415416
hDBF: The access handle for the file.
416417
iField: The field index to query.

web/shp_api.html

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,9 @@ <h2>SHPObject</h2>
8282
double dfYMax;
8383
double dfZMax;
8484
double dfMMax;
85+
86+
int bMeasureIsUsed;
87+
int bFastModeReadObject;
8588
} SHPObject;
8689
</pre>
8790

@@ -113,7 +116,7 @@ <h2>SHPOpen()</h2>
113116
<h2>SHPGetInfo()</h2>
114117

115118
<pre>
116-
void SHPGetInfo( SHPHandle hSHP, int * pnEntities, int * pnShapeType,
119+
void SHPGetInfo( const SHPHandle hSHP, int * pnEntities, int * pnShapeType,
117120
double * padfMinBound, double * padfMaxBound );
118121

119122
hSHP: The handle previously returned by SHPOpen()
@@ -143,7 +146,7 @@ <h2>SHPGetInfo()</h2>
143146
<h2>SHPReadObject()</h2>
144147

145148
<pre>
146-
SHPObject *SHPReadObject( SHPHandle hSHP, int iShape );
149+
SHPObject *SHPReadObject( const SHPHandle hSHP, int iShape );
147150

148151
hSHP: The handle previously returned by SHPOpen()
149152
or SHPCreate().
@@ -210,7 +213,8 @@ <h2>SHPCreateSimpleObject()</h2>
210213
<pre>
211214
SHPObject *
212215
SHPCreateSimpleObject( int nSHPType, int nVertices,
213-
double *padfX, double * padfY, double *padfZ, );
216+
const double *padfX, const double * padfY,
217+
const double *padfZ );
214218

215219
nSHPType: The SHPT_ type of the object to be created, such
216220
as SHPT_POINT, or SHPT_POLYGON.
@@ -250,9 +254,10 @@ <h2>SHPCreateObject()</h2>
250254
<pre>
251255
SHPObject *
252256
SHPCreateObject( int nSHPType, int iShape,
253-
int nParts, int * panPartStart, int * panPartType,
254-
int nVertices, double *padfX, double * padfY,
255-
double *padfZ, double *padfM );
257+
int nParts, const int * panPartStart,
258+
const int * panPartType,
259+
int nVertices, const double *padfX, const double * padfY,
260+
const double *padfZ, const double *padfM );
256261

257262
nSHPType: The SHPT_ type of the object to be created, such
258263
as SHPT_POINT, or SHPT_POLYGON.
@@ -321,7 +326,7 @@ <h2>SHPComputeExtents()</h2>
321326
<h2>SHPWriteObject()</h2>
322327

323328
<pre>
324-
int SHPWriteObject( SHPHandle hSHP, int iShape, SHPObject *psObject );
329+
int SHPWriteObject( SHPHandle hSHP, int iShape, const SHPObject *psObject );
325330

326331
hSHP: The handle previously returned by SHPOpen("r+")
327332
or SHPCreate().

0 commit comments

Comments
 (0)