Qt 4.8
Public Functions | Private Types | Properties | List of all members
QDeclarativeVMEStack< T > Class Template Reference
Inheritance diagram for QDeclarativeVMEStack< T >:
QVarLengthArray< T, 128 >

Public Functions

const T & at (int index) const
 
int count () const
 
bool isEmpty () const
 
pop ()
 
void push (const T &o)
 
 QDeclarativeVMEStack ()
 
const T & top () const
 

Private Types

typedef QVarLengthArray< T, 128 > VLA
 
- Private Types inherited from QVarLengthArray< T, 128 >
typedef const T * const_iterator
 
typedef const value_typeconst_pointer
 
typedef const value_typeconst_reference
 
typedef qptrdiff difference_type
 
typedef T * iterator
 
typedef value_typepointer
 
typedef value_typereference
 
typedef int size_type
 
typedef T value_type
 

Properties

int _index
 
- Properties inherited from QVarLengthArray< T, 128 >
char array [sizeof(qint64) *(((Prealloc *sizeof(T))/sizeof(qint64))+1)]
 
qint64 q_for_alignment_1
 
double q_for_alignment_2
 

Additional Inherited Members

- Private Functions inherited from QVarLengthArray< T, 128 >
void append (const T &t)
 
void append (const T *buf, int size)
 
const T & at (int idx) const
 
iterator begin ()
 
const_iterator begin () const
 
int capacity () const
 
void clear ()
 
const_iterator constBegin () const
 
const T * constData () const
 
const_iterator constEnd () const
 
int count () const
 
T * data ()
 
const T * data () const
 
iterator end ()
 
const_iterator end () const
 
iterator erase (iterator begin, iterator end)
 
iterator erase (iterator pos)
 
void insert (int i, const T &t)
 
void insert (int i, int n, const T &t)
 
iterator insert (iterator before, int n, const T &x)
 
iterator insert (iterator before, const T &x)
 
bool isEmpty () const
 
QVarLengthArray< T, Prealloc > & operator+= (const T &t)
 
QVarLengthArray< T, Prealloc > & operator<< (const T &t)
 
QVarLengthArray< T, Prealloc > & operator= (const QVarLengthArray< T, Prealloc > &other)
 
T & operator[] (int idx)
 
const T & operator[] (int idx) const
 
void prepend (const T &t)
 
 QVarLengthArray (int size=0)
 
 QVarLengthArray (const QVarLengthArray< T, Prealloc > &other)
 
void remove (int i)
 
void remove (int i, int n)
 
void removeLast ()
 
void replace (int i, const T &t)
 
void reserve (int size)
 
void resize (int size)
 
int size () const
 
value (int i) const
 
value (int i, const T &defaultValue) const
 
 ~QVarLengthArray ()
 

Detailed Description

template<typename T>
class QDeclarativeVMEStack< T >

Definition at line 79 of file qdeclarativevme.cpp.

Typedefs

◆ VLA

template<typename T>
typedef QVarLengthArray<T, 128> QDeclarativeVMEStack< T >::VLA
private

Definition at line 82 of file qdeclarativevme.cpp.

Constructors and Destructors

◆ QDeclarativeVMEStack()

template<typename T >
QDeclarativeVMEStack< T >::QDeclarativeVMEStack ( )
inline

Definition at line 1081 of file qdeclarativevme.cpp.

1082 : _index(-1)
1083 {
1084 }

Functions

◆ at()

template<typename T >
const T & QDeclarativeVMEStack< T >::at ( int  index) const
inline

Definition at line 1120 of file qdeclarativevme.cpp.

Referenced by QDeclarativeVMEStack< QObject *>::top().

1120  {
1121  return VLA::data()[index];
1122 }
quint16 index

◆ count()

template<typename T >
int QDeclarativeVMEStack< T >::count ( ) const
inline

Definition at line 1115 of file qdeclarativevme.cpp.

Referenced by QDeclarativeVME::run(), and QDeclarativeVME::runDeferred().

1115  {
1116  return _index + 1;
1117 }

◆ isEmpty()

template<typename T >
bool QDeclarativeVMEStack< T >::isEmpty ( ) const
inline

Definition at line 1087 of file qdeclarativevme.cpp.

Referenced by QDeclarativeVME::run().

1087  {
1088  return _index == -1;
1089 }

◆ pop()

template<typename T >
T QDeclarativeVMEStack< T >::pop ( )
inline

Definition at line 1108 of file qdeclarativevme.cpp.

1108  {
1109  Q_ASSERT(_index >= 0);
1110  --_index;
1111  return VLA::data()[_index + 1];
1112 }
#define Q_ASSERT(cond)
Definition: qglobal.h:1823

◆ push()

template<typename T>
void QDeclarativeVMEStack< T >::push ( const T &  o)
inline

Definition at line 1097 of file qdeclarativevme.cpp.

Referenced by QDeclarativeVME::run(), and QDeclarativeVME::runDeferred().

1097  {
1098  _index++;
1099 
1100  Q_ASSERT(_index <= VLA::size());
1101  if (_index == VLA::size())
1102  VLA::append(o);
1103  else
1104  VLA::data()[_index] = o;
1105 }
#define Q_ASSERT(cond)
Definition: qglobal.h:1823

◆ top()

template<typename T >
const T & QDeclarativeVMEStack< T >::top ( ) const
inline

Definition at line 1092 of file qdeclarativevme.cpp.

Referenced by QDeclarativeVME::run().

1092  {
1093  return at(_index);
1094 }
const T & at(int index) const

Properties

◆ _index

template<typename T>
int QDeclarativeVMEStack< T >::_index
private

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