CSV Parser
-
template<typename _Handler>
class csv_parser : public orcus::csv::parser_base -
Public Functions
-
csv_parser(const char *p, size_t n, handler_type &hdl, const csv::parser_config &config)
-
void parse()
-
csv_parser(const char *p, size_t n, handler_type &hdl, const csv::parser_config &config)
-
struct parser_config
Run-time configuration object for orcus::csv_parser.
Public Functions
-
parser_config()
-
parser_config()
Parser Handler
-
class csv_handler
Public Functions
-
inline void begin_parse()
Called when the parser starts parsing a stream.
-
inline void end_parse()
Called when the parser finishes parsing a stream.
-
inline void begin_row()
Called at the beginning of every row.
-
inline void end_row()
Called at the end of every row.
-
inline void cell(const char *p, size_t n, bool transient)
Called after every cell is parsed.
- Parameters:
p – pointer to the first character of a cell content.
n – number of characters the cell content consists of.
transient – when true, the text content has been converted and is stored in a temporary buffer. In such case, there is no guarantee that the text content remain available after the end of the call. When this value is false, the text content is guaranteed to be valid so long as the original CSV stream content is valid.
-
inline void begin_parse()