Class TGenPriorityQueue

DescriptionHierarchyInternal TypesFieldsMethodsProperties

Unit

Declaration

type generic TGenPriorityQueue<_TItem_> = class(TContainer)

Description

no description available, TContainer description follows

Hierarchy

Overview

Internal Types

Published TCompareItems = function (const A, B: _TItem_) : Integer of object;

Methods

Public procedure Clear;
Public constructor Create(InitialCapacity : Integer = 16);
Public function DefaultCompareItems(const A, B: _TItem_) : Integer; virtual;
Public function IsEmpty: Boolean; inline;
Public procedure Pack;
Public procedure Pop;
Public procedure Push(const Item: _TItem_);
Public procedure ReadTop(out Value: _TItem_);
Public procedure Reserve(MinCapacity : Integer);
Public function Top : _TItem_;

Properties

Public property Capacity : Integer read fCapacity;
Public property OnCompareItems : TCompareItems read fOnCompareItems write SetOnCompareItems;
Public property Size: Integer read fSize;

Description

Internal Types

Published TCompareItems = function (const A, B: _TItem_) : Integer of object;
 

Methods

Public procedure Clear;

Empty the queue of all items.

Public constructor Create(InitialCapacity : Integer = 16);

Creates an empty priority queue.

Public function DefaultCompareItems(const A, B: _TItem_) : Integer; virtual;
 
Public function IsEmpty: Boolean; inline;

Returns true if the priority queue is empty.

Public procedure Pack;

Frees unused memory.

Public procedure Pop;

Removes the item from the top of the stack.

Public procedure Push(const Item: _TItem_);

Adds Item to the top of the stack.

Public procedure ReadTop(out Value: _TItem_);
 
Public procedure Reserve(MinCapacity : Integer);

If necessary, increases the capacity of the container to ensure that it can hold at least MinCapacity items.

Public function Top : _TItem_;

Returns the item at the top of the stack.

Properties

Public property Capacity : Integer read fCapacity;

Capacity of the container.

Public property OnCompareItems : TCompareItems read fOnCompareItems write SetOnCompareItems;
 
Public property Size: Integer read fSize;

Number of elements.


Generated by PasDoc 0.13.0 on 2014-07-29 16:12:40