The QStack class is a template class that provides a stack. More...
#include <qstack.h>
QStack is implemented as a template class. Define a template instance QStack<X> to create a stack that operates on pointers to X, or X*.
A stack is a Last In, First Out (LIFO) structure. Items are added to the top of the stack with push() and retrieved from the top with pop().
See also Collection Classes
Creates and empty stack.
Creates a stack by making a shallow copy of another stack.
Destroys the stack. All items will be deleted if autoDelete() is TRUE.
Returns a reference to the top item on the stack (most recently pushed). The stack is not changed.
The same as QCollection::autoDelete().
See also setAutoDelete().
[virtual]
Removes all items from the stack, deleting them if autoDelete() is TRUE.
See also remove().
Reimplemented from QCollection.
[virtual]
Returns the number of items in the stack.
See also isEmpty().
Reimplemented from QCollection.
Returns a reference to the top item on the stack (most recently pushed). The stack is not changed.
Returns TRUE is the stack contains no elements to be popped
Sets the contents of this stack by making a shallow copy of another stack. Elements currently in this stack will be deleted if autoDelete() is TRUE.
Removes the top item from the stack and returns it.
Adds an element to the top of the stack. Last in, first out.
Removes the top item from the stack and deletes it if autoDelete() is TRUE. Returns TRUE if there was an item to pop.
See also clear().
The same as QCollection::setAutoDelete().
See also autoDelete().
Returns a reference to the top item on the stack (most recently pushed). The stack is not changed.
Search the documentation, FAQ, qt-interest archive and more (uses
www.trolltech.com):
This file is part of the Qt toolkit, copyright © 1995-2000 Trolltech, all rights reserved.
Copyright İ 2000 Trolltech | Trademarks | Qt version 2.2.1
|