Sparksee  6.0.2
RowReader Class Referenceabstract

RowReader interface. More...

Inheritance diagram for RowReader:
Inheritance graph

Public Member Functions

virtual sparksee::gdb::bool_t Reset ()=0 throw (sparksee::gdb::IOException)
 Moves the reader to the beginning. More...
 
virtual sparksee::gdb::bool_t Read (sparksee::gdb::StringList &row)=0 throw (sparksee::gdb::IOException)
 Reads the next row as a string array. More...
 
virtual sparksee::gdb::int32_t GetRow ()=0 throw (sparksee::gdb::IOException)
 The row number for the current row. More...
 
virtual void Close ()=0 throw (sparksee::gdb::IOException)
 Closes the reader. More...
 
virtual ~RowReader ()
 Destructor.
 

Protected Member Functions

 RowReader ()
 Empty constructor. More...
 

Detailed Description

RowReader interface.

Common interface for those readers which get the data as an string array.

It works as follows: perform as many read operations as necessary and call close once at the end. Once close is called no more read operations can be executed.

Check out the 'Data import' section in the SPARKSEE User Manual for more details on this.

Author
Sparsity Technologies http://www.sparsity-technologies.com

Constructor & Destructor Documentation

RowReader::RowReader ( )
inlineprotected

Empty constructor.

Protected because no one should instantiate a RowReader. Just inherited classes can use this empty constructor.

References END_SPARKSEE_GDB_NAMESPACE.

Member Function Documentation

virtual void RowReader::Close ( )
throw (sparksee::gdb::IOException
)
pure virtual

Closes the reader.

Exceptions
IOExceptionIf the close fails.

Implemented in CSVReader.

virtual sparksee::gdb::int32_t RowReader::GetRow ( )
throw (sparksee::gdb::IOException
)
pure virtual

The row number for the current row.

Returns
The current row number; 0 if there is no current row.
Exceptions
IOExceptionIf it fails.

Implemented in CSVReader.

virtual sparksee::gdb::bool_t RowReader::Read ( sparksee::gdb::StringList &  row)
throw (sparksee::gdb::IOException
)
pure virtual

Reads the next row as a string array.

Parameters
row[out] A string list with each comma-separated element as a separate entry.
Returns
Returns true if a row had been read or false otherwise.
Exceptions
IOExceptionIf bad things happen during the read.

Implemented in CSVReader.

virtual sparksee::gdb::bool_t RowReader::Reset ( )
throw (sparksee::gdb::IOException
)
pure virtual

Moves the reader to the beginning.

Restarts the reader.

Returns
true if the reader can be restarted, false otherwise.
Exceptions
IOExceptionIf bad things happen during the restart.

Implemented in CSVReader.


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