117 bool setFile(
const std::string& file);
134 void setPos(
unsigned long pos);
Interface definition for a class which retrieves lines from a LineHandler.
Retrieves a file linewise and reports the lines to a handler.
void setPos(unsigned long pos)
Sets the current position within the file to the given value.
void close()
Closes the reading.
unsigned long getPosition()
Returns the current position within the file.
int mySkipBOM
Number of skipped characters at the file begin (UTF-8 BOM)
bool good() const
Returns the information whether the stream is readable.
int myRead
Information about how many characters were supplied to the LineHandler.
int myRread
Information how many bytes were read by the reader from the file.
int myAvailable
Information how many bytes are available within the used file.
std::string readLine()
Reads a single (the next) line from the file and returns it.
bool setFile(const std::string &file)
Reinitialises the reader for reading from the given file.
void reinit()
Reinitialises the reading (of the previous file)
int myLinesRead
Information how many lines were read for meaningful error messages.
bool hasMore() const
Returns whether another line may be read (the file was not read completely)
std::string getFileName() const
Returns the name of the used file.
std::ifstream myStrm
the stream used
std::string myFileName
the name of the file to read the contents from
char myBuffer[1024]
To override MSVC++-bugs, we use an own getline which uses this buffer.
std::string myStrBuffer
a string-buffer
void readAll(LineHandler &lh)
Reads the whole file linewise, reporting every line to the given LineHandler.