The TFileLineIterator class is used to iterate through a TTextFile file.
More...
#include <owl/file.h>
|
| TFileLineIterator (TTextFile &file, uint bufsize=260) |
| Constructor for iterating through file.
|
|
virtual | ~TFileLineIterator () |
| Deletes the buffer.
|
|
const tchar * | operator* () const |
| Returns a pointer to the start of the buffer if the file has not been completely iterated through; otherwise returns 0.
|
|
| operator const tchar * () const |
| Returns a pointer to the start of the buffer if the file has not been completely iterated through; otherwise returns 0.
|
|
const tchar * | operator++ () |
| Loads the next line in the file and then returns a pointer to the start of the buffer if the file has not been completely iterated through; otherwise returns 0.
|
|
const tchar * | Current () const |
| Returns a pointer to the start of the buffer if the file has not been completely iterated through; otherwise returns 0.
|
|
uint | Line () const |
| Returns the current line number.
|
|
|
| TFileLineIterator () |
| Protected default constructor. Intializes everything to 0.
|
|
virtual bool | NextLine () |
| Loads the next line in the file. Returns true if successful; false otherwise.
|
|
The TFileLineIterator class is used to iterate through a TTextFile file.
Definition at line 472 of file file.h.
◆ TFileLineIterator() [1/2]
owl::TFileLineIterator::TFileLineIterator |
( |
TTextFile & | file, |
|
|
uint | bufsize = 260 ) |
◆ ~TFileLineIterator()
owl::TFileLineIterator::~TFileLineIterator |
( |
| ) |
|
|
virtual |
◆ TFileLineIterator() [2/2]
owl::TFileLineIterator::TFileLineIterator |
( |
| ) |
|
|
inlineprotected |
Protected default constructor. Intializes everything to 0.
Definition at line 1172 of file file.h.
◆ Current()
const tchar * owl::TFileLineIterator::Current |
( |
| ) |
const |
|
inline |
Returns a pointer to the start of the buffer if the file has not been completely iterated through; otherwise returns 0.
Definition at line 1194 of file file.h.
References Done, and LineBuffer.
◆ Line()
uint owl::TFileLineIterator::Line |
( |
| ) |
const |
|
inline |
◆ NextLine()
bool owl::TFileLineIterator::NextLine |
( |
| ) |
|
|
protectedvirtual |
◆ operator const tchar *()
owl::TFileLineIterator::operator const tchar * |
( |
| ) |
const |
|
inline |
Returns a pointer to the start of the buffer if the file has not been completely iterated through; otherwise returns 0.
Definition at line 1187 of file file.h.
◆ operator*()
const tchar * owl::TFileLineIterator::operator* |
( |
| ) |
const |
|
inline |
Returns a pointer to the start of the buffer if the file has not been completely iterated through; otherwise returns 0.
Definition at line 1180 of file file.h.
References Done, and LineBuffer.
◆ operator++()
const tchar * owl::TFileLineIterator::operator++ |
( |
| ) |
|
|
inline |
Loads the next line in the file and then returns a pointer to the start of the buffer if the file has not been completely iterated through; otherwise returns 0.
Definition at line 1201 of file file.h.
References Done, LineBuffer, LineNumber, and NextLine().
◆ BuffSize
uint owl::TFileLineIterator::BuffSize |
|
protected |
Size of the buffer allocated for loading a line of text.
Definition at line 496 of file file.h.
◆ Done
bool owl::TFileLineIterator::Done |
|
protected |
◆ File
Pointer to the file being iterated through.
Definition at line 490 of file file.h.
◆ LineBuffer
TCHAR* owl::TFileLineIterator::LineBuffer |
|
protected |
Buffer lines of text are loaded into.
Definition at line 493 of file file.h.
◆ LineNumber
uint owl::TFileLineIterator::LineNumber |
|
protected |
Current line number in buffer. Line numbering starts at 1.
Definition at line 499 of file file.h.
The documentation for this class was generated from the following files: