File indexing completed on 2025-01-18 10:07:34
0001
0002
0003
0004 #ifndef QQUEUE_H
0005 #define QQUEUE_H
0006
0007 #include <QtCore/qlist.h>
0008
0009 QT_BEGIN_NAMESPACE
0010
0011
0012 template <class T>
0013 class QQueue : public QList<T>
0014 {
0015 public:
0016
0017 inline void swap(QQueue<T> &other) noexcept { QList<T>::swap(other); }
0018 inline void enqueue(const T &t) { QList<T>::append(t); }
0019 inline T dequeue() { return QList<T>::takeFirst(); }
0020 inline T &head() { return QList<T>::first(); }
0021 inline const T &head() const { return QList<T>::first(); }
0022 };
0023
0024 QT_END_NAMESPACE
0025
0026 #endif