⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 qptrstack.3qt

📁 Linux下的基于X11的图形开发环境。
💻 3QT
字号:
'\" t.TH QPtrStack 3qt "9 December 2002" "Trolltech AS" \" -*- nroff -*-.\" Copyright 1992-2001 Trolltech AS.  All rights reserved.  See the.\" license file included in the distribution for a complete license.\" statement..\".ad l.nh.SH NAMEQPtrStack \- Template class that provides a stack.SH SYNOPSIS\fC#include <qptrstack.h>\fR.PP.SS "Public Members".in +1c.ti -1c.BI "\fBQPtrStack\fR ()".br.ti -1c.BI "\fBQPtrStack\fR ( const QPtrStack<type> & s )".br.ti -1c.BI "\fB~QPtrStack\fR ()".br.ti -1c.BI "QPtrStack<type> & \fBoperator=\fR ( const QPtrStack<type> & s )".br.ti -1c.BI "bool \fBautoDelete\fR () const".br.ti -1c.BI "void \fBsetAutoDelete\fR ( bool enable )".br.ti -1c.BI "uint \fBcount\fR () const".br.ti -1c.BI "bool \fBisEmpty\fR () const".br.ti -1c.BI "void \fBpush\fR ( const type * d )".br.ti -1c.BI "type * \fBpop\fR ()".br.ti -1c.BI "bool \fBremove\fR ()".br.ti -1c.BI "void \fBclear\fR ()".br.ti -1c.BI "type * \fBtop\fR () const".br.ti -1c.BI "\fBoperator type *\fR () const".br.ti -1c.BI "type * \fBcurrent\fR () const".br.in -1c.SS "Protected Members".in +1c.ti -1c.BI "virtual QDataStream & \fBread\fR ( QDataStream & s, QPtrCollection::Item & item )".br.ti -1c.BI "virtual QDataStream & \fBwrite\fR ( QDataStream & s, QPtrCollection::Item item ) const".br.in -1c.SH DESCRIPTIONThe QPtrStack class is a template class that provides a stack..PPQValueStack is an STL-compatible alternative to this class..PPDefine a template instance QPtrStack<X> to create a stack that operates on pointers to X, (X*)..PPA 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(). Use top() to get a reference to the top element without changing the stack..PPYou can control the stack's deletion policy with setAutoDelete()..PPFor compatibility with the QPtrCollection classes current() and remove() are provided; they both operate on the top()..PPSee also QPtrList, QPtrQueue, and Non-GUI Classes..SH MEMBER FUNCTION DOCUMENTATION.SH "QPtrStack::QPtrStack ()"Creates an empty stack..SH "QPtrStack::QPtrStack ( const QPtrStack<type> & s )"Creates a stack by making a shallow copy of another stack \fIs\fR..SH "QPtrStack::~QPtrStack ()"Destroys the stack. All items will be deleted if autoDelete() is TRUE..SH "bool QPtrStack::autoDelete () const"The same as QPtrCollection::autoDelete()..PPSee also setAutoDelete()..SH "void QPtrStack::clear ()"Removes all items from the stack, deleting them if autoDelete() is TRUE..PPSee also remove()..SH "uint QPtrStack::count () const"Returns the number of items in the stack..PPSee also isEmpty()..SH "type * QPtrStack::current () const"Returns a pointer to the top item on the stack (most recently pushed). The stack is not changed. Returns 0 if the stack is empty..SH "bool QPtrStack::isEmpty () const"Returns TRUE is the stack contains no elements; otherwise returns FALSE..SH "QPtrStack::operator type * () const"Returns a pointer to the top item on the stack (most recently pushed). The stack is not changed. Returns 0 if the stack is empty..SH "QPtrStack<type> & QPtrStack::operator= ( const QPtrStack<type> & s )"Sets the contents of this stack by making a shallow copy of another stack \fIs\fR. Elements currently in this stack will be deleted if autoDelete() is TRUE..SH "type * QPtrStack::pop ()"Removes the top item from the stack and returns it. The stack must not be empty..SH "void QPtrStack::push ( const type * d )"Adds an element \fId\fR to the top of the stack. Last in, first out..SH "QDataStream & QPtrStack::read ( QDataStream & s, QPtrCollection::Item & item )\fC [virtual protected]\fR"Reads a stack item, \fIitem\fR, from the stream \fIs\fR and returns a reference to the stream..PPThe default implementation sets \fIitem\fR to 0..PPSee also write()..SH "bool QPtrStack::remove ()"Removes the top item from the stack and deletes it if autoDelete() is TRUE. Returns TRUE if there was an item to pop; otherwise returns FALSE..PPSee also clear()..SH "void QPtrStack::setAutoDelete ( bool enable )"Defines whether this stack auto-deletes its contents. The same as QPtrCollection::setAutoDelete()..PPIf \fIenable\fR is TRUE the stack auto-deletes its contents; if \fIenable\fR is FALSE the stack does not delete its contents..PPSee also autoDelete()..SH "type * QPtrStack::top () const"Returns a pointer to the top item on the stack (most recently pushed). The stack is not changed. Returns 0 if the stack is empty..SH "QDataStream & QPtrStack::write ( QDataStream & s, QPtrCollection::Item item ) const\fC [virtual protected]\fR"Writes a stack item, \fIitem\fR, to the stream \fIs\fR and returns a reference to the stream..PPThe default implementation does nothing..PPSee also read()..SH "SEE ALSO".BR http://doc.trolltech.com/qptrstack.html.BR http://www.trolltech.com/faq/tech.html.SH COPYRIGHTCopyright 1992-2001 Trolltech AS, http://www.trolltech.com.  See thelicense file included in the distribution for a complete licensestatement..SH AUTHORGenerated automatically from the source code..SH BUGSIf you find a bug in Qt, please report it as described in.BR http://doc.trolltech.com/bughowto.html .Good bug reports help us to help you. Thank you..PThe definitive Qt documentation is provided in HTML format; it islocated at $QTDIR/doc/html and can be read using Qt Assistant or witha web browser. This man page is provided as a convenience for thoseusers who prefer man pages, although this format is not officiallysupported by Trolltech. .PIf you find errors in this manual page, please report them to.BR qt-bugs@trolltech.com .Please include the name of the manual page (qptrstack.3qt) and the Qtversion (3.1.1).

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -