CSVIStream Class ReferenceIStream implementation for csv.
More...
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
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 bool getNext | ( | Storeable * | pObject | ) | [virtual] |
Get next object from stream.
- Parameters:
-
pObject object to be updated from stream
- Returns:
- true if object was retrieved or false if there is no more data in stream
Implements IStream.
| 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 | ) |
| virtual bool updateVars | ( | ) | [virtual] |
Update binded vars without retrieving current object.
- Returns:
- true vars were updated or false if there is no more data in stream
Implements IStream.
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 |
Generated by doxygen at Fri Oct 22 23:15:42 2010


