CSVIStream Class Reference
[Public API]

IStream implementation for csv. More...

#include <csv.h>

Inheritance diagram for CSVIStream:

Inheritance graph
[legend]
Collaboration diagram for CSVIStream:

Collaboration graph
[legend]
List of all members.

Public Member Functions

virtual void close ()
 Close stream.
 CSVIStream (const char *pFilename, std::list< mapping > &pMappings, bool pHasColNames, bool pIgnoreEmptyLines, const ConvSpec &pSpecs)
 Constructor used by CSVArchive.
virtual void destroy ()
 Destroy stream.
const std::list< std::string > & getColumns ()
 Return column names.
virtual bool getNext (Storeable *pObject)
 Get next object from stream.
virtual void open (Storeable &pObject, const char *pRootTable=NULL)
 Prepare stream by creating member tree from pObject.
void setFieldSeparator (char pSep)
 Overrider field separator set from CSVArchive.
virtual bool updateVars ()
 Update binded vars without retrieving current object.

Detailed Description

IStream implementation for csv.

This stream does not support transactions, calling begin() or rollback() does nothing.


Constructor & Destructor Documentation

CSVIStream const char *  pFilename,
std::list< mapping > &  pMappings,
bool  pHasColNames,
bool  pIgnoreEmptyLines,
const ConvSpec pSpecs
 

Constructor used by CSVArchive.

Parameters:
pFilename csv file name
pMappings mappings set in archive
pHasColNames if true first row contains names of colunms
pIgnoreEmptyLines if true stream should skip empty lines
pSpecs conversion specification from archive

Member Function Documentation

virtual void destroy  )  [virtual]
 

Destroy stream.

After call to this function stream is destroyed and cannot be opened any more. It usually means that connection to database that this stream represents is closed after this method was called

Implements Stream.

const std::list<std::string>& getColumns  ) 
 

Return column names.

List of column names contains strings without any conversion.

virtual void open Storeable pObject,
const char *  pRootTable = NULL
[virtual]
 

Prepare stream by creating member tree from pObject.

Parameters:
pObject object to examine
pRootTable custom root table name

Reimplemented from Stream.

void setFieldSeparator char  pSep  ) 
 

Overrider field separator set from CSVArchive.

Parameters:
pSep new field separator char

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

Documentation
Quick start
Examples
Search

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

Generated by doxygen at Sun Nov 9 02:08:18 2008