#include <SDXStreamReader.h>

Public Member Functions | |
| StreamReader (std::istream *iStream=0, SDX::ContentHandler *contentHandler=0) | |
| Constructor. | |
| void | setStream (std::istream *iStream) |
| Set the stream to read from. | |
Protected Member Functions | |
| virtual void | openStream () |
| Reimplement this if the stream needs to open and use setStream() to set the stream that's ready to read from. | |
| virtual void | closeStream () |
| Reimplement this if the stream needs to close after usage. | |
| virtual void | startProcessing () |
| Reimplement this if you need to do something before processing any lines. | |
| virtual void | endProcessing () |
| Reimplement this if you need to do something after processing all of the lines. | |
| virtual bool | processLine (std::string &line)=0 |
| This function gets called for each line that is read from the stream. | |
| void | setError (std::string message) |
| If aomething goes wrong during the processing of document, use this function to indicate what went wrong. | |
A stream is derived from std::istream and could read from a file (see the FileReader class) or for example read from a string (see std::istringstream).
Definition at line 11 of file SDXStreamReader.h.
| void StreamReader::openStream | ( | ) | [protected, virtual] |
Reimplement this if the stream needs to open and use setStream() to set the stream that's ready to read from.
If the stream could not be opened, use setStream() to set the stream to a NULL pointer.
Definition at line 42 of file SDXStreamReader.cpp.
| void SDX::Helpers::StreamReader::setStream | ( | std::istream * | iStream | ) |
Set the stream to read from.
This is normally called from the implementation of openStream().
1.5.8