4#ifndef QNATIVEINTERFACE_H
5#define QNATIVEINTERFACE_H
7#include <QtCore/qglobal.h>
16#define QT_DECLARE_NATIVE_INTERFACE_3(NativeInterface, Revision, BaseType)
18 virtual ~NativeInterface();
21 using baseType = BaseType;
22 static constexpr char const *name = QT_STRINGIFY(NativeInterface);
23 static constexpr int revision = Revision;
26 template <typename, typename>
27 friend struct QNativeInterface::Private::has_type_info;
30 friend bool constexpr QNativeInterface::Private::hasTypeInfo();
33 friend struct QNativeInterface::Private::TypeInfo;
35 NativeInterface() = default;
36 Q_DISABLE_COPY_MOVE(NativeInterface)
41#define QT_DECLARE_NATIVE_INTERFACE_2(NativeInterface, Revision)
42 static_assert(false, "Must provide a base type when specifying revision");
44#define QT_DECLARE_NATIVE_INTERFACE_1(NativeInterface)
47#define QT_DECLARE_NATIVE_INTERFACE(...)
54 template <
typename NativeInterface,
typename =
void>
70 template <
typename NativeInterface>
73 return has_type_info<NativeInterface>::value;
76 template <
typename NativeInterface>
82 static constexpr bool haveTypeInfo = hasTypeInfo<NativeInterface>();
86 template <
typename BaseType>
90 return std::is_base_of<
typename NativeInterface::TypeInfo::baseType, BaseType>::value;
107 return NativeInterface::TypeInfo::revision;
112 static constexpr char const *
name()
115 return NativeInterface::TypeInfo::name;
123 template <
typename I>
129#define QT_DECLARE_NATIVE_INTERFACE_ACCESSOR(T)
130 template <typename QNativeInterface>
131 QNativeInterface *nativeInterface() const;
133#define QT_DECLARE_NATIVE_INTERFACE_ACCESSOR(T)
134 template <typename NativeInterface, typename TypeInfo = QNativeInterface::Private::NativeInterface<NativeInterface>,
135 typename BaseType = T, std::enable_if_t<TypeInfo::template isCompatibleWith<T>, bool> = true>
136 NativeInterface *nativeInterface() const
138 return static_cast<NativeInterface*>(resolveInterface(
139 TypeInfo::name(), TypeInfo::revision()));
142 void *resolveInterface(const char *name, int revision) const;
\inmodule QtCore\reentrant
\inmodule QtCore\reentrant
\inmodule QtCore \reentrant
constexpr bool operator==(iterator o) const
constexpr bool operator<(iterator other) const
constexpr bool operator<(const_iterator other) const
const_iterator operator-(qsizetype j) const
constexpr bool operator==(pointer p) const
constexpr bool operator>(const_iterator other) const
std::random_access_iterator_tag iterator_category
const T & operator[](qsizetype j) const
const_iterator & operator-=(qsizetype j)
constexpr const_iterator(iterator o)
constexpr const_iterator()=default
const T & operator*() const
constexpr bool operator!=(const_iterator o) const
const_iterator operator+(qsizetype j) const
constexpr bool operator<=(iterator other) const
const value_type element_type
const_iterator & operator++()
constexpr bool operator!=(pointer p) const
constexpr bool operator>(iterator other) const
qsizetype operator-(const_iterator j) const
constexpr bool operator==(const_iterator o) const
constexpr bool operator>=(iterator other) const
const_iterator operator--(int)
const_iterator & operator--()
const_iterator operator++(int)
constexpr bool operator!=(iterator o) const
const_iterator & operator+=(qsizetype j)
friend const_iterator operator+(qsizetype j, const_iterator k)
constexpr bool operator<=(const_iterator other) const
const T * operator->() const
constexpr bool operator>=(const_iterator other) const
constexpr bool operator>(iterator other) const
iterator operator+(qsizetype j) const
iterator & operator-=(qsizetype j)
T & operator[](qsizetype j) const
constexpr bool operator<(const_iterator other) const
constexpr bool operator!=(pointer p) const
constexpr bool operator<=(iterator other) const
constexpr bool operator!=(iterator o) const
constexpr bool operator<=(const_iterator other) const
constexpr bool operator>(const_iterator other) const
constexpr bool operator>=(iterator other) const
constexpr bool operator<(iterator other) const
friend iterator operator+(qsizetype j, iterator k)
std::random_access_iterator_tag iterator_category
constexpr bool operator!=(const_iterator o) const
constexpr bool operator==(const_iterator o) const
constexpr bool operator>=(const_iterator other) const
qsizetype operator-(iterator j) const
constexpr iterator()=default
iterator operator-(qsizetype j) const
constexpr bool operator==(iterator o) const
iterator & operator+=(qsizetype j)
constexpr bool operator==(pointer p) const
void append(const_iterator i1, const_iterator i2)
iterator insert(const_iterator before, parameter_type t)
void removeFirst() noexcept
QList< T > & fill(parameter_type t, qsizetype size=-1)
const_pointer constData() const noexcept
void push_front(rvalue_ref t)
const_iterator begin() const noexcept
bool isDetached() const noexcept
void removeAt(qsizetype i)
QList< T > last(qsizetype n) const
bool isSharedWith(const QList< T > &other) const
QList< T > & operator+=(const QList< T > &l)
QList< T > operator+(const QList< T > &l) &&
reference emplaceFront(Args &&... args)
reference emplace_back(Args &&... args)
const T & constLast() const noexcept
iterator erase(const_iterator begin, const_iterator end)
void resizeForOverwrite(qsizetype size)
QList< T > sliced(qsizetype pos, qsizetype n) const
QList(std::initializer_list< T > args)
constexpr qsizetype max_size() const noexcept
QTypeTraits::compare_eq_result_container< QList, U > operator==(const QList &other) const
iterator insert(qsizetype i, parameter_type t)
bool empty() const noexcept
bool removeOne(const AT &t)
QList< T > toList() const noexcept
QList(InputIterator i1, InputIterator i2)
static QList< T > fromReadOnlyData(const T(&t)[N]) noexcept
static QList< T > fromList(const QList< T > &list) noexcept
QList(qsizetype size, parameter_type t)
const_reference back() const noexcept
qsizetype capacity() const
void swapItemsAt(qsizetype i, qsizetype j)
void push_back(parameter_type t)
QList< T > operator+(const QList< T > &l) const &
const_iterator end() const noexcept
iterator erase(const_iterator pos)
bool endsWith(parameter_type t) const
qsizetype count(const AT &t) const noexcept
bool startsWith(parameter_type t) const
friend qsizetype QtPrivate::lastIndexOf(const QList< V > &list, const U &u, qsizetype from) noexcept
QList< T > operator+(QList< T > &&l) &&
std::reverse_iterator< iterator > reverse_iterator
const_reference at(qsizetype i) const noexcept
constexpr qsizetype size() const noexcept
QList< T > sliced(qsizetype pos) const
QList< T > toVector() const noexcept
T value(qsizetype i) const
void swap(QList &other) noexcept
iterator insert(const_iterator before, qsizetype n, parameter_type t)
QList< T > & operator=(std::initializer_list< T > args)
void move(qsizetype from, qsizetype to)
QList(DataPointer dd) noexcept
const_reverse_iterator crbegin() const noexcept
reference operator[](qsizetype i)
const_iterator constBegin() const noexcept
const_reference operator[](qsizetype i) const noexcept
const_reverse_iterator rbegin() const noexcept
constexpr QList() noexcept=default
void remove(qsizetype i, qsizetype n=1)
const DataPointer & data_ptr() const &
qsizetype removeIf(Predicate pred)
DataPointer & data_ptr() &
std::reverse_iterator< const_iterator > const_reverse_iterator
qsizetype removeAll(const AT &t)
iterator emplace(qsizetype i, Args &&... args)
const T & first() const noexcept
iterator insert(qsizetype i, qsizetype n, parameter_type t)
void append(QList< T > &&l)
reference emplaceBack(Args &&... args)
QList< T > mid(qsizetype pos, qsizetype len=-1) const
QTypeTraits::compare_lt_result_container< QList, U > operator>(const QList &other) const noexcept(noexcept(other< std::declval< QList< U > >()))
void prepend(rvalue_ref t)
QList< T > operator+(QList< T > &&l) const &
QList & assign(std::initializer_list< T > l)
void resize(qsizetype size, parameter_type c)
QList< T > first(qsizetype n) const
const T & constFirst() const noexcept
static constexpr qsizetype maxSize()
iterator emplace(const_iterator before, Args &&... args)
void reserve(qsizetype size)
QList & assign(InputIterator first, InputIterator last)
static QList< T > fromVector(const QList< T > &vector) noexcept
void replace(qsizetype i, parameter_type t)
reverse_iterator rbegin()
void pop_front() noexcept
constexpr bool isEmpty() const noexcept
const T & const_reference
const T & last() const noexcept
constexpr qsizetype count() const noexcept
void removeLast() noexcept
void resize(qsizetype size)
friend auto compareThreeWay(const QList &lhs, const QList &rhs)
const_iterator cend() const noexcept
void append(parameter_type t)
QList< T > & operator+=(parameter_type t)
QTypeTraits::compare_eq_result_container< QList, U > operator!=(const QList &other) const
const_iterator constEnd() const noexcept
const_reverse_iterator rend() const noexcept
T value(qsizetype i, parameter_type defaultValue) const
const_iterator cbegin() const noexcept
QList & assign(qsizetype n, parameter_type t)
QTypeTraits::compare_lt_result_container< QList, U > operator>=(const QList &other) const noexcept(noexcept(std::declval< QList< U > >()< other))
const_pointer data() const noexcept
constexpr qsizetype length() const noexcept
const_reference front() const noexcept
QList< T > & operator+=(QList< T > &&l)
friend qsizetype QtPrivate::indexOf(const QList< V > &list, const U &u, qsizetype from) noexcept
DataPointer && data_ptr() &&
void append(const QList< T > &l)
const_iterator ConstIterator
const_reverse_iterator crend() const noexcept
\inmodule QtCore \reentrant
bool constexpr hasTypeInfo()
QString && asString(QString &&s)
constexpr QAnyStringArg qStringLikeToArg(QAnyStringView s) noexcept
qsizetype indexOf(const QList< T > &vector, const U &u, qsizetype from) noexcept
const QString & asString(const QString &s)
qsizetype lastIndexOf(const QList< T > &vector, const U &u, qsizetype from) noexcept
qsizetype lastIndexOf(const QList< V > &list, const U &u, qsizetype from) noexcept
qsizetype indexOf(const QList< V > &list, const U &u, qsizetype from) noexcept
static constexpr qsizetype lengthHelperPointer(const Char *data) noexcept
std::is_same< Char, char32_t > IsCompatibleChar32TypeHelper
constexpr bool isLatin1(QLatin1StringView s) noexcept
QString operator""_s(const char16_t *str, size_t size) noexcept
QByteArrayView qToByteArrayViewIgnoringNull(const QByteArrayLike &b) noexcept
Q_DECLARE_TYPEINFO(QByteArrayView, Q_PRIMITIVE_TYPE)
#define __has_cpp_attribute(x)
Q_CORE_EXPORT QDebug operator<<(QDebug debug, QDir::Filters filters)
Q_LOGGING_CATEGORY(lcEventDispatcher, "qt.eventdispatcher")
Q_CORE_EXPORT Q_DECL_CONST_FUNCTION unsigned int qt_int_sqrt(unsigned int n)
\inmodule QtCore \title Global Qt Declarations
qsizetype erase(QList< T > &list, const AT &t)
QList(InputIterator, InputIterator) -> QList< ValueType >
qsizetype erase_if(QList< T > &list, Predicate pred)
#define QT_DECLARE_NATIVE_INTERFACE(...)
#define QT_DECLARE_NATIVE_INTERFACE_3(NativeInterface, Revision, BaseType)
QString operator+(const QString &s1, QChar s2)
QString operator+(QString &&lhs, const QString &rhs)
qsizetype erase_if(QString &s, Predicate pred)
#define QT_UNICODE_LITERAL(str)
QString operator+(QString &&lhs, QChar rhs)
QString operator+(QChar s1, const QString &s2)
QString operator+(const QString &s1, const QString &s2)
qsizetype erase(QString &s, const T &t)
QList< QList< qInternalCallback > > callbacks
qsizetype indexOf(const AT &t, qsizetype from=0) const noexcept
const Self * self() const
bool contains(const AT &t) const noexcept
QListSpecialMethodsBase()=default
qsizetype lastIndexOf(const AT &t, qsizetype from=-1) const noexcept
QListSpecialMethods()=default
static constexpr char const * name()
static constexpr bool isCompatibleHelper()
static constexpr bool haveTypeInfo
static constexpr bool isCompatibleWith
static constexpr int revision()
constexpr QAnyStringArg(QAnyStringView v) noexcept
constexpr QLatin1StringArg(QLatin1StringView v) noexcept
QLatin1StringArg()=default
constexpr QStringViewArg(QStringView v) noexcept