[Properties (by Name)] [Methods (by Name)] [Events (by Name)]
Base class for queues and stacks.
Source position: contnrs.pp line 139
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; |
|
Base class for queues and stacks. |
|
| | ||
TObject |
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.
|
Pointer queue. |
|
|
Pointer Stack. |