Class TTextReader

Unit

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).

Source: source/component/PasDoc_ProcessLineTalk.pas (line 54).

Hierarchy

Overview

Methods

Public constructor CreateFromFileStream(const FileName: string);
Public constructor Create(AStream: TStream; AOwnsStream: boolean);
Public destructor Destroy; override;
Public function Readln: string;
Public function Eof: boolean;

Description

Methods

Public constructor CreateFromFileStream(const FileName: string);

This is a comfortable constructor, equivalent to TTextReader.Create(TFileStream.Create(FileName, fmOpenRead or fmShareDenyWrite), true)

Source: source/component/PasDoc_ProcessLineTalk.pas (line 65).

Public constructor Create(AStream: TStream; AOwnsStream: boolean);

If AOwnsStream then in Destroy we will free Stream object.

Source: source/component/PasDoc_ProcessLineTalk.pas (line 68).

Public destructor Destroy; override;

This item has no description.

Source: source/component/PasDoc_ProcessLineTalk.pas (line 69).

Public function Readln: string;

Reads next line from Stream. Returned string does not contain any end-of-line characters.

Source: source/component/PasDoc_ProcessLineTalk.pas (line 73).

Public function Eof: boolean;

This item has no description.

Source: source/component/PasDoc_ProcessLineTalk.pas (line 75).


Generated by PasDoc 0.17.0.snapshot.