Rudiments
|
#include <csvsax.h>
Inherits sax.
Inherited by csvdom.
Public Member Functions | |
csvsax () | |
virtual | ~csvsax () |
void | setQuote (char quote) |
char | getQuote () |
void | setDelimiter (char delimiter) |
char | getDelimiter () |
Public Member Functions inherited from sax | |
sax () | |
virtual | ~sax () |
void | setIgnoreHeaderLines (uint64_t lines) |
uint64_t | getIgnoreHeaderLines () |
void | setIgnoreFooterLines (uint64_t lines) |
uint64_t | getIgnoreFooterLines () |
virtual bool | parse (input *in) |
virtual bool | parseFile (const char *filename) |
virtual bool | parseString (const char *string) |
const char * | getError () |
Public Member Functions inherited from object | |
virtual | ~object () |
Protected Member Functions | |
virtual bool | headerStart () |
virtual bool | column (const char *name, bool quoted) |
virtual bool | headerEnd () |
virtual bool | bodyStart () |
virtual bool | recordStart () |
virtual bool | field (const char *value, bool quoted) |
virtual bool | recordEnd () |
virtual bool | bodyEnd () |
The csvsax class is a base class for an SAX-style parser for CSV data. To use this class, you should create a class that inherits from it and implements its protected virtual methods.
csvsax::csvsax | ( | ) |
Creates an instance of the csvsax class.
|
virtual |
Deletes this instance of the csvsax class.
Gets called when the end of the body is encountered.
Returns true on success and false if an error occurred. Parsing stops if this method returns false.
This implementation just returns true by a child class may override this method to do something else.
Reimplemented in csvdom.
Gets called when the start of the body is encountered.
Returns true on success and false if an error occurred. Parsing stops if this method returns false.
This implementation just returns true by a child class may override this method to do something else.
Reimplemented in csvdom.
Gets called when a column name is parsed.
Returns true on success and false if an error occurred. Parsing stops if this method returns false.
This implementation just returns true by a child class may override this method to do something else.
Reimplemented in csvdom.
Gets called when a field is parsed.
Returns true on success and false if an error occurred. Parsing stops if this method returns false.
This implementation just returns true by a child class may override this method to do something else.
Reimplemented in csvdom.
char csvsax::getDelimiter | ( | ) |
Returns the character that separates columns and fields.
char csvsax::getQuote | ( | ) |
Returns the character that optionally surrounds columns and fields.
Gets called when the end of the header is encountered.
Returns true on success and false if an error occurred. Parsing stops if this method returns false.
This implementation just returns true by a child class may override this method to do something else.
Reimplemented in csvdom.
Gets called when the start of the header is encountered.
Returns true on success and false if an error occurred. Parsing stops if this method returns false.
This implementation just returns true by a child class may override this method to do something else.
Reimplemented in csvdom.
Gets called when the end of a record is encountered.
Returns true on success and false if an error occurred. Parsing stops if this method returns false.
This implementation just returns true by a child class may override this method to do something else.
Reimplemented in csvdom.
Gets called when the start of a record is encountered.
Returns true on success and false if an error occurred. Parsing stops if this method returns false.
This implementation just returns true by a child class may override this method to do something else.
Reimplemented in csvdom.
Sets the character that separates columns and fields to "delimiter".