(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.
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 | |
OutputStream & | operator<< (OutputStream &os, const dBASEfile &a) |
InputStream & | operator>> (InputStream &is, dBASEfile &a) |
Classes | |
class | FieldDescriptor |
The field descriptor within an Inprise dBASE file. More... |
code::dBASEfile::dBASEfile | ( | const URL & | url | ) |
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.
OutputStream& operator<< | ( | OutputStream & | os, | |
const dBASEfile & | a | |||
) | [friend] |
InputStream& operator>> | ( | InputStream & | is, | |
dBASEfile & | a | |||
) | [friend] |