|
Public Member Functions |
| LPCTSTR | GetElementPtr (CSV_HROW hRow, LPCTSTR pCol, LPCTSTR pDef="") |
| | Gets a pointer to element string.
|
| BOOL | AddColumn (LPCTSTR pDescription, DWORD insert=MAXDWORD) |
| | Adds a column to the CSV file.
|
| DWORD | GetHeaderString (LPSTR buf, DWORD size) |
| | Returns the line that was determined to be the header strings.
|
| DWORD | GetRowString (DWORD row, LPSTR pRow, DWORD size) |
| | Copies the string associated with a particular row.
|
| BOOL | Copy (LPVOID buf, LPDWORD ptr, DWORD size, LPCTSTR str) |
| | Copies a string of specified size.
|
| DWORD | SaveToMem (LPBYTE buf, DWORD size) |
| | Writes the CSV file to a memory buffer.
|
| BOOL | SaveFile (LPCTSTR pFile) |
| | Saves the CSV file to disk.
|
| BOOL | LoadColumns (LPCTSTR pLine) |
| | Loads the column names from string.
|
| BOOL | AddLine (LPCTSTR pLine) |
| | Adds a line of data to the CSV file.
|
| BOOL | AllocateRows (DWORD size) |
| | Allocates the specified number of rows.
|
| BOOL | LoadFromMem (LPBYTE buf, DWORD size, BOOL bAdd=FALSE) |
| | Loads a CSV file from memory.
|
| BOOL | LoadFile (LPCTSTR pFile, BOOL bAdd=FALSE) |
| | Loads CSV file from disk file.
|
|
void | Destroy () |
| | Releases all resources associated with CSV.
|
| BOOL | AllocateColumns (DWORD columns) |
| | Allocates specified number of columns.
|
|
| CCsvFile () |
| | Constructor.
|
|
virtual | ~CCsvFile () |
| | Destructor.
|
|
DWORD | GetNumColumns () |
| | Returns the number of columns.
|
|
DWORD | GetNumRows () |
| | Returns the number of rows.
|
|
LPBYTE * | GetTablePtr () |
| | Returns a pointer to the table data.
|
|
BOOL | IsTable () |
| | Returns non-zero if there is a valid data table.
|
|
CSV_HROW | AppendNewRow () |
| | Appends a new row to the current CSV file.
|
| CSV_HROW | GetRow (DWORD i) |
| | Returns a handle to the specified row.
|
| LPBYTE | GetRowElement (CSV_HROW hrow, DWORD i) |
| | Returns a pointer to the specified element.
|
| LPCTSTR | GetColDesc (DWORD i) |
| | Retreives a pointer to the column description string.
|
| DWORD | FindCol (LPCTSTR desc) |
| | Returns the index of the named column.
|
| void | SetRecordSize (DWORD rs) |
| | Sets the maximum size of a single CSV item.
|
|
DWORD | GetRecordSize () |
| | Returns the maximum size of a single CSV item.
|
| void | SetSep (BYTE sep) |
| | Sets the separator character for the CSV file.
|
|
BYTE | GetSep () |
| | Returns the current separator character for the CSV file.
|
| void | SetRowBlockSize (DWORD rbs) |
| | Sets the row block size.
|
|
DWORD | GetRowBlockSize () |
| | Returns the current row blocks size.
|
| void | SetSkip (DWORD s) |
| | Sets the number of lines to skip at the start of the CSV file.
|
This class provides simple functionality for working with CSV (Comma Separated Value) files.