[Overview][Constants][Types][Classes][Procedures and functions][Index] Reference for unit 'Contnrs' (#fcl)

TOrderedList

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Base class for queues and stacks.

Declaration

Source position: contnrs.pp line 131

type TOrderedList = class(TObject)

public

  constructor Create;

  

Create a new ordered list

  destructor Destroy; override;

  

Free an ordered list

  function Count;

  

Number of elements on the list.

  function AtLeast();

  

Check whether the list contains a certain number of elements.

  function Push();

  

Push another element on the list.

  function Pop;

  

Remove an element from the list.

  function Peek;

  

Return the next element to be popped from the list.

end;

Inheritance

TOrderedList

  

Base class for queues and stacks.

|

TObject

Description

TOrderedList provides the base class for TQueue and TStack. It provides an interface for pushing and popping elements on or off the list, and manages the internal list of pointers.

Note that TOrderedList does not manage objects on the stack, i.e. objects are not freed when the ordered list is destroyed.

See also

TQueue

  

Pointer queue

TStack

  

Pointer Stack


Documentation generated on: Jun 23 2021