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 >:
Inheritance graph
[legend]

List of all members.

Public Member Functions

  QStack ()
  ~QStack ()
void  push (const 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]

Definition at line 59 of file qstack.h.

T pop ( ) [inline]

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]

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]

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: