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

📄 queue.pas

📁 为Delphi2005做了改动 DSPack 2.3.3 (Sep 2004). DSPack is a set of Components and class to write Multimedia
💻 PAS
字号:
unit Queue;

   (*********************************************************************
    * The contents of this file are used with permission, subject to    *
    * the Mozilla Public License Version 1.1 (the "License"); you may   *
    * not use this file except in compliance with the License. You may  *
    * obtain a copy of the License at                                   *
    * http://www.mozilla.org/MPL/MPL-1.1.html                           *
    *                                                                   *
    * Software distributed under the License is distributed on an       *
    * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or    *
    * implied. See the License for the specific language governing      *
    * rights and limitations under the License.                         *
    *                                                                   *
    * (C) 2004 Martin Offenwanger: coder@dsplayer.de                    *
    *********************************************************************)
{
@author(Martin Offenwanger: coder@dsplayer.de)
@created(Apr 22, 2004)
@lastmod(Sep 09, 2004)
}

interface

uses
  Classes, Windows;

type
  PAsyncRequest = ^TAsyncRequest;
  TAsyncRequest = record
    FPos: LONGLONG;
    FAligned: BOOL;
    FLength: Integer;
    FBuffer: Pointer;
    FContext: Pointer;
    FUser: DWORD;
    Fhr: HRESULT;
  end;

type
  TQueue = class(TList)
  public
    constructor Create;
    destructor Destroy; override;
    procedure Push(AItem: Pointer);
    function Pop: Pointer;
  end;

implementation

constructor TQueue.Create;
begin
  inherited Create;
end;

destructor TQueue.Destroy;
begin
  inherited Destroy;
end;

function TQueue.Pop: Pointer;
begin
  if Count > 0 then
  begin
    Result := Items[0];
    Delete(0);
  end
  else
    Result := nil;
end;

procedure TQueue.Push(AItem: Pointer);
begin
  Add(AItem);
end;

end.

 

⌨️ 快捷键说明

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