Class TFBuffer (unit ODFileUnit)

Inherits from

TObject

Text file buffer. This class is used solely to implement the TextFile class.

Constructors


constructor Create;

------------------------------------------------------------------------------ TFBuffer methods.


Functions

function Fill( f : RawFile ) : boolean;

Fill a buffer by reading raw bytes

function GetChar( f : RawFile; var c : char ) : boolean;

Get single character from the buffer, which will refill itself as necessary.

function GetLine( f : RawFile; var line : string ) : boolean;

Read line from buffer, stripping CR/LF.

procedure Reset;

empty the buffer

Properties

Events

Variables

mBuffer : array[ 0..1023 ] of char;


mBytes : integer;


mPtr : integer;



Constructors


constructor Create;

------------------------------------------------------------------------------ TFBuffer methods. ------------------------------------------------------------------------------


Functions


function Fill( f : RawFile ) : boolean;

Fill a buffer by reading raw bytes


function GetChar( f : RawFile; var c : char ) : boolean;

Get single character from the buffer, which will refill itself as necessary. Returns false on EOF.


function GetLine( f : RawFile; var line : string ) : boolean;

Read line from buffer, stripping CR/LF. The buffer re-fills as necessary.


procedure Reset;

empty the buffer


Properties


Events


Variables


mBuffer : array[ 0..1023 ] of char;


mBytes : integer;


mPtr : integer;