![]() |
GemaLib
The GeMA library
|
An auxiliar class to implement a simple form of look ahead while reading file data. More...

Public Member Functions | |
| GmSharedCodeLoaderReadBuffer (QFile &file, const GmLogCategory &logger) | |
| Constructor. | |
| const QString | nextLine () |
| Returns the next file line, keeping it in an internal buffer. | |
| QString | readLine () |
| Returns the next buffer line, removing it from the buffer, or the next file line (without buffering) | |
| QString | skipUntilLine (int line) |
| Reads and skips file lines until arriving in the given line, returned by the call. Clears the buffer. | |
| int | pos () const |
| Returns the line number of the last line that was read from the file. | |
| bool | error () const |
| Did the last operation ended on error? | |
Private Member Functions | |
| bool | onError () |
| Check for end of file. | |
Private Attributes | |
| QFile & | _file |
| The file. | |
| const GmLogCategory & | _logger |
| Logger for error messages. | |
| bool | _error |
| Did the last read atempt ended on error? | |
| QStringList | _buffer |
| The buffer. | |
| int | _filePos |
| The line number of the last line that was read from the file. | |
An auxiliar class to implement a simple form of look ahead while reading file data.
1.8.15