Debea Library 1.4.2

CSVParser Class Reference
[Public API]

CSV file parser. More...

#include <csv.h>

List of all members.


Public Member Functions

 CSVParser (std::ifstream &pStream)
 Costructor.
bool eof ()
 Check if all lines were readed.
char getFieldSeparator () const
 Get char that separates fields.
const std::list< std::string > & getValues () const
 Get values readed by parseLine().
bool parseLine () throw (CSVParseException)
 Parse one line from csv file.
void setFieldSeparator (char pSep)
 Set char that separates fields.

Detailed Description

CSV file parser.

Constructor & Destructor Documentation

CSVParser ( std::ifstream &  pStream  ) 

Costructor.

Parameters:
pStream file stream to read


Member Function Documentation

bool eof (  ) 

Check if all lines were readed.

Returns:
true if there is no more data to read, false otherwise

char getFieldSeparator (  )  const

Get char that separates fields.

Returns:
field separator char

bool parseLine (  )  throw (CSVParseException)

Parse one line from csv file.

Returns:
true if line was parsed, false if line was empty.
Exceptions:
CSVParserException if non empty line parse failed.

void setFieldSeparator ( char  pSep  ) 

Set char that separates fields.

Parameters:
pSep field separator char


The documentation for this class was generated from the following file:

Documentation
Quick start
Examples

API Documentation
Class hierarchy
Member index
API Reference
Store filters
Store table macros
Back

Generated by doxygen at Fri Oct 22 23:15:42 2010