|
OWLNext 7.0
Borland's Object Windows Library for the modern age
|
The TFileLineIterator class is used to iterate through a TTextFile file. More...
#include <owl/file.h>
Public Member Functions | |
| 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. | |
Protected Member Functions | |
| TFileLineIterator () | |
| Protected default constructor. Intializes everything to 0. | |
| virtual bool | NextLine () |
| Loads the next line in the file. Returns true if successful; false otherwise. | |
Protected Attributes | |
| TTextFile * | File |
| Pointer to the file being iterated through. | |
| TCHAR * | LineBuffer |
| Buffer lines of text are loaded into. | |
| uint | BuffSize |
| Size of the buffer allocated for loading a line of text. | |
| uint | LineNumber |
| Current line number in buffer. Line numbering starts at 1. | |
| bool | Done |
The TFileLineIterator class is used to iterate through a TTextFile file.
Constructor for iterating through file.
The bufsize paramater is used for setting the buffer size.
Definition at line 1548 of file file.cpp.
References BuffSize, Done, File, LineBuffer, LineNumber, and NextLine().
|
virtual |
|
inlineprotected |
Protected default constructor. Intializes everything to 0.
Definition at line 1172 of file file.h.
References Done, File, LineBuffer, and LineNumber.
|
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.
|
inline |
|
protectedvirtual |
Loads the next line in the file. Returns true if successful; false otherwise.
Definition at line 1570 of file file.cpp.
References BuffSize, File, owl::TTextFile::GetString(), owl::TFile::IsOpen(), LineBuffer, and owl::ToBool().
|
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.
References Done, and LineBuffer.
|
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.
|
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().
|
protected |
|
protected |
|
protected |
|
protected |