⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 idstreamrandomaccess.pas

📁 网络控件适用于Delphi6
💻 PAS
字号:
{ $HDR$}
{**********************************************************************}
{ Unit archived using Team Coherence                                   }
{ Team Coherence is Copyright 2002 by Quality Software Components      }
{                                                                      }
{ For further information / comments, visit our WEB site at            }
{ http://www.TeamCoherence.com                                         }
{**********************************************************************}
{}
{ $Log:  88162: IdStreamRandomAccess.pas 
{
{   Rev 1.1    2004.05.20 1:40:30 PM  czhower
{ Last of the IdStream updates
}
unit IdStreamRandomAccess;

interface

uses
  IdStream;

type
  TIdStreamRandomAccess = class(TIdStream)
  protected
    function GetPosition: Integer; virtual; abstract;
    function GetSize: Integer; virtual; abstract;
    procedure SetPosition(const AValue: Integer); virtual; abstract;
  public
    function BOF: Boolean; virtual;
    function EOF: Boolean; virtual;
    procedure Skip(
      ASize: Integer
      ); virtual; abstract;
    //
    property Position: Integer read GetPosition write SetPosition;
    property Size: Integer read GetSize;
  end;

implementation

{ TIdStreamRandomAccess }

function TIdStreamRandomAccess.BOF: Boolean;
begin
  Result := Position = 0;
end;

function TIdStreamRandomAccess.EOF: Boolean;
begin
  Result := Position >= Size - 1;
end;

end.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -