- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files
- Directories
- Examples

- Class List
- Class Hierarchy
- Class Members

Public Member Functions

# QStack< T > Class Template Reference

Search for all occurrences

## Detailed Description

### template<class T>
class QStack< T >

Definition at line 54 of file qstack.h.

`#include <qstack.h>`

Inheritance diagram for QStack< T >:
[legend]

List of all members.

## Public Member Functions
| QStack ()
| ~QStack ()
void | push (const T &t)
T | pop ()
T & | top ()
const T & | top () const

## Constructor & Destructor Documentation

QStack | ( |  | ) | `[inline]`

Definition at line 57 of file qstack.h.

    {}

~QStack | ( |  | ) | `[inline]`

Definition at line 58 of file qstack.h.

    {}

## Member Function Documentation

void push | ( | const T & | t | ) | `[inline]`

Search for all occurrences

Definition at line 59 of file qstack.h.

    { QVector<T>::append(t); }

T pop | ( |  | ) | `[inline]`

Search for all occurrences

Definition at line 66 of file qstack.h.

    { Q_ASSERT(!this->isEmpty()); T t = this->data()[this->size() -1];
      this->resize(this->size()-1); return t; }

T & top | ( |  | ) | `[inline]`

Search for all occurrences

Definition at line 71 of file qstack.h.

    { Q_ASSERT(!this->isEmpty()); this->detach(); return this->data()[this->size()-1]; }

const T & top | ( |  | ) | const `[inline]`

Search for all occurrences

Definition at line 75 of file qstack.h.

    { Q_ASSERT(!this->isEmpty()); return this->data()[this->size()-1]; }

The documentation for this class was generated from the following file:

- QtCore/qstack.h