CSVOStream Class Reference
[Public API]

OStream implementation for csv. More...

#include <csv.h>

Inheritance diagram for CSVOStream:

Inheritance graph
[legend]
Collaboration diagram for CSVOStream:

Collaboration graph
[legend]
List of all members.

Public Member Functions

virtual void begin ()
 For CSV file format this method does nothing.
virtual void close ()
 Close stream.
virtual void commit ()
 For CSV file format this method does nothing.
 CSVOStream (const char *pFilename, std::list< mapping > &pMappings, bool pHasColNames, const dba::ConvSpec &pSpecs)
 Constructor used by CSVArchive.
virtual void destroy ()
 Destroy stream.
virtual void open (const char *pRootTable=NULL)
 Prepare stream to put Storeable objects in it.
virtual void rollback ()
 For CSV file format this method does nothing.
void setFieldSeparator (char pSep)
 Overrider field separator set from CSVArchive.

Detailed Description

OStream implementation for csv.


Constructor & Destructor Documentation

CSVOStream const char *  pFilename,
std::list< mapping > &  pMappings,
bool  pHasColNames,
const dba::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
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.

virtual void open const char *  pRootTable = NULL  )  [virtual]
 

Prepare stream to put Storeable objects in it.

If there is problem with object store then dba::DataException is thrown. If there is problem with database connection then dba::DatabaseExcption is thrown.

Parameters:
pRootTable new root relation name for each Storeable object that is put into stream. If NULL then \ name from store table is used
Returns:
true if at least one object was stored or erased in database, false if no store was performed (all objects are in OK state)

Implements OStream.

void setFieldSeparator char  pSep  ) 
 

Overrider field separator set from CSVArchive.

Parameters:
pSep new field separator cha

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