code::dBASEfile Class Reference

List of all members.

Detailed Description

Will read in an Inprise Corp.

(Borland) dBASE file. This is by no means a complete and robust class; it will work for ESRI routines creating dBASE5.0 files. Use at your own risk for other purposes.

Author:
Lakshman
Version:
Id
code_dBASEfile.h,v 1.8 2009/06/02 20:17:37 lakshman Exp


Public Member Functions

 dBASEfile (const URL &url)
 To create a dBASEfile object, specify where it is stored.
int numColumns () const
 Number of columns in the table.
int numRows () const
 Number of rows in the table.
std::string getColumnName (size_t j) const
 Obtain the jth field name.
bool isNumeric (size_t j) const
 Is the jth column numeric?
std::string getValue (size_t i, size_t j) const
 Returns the value of the ith row , jth column of the table.
void setValue (size_t i, size_t j, std::string)
 sets the value of the ith row, jth column of the table.
float getNumericValue (size_t i, size_t j) const
 Returns, as a float, the value of the ith row, jth column, of the table.
void setNumericValue (size_t i, size_t j, float)
 Sets, as a float, the value of the ithe row, jth column of the table.
int findFieldIDNum (std::string)
 Given a std::string specifying a field (column) name, return its corresponding field number.
void sort (int, size_t, size_t)
 Sort a range of records (rows) in the dBASEfile object data using a field ID number as a key value.

Friends

OutputStreamoperator<< (OutputStream &os, const dBASEfile &a)
InputStreamoperator>> (InputStream &is, dBASEfile &a)

Classes

class  FieldDescriptor
 The field descriptor within an Inprise dBASE file. More...


Constructor & Destructor Documentation

code::dBASEfile::dBASEfile ( const URL url  ) 

To create a dBASEfile object, specify where it is stored.

This class reads in only the .dbf file; to read the .shp file, use the Shapefile class.


Member Function Documentation

int code::dBASEfile::findFieldIDNum ( std::string   ) 

Given a std::string specifying a field (column) name, return its corresponding field number.

-1 means it's not there

std::string code::dBASEfile::getColumnName ( size_t  j  )  const

Obtain the jth field name.

float code::dBASEfile::getNumericValue ( size_t  i,
size_t  j 
) const

Returns, as a float, the value of the ith row, jth column, of the table.

The result is undefined if the data is not actually numeric.

std::string code::dBASEfile::getValue ( size_t  i,
size_t  j 
) const

Returns the value of the ith row , jth column of the table.

bool code::dBASEfile::isNumeric ( size_t  j  )  const

Is the jth column numeric?

int code::dBASEfile::numColumns (  )  const

Number of columns in the table.

int code::dBASEfile::numRows (  )  const

Number of rows in the table.

void code::dBASEfile::setNumericValue ( size_t  i,
size_t  j,
float   
)

Sets, as a float, the value of the ithe row, jth column of the table.

void code::dBASEfile::setValue ( size_t  i,
size_t  j,
std::string   
)

sets the value of the ith row, jth column of the table.

void code::dBASEfile::sort ( int  ,
size_t  ,
size_t   
)

Sort a range of records (rows) in the dBASEfile object data using a field ID number as a key value.


Friends And Related Function Documentation

OutputStream& operator<< ( OutputStream os,
const dBASEfile a 
) [friend]

InputStream& operator>> ( InputStream is,
dBASEfile a 
) [friend]


Generated on Fri May 4 13:40:12 2012 for WDSS-IIw2 by  doxygen 1.4.7