Class TTextReader
Unit
PasDoc_ProcessLineTalk
Declaration
type TTextReader = class(TObject)
Description
TTextReader reads given Stream line by line. Lines may be terminated in Stream with #13, #10, #13+#10 or #10+#13. This way I can treat any TStream quite like standard Pascal text files: I have simple Readln method.
After calling Readln or Eof you should STOP directly using underlying Stream (but you CAN use Stream right after creating TTextReader.Create(Stream) and before any Readln or Eof operations on this TTextReader).
Original version of this class comes from Michalis Kamburelis code library, see [http://www.camelot.homedns.org/˜michalis/], unit base/KambiClassUtils.pas.
Hierarchy
Overview
Methods
Description
Methods
 |
constructor CreateFromFileStream(const FileName: string); |
This is a comfortable constructor, equivalent to TTextReader.Create(TFileStream.Create(FileName, fmOpenRead or fmShareDenyWrite), true)
|
 |
constructor Create(AStream: TStream; AOwnsStream: boolean); |
If AOwnsStream then in Destroy we will free Stream object.
|
 |
destructor Destroy; override; |
|
 |
function Readln: string; |
Reads next line from Stream. Returned string does not contain any end-of-line characters.
|
 |
function Eof: boolean; |
|
Generated by PasDoc 0.15.0.
|