QStack(3qt)

NAME
QStack - Template class that provides a stack

SYNOPSIS

#include <qstack.h>

  Public Members
QStack ()
QStack ( const QStack<type> & s )
~QStack ()
QStack<type>& operator= ( const QStack<type> & s )
bool autoDelete () const
void setAutoDelete ( bool enable )
virtual uint count () const
bool isEmpty () const
void push ( const type * d )
type* pop ()
bool remove ()
virtual void clear ()
type* top () const
operator type* ()const
type* current () const

DESCRIPTION
The QStack class is a template class that provides a stack.

QStack is implemented as both a template and a macro class. Define a template instance QStack<X> to create a stack that operates on pointers to X, or X*.

A stack is a collection that can be used to push and pop items.

See also: Collection Classes

MEMBER FUNCTION DOCUMENTATION

QStack::QStack ()
Creates and empty stack.

QStack::QStack ( const QStack<type> & s )
Creates a stack by making a shallow copy of another stack.

QStack::~QStack ()
Destroys the stack. All items will be deleted if autoDelete() is TRUE.

QStack::operator type* () const
Returns a reference to the top item on the stack (most recently pushed). The stack is not changed.

type* QStack::current () const
Returns a reference to the top item on the stack (most recently pushed). The stack is not changed.

bool QStack::isEmpty () const
Returns TRUE is the stack contains no elements to be popped

QStack<type>& QStack::operator= ( const QStack<type> & s )
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.

type* QStack::pop ()
Removes the top item from the stack and returns it.

void QStack::push ( const type * d )
Adds an element to the top of the stack. Last in, first out.

bool QStack::remove ()
Removes the top item from the stack and deletes it if if autoDelete() is TRUE. Returns TRUE if there was an item to pop.

type* QStack::top () const
Returns a reference to the top item on the stack (most recently pushed). The stack is not changed.

SEE ALSO
http://www.troll.no/qt/qstack.html

COPYRIGHT
Copyright 1992-1997 Troll Tech AS. See the LICENSE file included in the distribution for a complete license statement.

AUTHOR
Generated automatically from the source code.