Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Toggle main menu visibility
Loading...
Searching...
No Matches
qqueue.h
Go to the documentation of this file.
1
// Copyright (C) 2020 The Qt Company Ltd.
2
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
// Qt-Security score:significant reason:default
4
5
#
ifndef
QQUEUE_H
6
#
define
QQUEUE_H
7
8
#
include
<
QtCore
/
qlist
.
h
>
9
10
QT_BEGIN_NAMESPACE
11
12
13
template
<
class
T>
14
class
QQueue :
public
QList<T>
15
{
16
public
:
17
// compiler-generated special member functions are fine!
18
inline
void
swap(QQueue<T> &other)
noexcept
{ QList<T>::swap(other); }
// prevent QList<->QQueue swaps
19
inline
void
enqueue(
const
T &t) { QList<T>::append(t); }
20
inline
void
enqueue(T &&t) { QList<T>::append(std::move(t)); }
21
inline
T dequeue() {
return
QList<T>::takeFirst(); }
22
inline
T &head() {
return
QList<T>::first(); }
23
inline
const
T &head()
const
{
return
QList<T>::first(); }
24
};
25
26
QT_END_NAMESPACE
27
28
#
endif
// QQUEUE_H
QLocalServer
The QLocalServer class provides a local socket based server.
Definition
qlocalserver.h:21
QT_REQUIRE_CONFIG
QT_REQUIRE_CONFIG(animation)
QT_REQUIRE_CONFIG
QT_REQUIRE_CONFIG(localserver)
qtbase
src
corelib
tools
qqueue.h
Generated on
for Qt by
1.18.0