Declarations Section
Deque Class
Deque (and Queue and Stack) Data Structure
Copyright 1998 Entisoft
Summary: The Deque is a data structure that stores values of any type. It provides operations for inserting values into and removing values from both the head and tail of the list. The Deque can be used as both a stack (a last-in-first-out or LIFO data structure) and a queue (a first-in-first-out or FIFO data structure).
Stacks: Users who need a stack data structure should consider using the Stack Class instead because it provides more operations that are specific to stacks.
Examples: Since this Class represents a data structure, you must DIMension a instance of this Class for each Deque you would like to create. The following line of Visual Basic code will create a Deque: Public dqTemp As New Deque
Please Note: None of the examples will execute within the Debug or Immediate window because those windows do not support the definition of variables. To run these examples, you must place the code within a Function or Subroutine.
See also: Stack Class
UsingTheDataStructuresHelp Topic
Using this Class in Your Projects: Please see the UsingTheDataStructuresHelp Topic for important details about the data structure Classes such as this one within your projects.
v1.3 Changes: 1. This Class has been completely rewritten to use pointers to store the Deque. 2. The functions that retrieve values from the Deque now do so via an argument instead of via the function's return value. This is so that you do not have to know the type of data being returned in order to assign it into a variable. 3. This Class has been fixed to support the storage and retrieveal of Object and DataObject type Values (variables with a datatype of vbObject and vbDataObject). See the other BugFix notes within this Class for a list of the individual Functions and Subroutines that are affected by this change. 4. New Name and Tag Properties allow you to associate a Name and some other arbitraty data with each instance of a Deque. 5. New Head and Tail Properties allow you to retrieve the item at the head and tail of the Deque respectively, without removing those items from the Deque. 6. New AddHeadMulti, AddTailMulti, RemoveHeadMulti, and RemoveTailMulti routines allow you to add and remove multiple values with a single call. Copyright 1996-1999 Entisoft
Entisoft Tools is a trademark of Entisoft.