Blame qtools/qstack.doc

Packit 1c1d7e
/****************************************************************************
Packit 1c1d7e
** 
Packit 1c1d7e
**
Packit 1c1d7e
** QStack class documentation
Packit 1c1d7e
**
Packit 1c1d7e
** Copyright (C) 1992-2000 Trolltech AS.  All rights reserved.
Packit 1c1d7e
**
Packit 1c1d7e
** This file is part of the Qt GUI Toolkit.
Packit 1c1d7e
**
Packit 1c1d7e
** This file may be distributed under the terms of the Q Public License
Packit 1c1d7e
** as defined by Trolltech AS of Norway and appearing in the file
Packit 1c1d7e
** LICENSE.QPL included in the packaging of this file.
Packit 1c1d7e
**
Packit 1c1d7e
** This file may be distributed and/or modified under the terms of the
Packit 1c1d7e
** GNU General Public License version 2 as published by the Free Software
Packit 1c1d7e
** Foundation and appearing in the file LICENSE.GPL included in the
Packit 1c1d7e
** packaging of this file.
Packit 1c1d7e
**
Packit 1c1d7e
** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
Packit 1c1d7e
** licenses may use this file in accordance with the Qt Commercial License
Packit 1c1d7e
** Agreement provided with the Software.
Packit 1c1d7e
**
Packit 1c1d7e
** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
Packit 1c1d7e
** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
Packit 1c1d7e
**
Packit 1c1d7e
** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
Packit 1c1d7e
**   information about Qt Commercial License Agreements.
Packit 1c1d7e
** See http://www.trolltech.com/qpl/ for QPL licensing information.
Packit 1c1d7e
** See http://www.trolltech.com/gpl/ for GPL licensing information.
Packit 1c1d7e
**
Packit 1c1d7e
** Contact info@trolltech.com if any conditions of this licensing are
Packit 1c1d7e
** not clear to you.
Packit 1c1d7e
**
Packit 1c1d7e
**********************************************************************/
Packit 1c1d7e
Packit 1c1d7e
Packit 1c1d7e
/*****************************************************************************
Packit 1c1d7e
  QStack documentation
Packit 1c1d7e
 *****************************************************************************/
Packit 1c1d7e
Packit 1c1d7e
/*!
Packit 1c1d7e
  \class QStack qstack.h
Packit 1c1d7e
  \brief The QStack class is a template class that provides a stack.
Packit 1c1d7e
Packit 1c1d7e
  \ingroup collection
Packit 1c1d7e
  \ingroup tools
Packit 1c1d7e
Packit 1c1d7e
  QStack is implemented as a template class. Define a template
Packit 1c1d7e
  instance QStack\<X\> to create a stack that operates on pointers to
Packit 1c1d7e
  X, or X*.
Packit 1c1d7e
Packit 1c1d7e
  A stack is a Last In, First Out (LIFO) structure. Items are added to
Packit 1c1d7e
  the top of the stack with push() and retrieved from the top
Packit 1c1d7e
  with pop().
Packit 1c1d7e
Packit 1c1d7e
  \sa \link collection.html Collection Classes\endlink
Packit 1c1d7e
*/
Packit 1c1d7e
Packit 1c1d7e
/*! \fn QStack::QStack () 
Packit 1c1d7e
  Creates and empty stack.
Packit 1c1d7e
*/
Packit 1c1d7e
Packit 1c1d7e
/*! \fn QStack::QStack (const QStack<type>& s) 
Packit 1c1d7e
  Creates a stack by making a shallow copy of another stack.
Packit 1c1d7e
*/
Packit 1c1d7e
Packit 1c1d7e
/*! \fn QStack::~QStack () 
Packit 1c1d7e
  Destroys the stack.  All items will be deleted if autoDelete() is TRUE.
Packit 1c1d7e
*/
Packit 1c1d7e
Packit 1c1d7e
/*! \fn QStack<type>& QStack::operator= (const QStack<type>& s) 
Packit 1c1d7e
  Sets the contents of this stack by making a shallow copy of another stack.
Packit 1c1d7e
  Elements currently in this stack will be deleted if autoDelete() is TRUE.
Packit 1c1d7e
*/
Packit 1c1d7e
Packit 1c1d7e
/*! \fn bool QStack::isEmpty () const 
Packit 1c1d7e
  Returns TRUE is the stack contains no elements to be \link pop() popped\endlink.
Packit 1c1d7e
*/
Packit 1c1d7e
Packit 1c1d7e
/*! \fn void QStack::push (const type* d) 
Packit 1c1d7e
  Adds an element to the top of the stack.  Last in, first out.
Packit 1c1d7e
*/
Packit 1c1d7e
Packit 1c1d7e
/*! \fn type* QStack::pop () 
Packit 1c1d7e
  Removes the top item from the stack and returns it.
Packit 1c1d7e
*/
Packit 1c1d7e
Packit 1c1d7e
/*! \fn bool QStack::remove () 
Packit 1c1d7e
  Removes the top item from the stack and deletes it if
Packit 1c1d7e
  autoDelete() is TRUE.  Returns TRUE if there was an item to pop.
Packit 1c1d7e
Packit 1c1d7e
  \sa clear()
Packit 1c1d7e
*/
Packit 1c1d7e
Packit 1c1d7e
/*! \fn void QStack::clear()
Packit 1c1d7e
  Removes all items from the stack, deleting them if
Packit 1c1d7e
  autoDelete() is TRUE.
Packit 1c1d7e
Packit 1c1d7e
  \sa remove()
Packit 1c1d7e
*/
Packit 1c1d7e
Packit 1c1d7e
/*! \fn uint QStack::count() const
Packit 1c1d7e
  Returns the number of items in the stack.
Packit 1c1d7e
Packit 1c1d7e
  \sa isEmpty()
Packit 1c1d7e
*/
Packit 1c1d7e
Packit 1c1d7e
/*! \fn type* QStack::top () const 
Packit 1c1d7e
  Returns a reference to the top item on the stack (most recently pushed).
Packit 1c1d7e
  The stack is not changed.
Packit 1c1d7e
*/
Packit 1c1d7e
Packit 1c1d7e
/*! \fn QStack::operator type* ()const 
Packit 1c1d7e
  Returns a reference to the top item on the stack (most recently pushed).
Packit 1c1d7e
  The stack is not changed.
Packit 1c1d7e
*/
Packit 1c1d7e
Packit 1c1d7e
/*! \fn type* QStack::current () const 
Packit 1c1d7e
  Returns a reference to the top item on the stack (most recently pushed).
Packit 1c1d7e
  The stack is not changed.
Packit 1c1d7e
*/
Packit 1c1d7e
Packit 1c1d7e
/*! \fn bool QStack::autoDelete() const
Packit 1c1d7e
Packit 1c1d7e
  The same as QCollection::autoDelete().
Packit 1c1d7e
Packit 1c1d7e
  \sa setAutoDelete()
Packit 1c1d7e
*/
Packit 1c1d7e
Packit 1c1d7e
/*! \fn void QStack::setAutoDelete( bool enable ) 
Packit 1c1d7e
Packit 1c1d7e
  The same as QCollection::setAutoDelete().
Packit 1c1d7e
 
Packit 1c1d7e
  \sa autoDelete()
Packit 1c1d7e
*/