45 #include <QtCore/qvector.h>
#define QT_END_NAMESPACE
This macro expands to.
The QStack class is a template class that provides a stack.
void swap(QVector< T > &other)
Swaps vector other with this vector.
The QVector class is a template class that provides a dynamic array.
void resize(int size)
Sets the size of the vector to size.
T pop()
Removes the top item from the stack and returns it.
#define QT_BEGIN_NAMESPACE
This macro expands to.
void append(const T &t)
Inserts value at the end of the vector.
void push(const T &t)
Adds element t to the top of the stack.
void swap(QStack< T > &other)
Swaps stack other with this stack.
~QStack()
Destroys the stack.
T * data()
Returns a pointer to the data stored in the vector.
bool isEmpty() const
Returns true if the vector has size 0; otherwise returns false.
QStack()
Constructs an empty stack.
int size() const
Returns the number of items in the vector.
T & top()
Returns a reference to the stack's top item.