GRASS Programmer's Manual  6.4.2(2012)
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
dbfopen.c File Reference
#include <grass/shapefil.h>
#include <math.h>
#include <stdlib.h>
#include <ctype.h>
#include <string.h>
Include dependency graph for dbfopen.c:

Go to the source code of this file.

Macros

#define FALSE   0
#define TRUE   1

Functions

void SHPAPI_CALL DBFUpdateHeader (DBFHandle psDBF)
DBFHandle SHPAPI_CALL DBFOpen (const char *pszFilename, const char *pszAccess)
DBFHandle SHPAPI_CALL DBFOpenLL (const char *pszFilename, const char *pszAccess, SAHooks *psHooks)
void SHPAPI_CALL DBFClose (DBFHandle psDBF)
DBFHandle SHPAPI_CALL DBFCreate (const char *pszFilename)
DBFHandle SHPAPI_CALL DBFCreateLL (const char *pszFilename, SAHooks *psHooks)
int SHPAPI_CALL DBFAddField (DBFHandle psDBF, const char *pszFieldName, DBFFieldType eType, int nWidth, int nDecimals)
int SHPAPI_CALL DBFAddNativeFieldType (DBFHandle psDBF, const char *pszFieldName, char chType, int nWidth, int nDecimals)
int SHPAPI_CALL DBFReadIntegerAttribute (DBFHandle psDBF, int iRecord, int iField)
double SHPAPI_CALL DBFReadDoubleAttribute (DBFHandle psDBF, int iRecord, int iField)
const char SHPAPI_CALL1DBFReadStringAttribute (DBFHandle psDBF, int iRecord, int iField){return((const char *) DBFReadAttribute(psDBF, iRecord, iField, 'C')
const char SHPAPI_CALL1DBFReadLogicalAttribute (DBFHandle psDBF, int iRecord, int iField){return((const char *) DBFReadAttribute(psDBF, iRecord, iField, 'L')
int SHPAPI_CALL DBFIsAttributeNULL (DBFHandle psDBF, int iRecord, int iField)
int SHPAPI_CALL DBFGetFieldCount (DBFHandle psDBF)
int SHPAPI_CALL DBFGetRecordCount (DBFHandle psDBF)
DBFFieldType SHPAPI_CALL DBFGetFieldInfo (DBFHandle psDBF, int iField, char *pszFieldName, int *pnWidth, int *pnDecimals)
int SHPAPI_CALL DBFWriteAttributeDirectly (DBFHandle psDBF, int hEntity, int iField, void *pValue)
int SHPAPI_CALL DBFWriteDoubleAttribute (DBFHandle psDBF, int iRecord, int iField, double dValue)
int SHPAPI_CALL DBFWriteIntegerAttribute (DBFHandle psDBF, int iRecord, int iField, int nValue)
int SHPAPI_CALL DBFWriteStringAttribute (DBFHandle psDBF, int iRecord, int iField, const char *pszValue)
int SHPAPI_CALL DBFWriteNULLAttribute (DBFHandle psDBF, int iRecord, int iField)
int SHPAPI_CALL DBFWriteLogicalAttribute (DBFHandle psDBF, int iRecord, int iField, const char lValue)
int SHPAPI_CALL DBFWriteTuple (DBFHandle psDBF, int hEntity, void *pRawTuple)
const char SHPAPI_CALL1DBFReadTuple (DBFHandle psDBF, int hEntity){if(hEntity< 0||hEntity >=psDBF->nRecords) return(NULL
 if (!DBFLoadRecord(psDBF, hEntity)) return NULL
 return (const char *)
char SHPAPI_CALL DBFGetNativeFieldType (DBFHandle psDBF, int iField)
int SHPAPI_CALL DBFGetFieldIndex (DBFHandle psDBF, const char *pszFieldName)
int SHPAPI_CALL DBFIsRecordDeleted (DBFHandle psDBF, int iShape)
int SHPAPI_CALL DBFMarkRecordDeleted (DBFHandle psDBF, int iShape, int bIsDeleted)

Macro Definition Documentation


Function Documentation

int SHPAPI_CALL DBFAddField ( DBFHandle  psDBF,
const char *  pszFieldName,
DBFFieldType  eType,
int  nWidth,
int  nDecimals 
)

Definition at line 630 of file dbfopen.c.

References DBFAddNativeFieldType().

int SHPAPI_CALL DBFAddNativeFieldType ( DBFHandle  psDBF,
const char *  pszFieldName,
char  chType,
int  nWidth,
int  nDecimals 
)

Definition at line 655 of file dbfopen.c.

References FALSE.

Referenced by DBFAddField().

void SHPAPI_CALL DBFClose ( DBFHandle  psDBF)

Definition at line 489 of file dbfopen.c.

References DBFUpdateHeader(), and NULL.

DBFHandle SHPAPI_CALL DBFCreate ( const char *  pszFilename)

Definition at line 535 of file dbfopen.c.

References DBFCreateLL(), and SASetupDefaultHooks().

DBFHandle SHPAPI_CALL DBFCreateLL ( const char *  pszFilename,
SAHooks psHooks 
)

Definition at line 552 of file dbfopen.c.

References FALSE, SAHooks::FClose, SAHooks::FOpen, SAHooks::FWrite, NULL, and TRUE.

Referenced by DBFCreate().

int SHPAPI_CALL DBFGetFieldCount ( DBFHandle  psDBF)

Definition at line 957 of file dbfopen.c.

Referenced by DBFGetFieldIndex().

int SHPAPI_CALL DBFGetFieldIndex ( DBFHandle  psDBF,
const char *  pszFieldName 
)

Definition at line 1486 of file dbfopen.c.

References DBFGetFieldCount(), DBFGetFieldInfo(), name, and NULL.

DBFFieldType SHPAPI_CALL DBFGetFieldInfo ( DBFHandle  psDBF,
int  iField,
char *  pszFieldName,
int *  pnWidth,
int *  pnDecimals 
)

Definition at line 983 of file dbfopen.c.

References NULL.

Referenced by DBFGetFieldIndex().

char SHPAPI_CALL DBFGetNativeFieldType ( DBFHandle  psDBF,
int  iField 
)

Definition at line 1452 of file dbfopen.c.

int SHPAPI_CALL DBFGetRecordCount ( DBFHandle  psDBF)

Definition at line 970 of file dbfopen.c.

int SHPAPI_CALL DBFIsAttributeNULL ( DBFHandle  psDBF,
int  iRecord,
int  iField 
)

Definition at line 906 of file dbfopen.c.

References DBFReadStringAttribute(), FALSE, NULL, and TRUE.

int SHPAPI_CALL DBFIsRecordDeleted ( DBFHandle  psDBF,
int  iShape 
)

Definition at line 1515 of file dbfopen.c.

References FALSE, and TRUE.

int SHPAPI_CALL DBFMarkRecordDeleted ( DBFHandle  psDBF,
int  iShape,
int  bIsDeleted 
)

Definition at line 1540 of file dbfopen.c.

References FALSE, and TRUE.

DBFHandle SHPAPI_CALL DBFOpen ( const char *  pszFilename,
const char *  pszAccess 
)

Definition at line 324 of file dbfopen.c.

References DBFOpenLL(), and SASetupDefaultHooks().

DBFHandle SHPAPI_CALL DBFOpenLL ( const char *  pszFilename,
const char *  pszAccess,
SAHooks psHooks 
)

Definition at line 341 of file dbfopen.c.

References FALSE, SAHooks::FOpen, and NULL.

Referenced by DBFOpen().

double SHPAPI_CALL DBFReadDoubleAttribute ( DBFHandle  psDBF,
int  iRecord,
int  iField 
)

Definition at line 858 of file dbfopen.c.

References NULL.

int SHPAPI_CALL DBFReadIntegerAttribute ( DBFHandle  psDBF,
int  iRecord,
int  iField 
)

Definition at line 838 of file dbfopen.c.

References NULL.

const char SHPAPI_CALL1* DBFReadLogicalAttribute ( DBFHandle  psDBF,
int  iRecord,
int  iField 
) const
const char SHPAPI_CALL1* DBFReadStringAttribute ( DBFHandle  psDBF,
int  iRecord,
int  iField 
) const

Referenced by DBFIsAttributeNULL().

const char SHPAPI_CALL1* DBFReadTuple ( DBFHandle  psDBF,
int  hEntity 
)
void SHPAPI_CALL DBFUpdateHeader ( DBFHandle  psDBF)

Definition at line 293 of file dbfopen.c.

Referenced by DBFClose().

int SHPAPI_CALL DBFWriteAttributeDirectly ( DBFHandle  psDBF,
int  hEntity,
int  iField,
void *  pValue 
)

Definition at line 1193 of file dbfopen.c.

References FALSE.

int SHPAPI_CALL DBFWriteDoubleAttribute ( DBFHandle  psDBF,
int  iRecord,
int  iField,
double  dValue 
)

Definition at line 1261 of file dbfopen.c.

int SHPAPI_CALL DBFWriteIntegerAttribute ( DBFHandle  psDBF,
int  iRecord,
int  iField,
int  nValue 
)

Definition at line 1275 of file dbfopen.c.

int SHPAPI_CALL DBFWriteLogicalAttribute ( DBFHandle  psDBF,
int  iRecord,
int  iField,
const char  lValue 
)

Definition at line 1318 of file dbfopen.c.

int SHPAPI_CALL DBFWriteNULLAttribute ( DBFHandle  psDBF,
int  iRecord,
int  iField 
)

Definition at line 1305 of file dbfopen.c.

References NULL.

int SHPAPI_CALL DBFWriteStringAttribute ( DBFHandle  psDBF,
int  iRecord,
int  iField,
const char *  pszValue 
)

Definition at line 1291 of file dbfopen.c.

int SHPAPI_CALL DBFWriteTuple ( DBFHandle  psDBF,
int  hEntity,
void *  pRawTuple 
)

Definition at line 1332 of file dbfopen.c.

References FALSE, and TRUE.

return ( const char *  )

Definition at line 1396 of file dbfopen.c.

Referenced by gvl_file_set_slices_param().