Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qnativeinterface.h File Reference

(05fc3aef53348fb58be6308076e000825b704e58)

#include <QtCore/qglobal.h>
+ Include dependency graph for qnativeinterface.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  QNativeInterface::Private::has_type_info< NativeInterface, typename >
 
struct  QNativeInterface::Private::has_type_info< NativeInterface, std::void_t< typename NativeInterface::TypeInfo, typename NativeInterface::TypeInfo::baseType, decltype(&NativeInterface::TypeInfo::name), decltype(&NativeInterface::TypeInfo::revision) > >
 
struct  QNativeInterface::Private::TypeInfo< NativeInterface >
 
struct  QNativeInterface::Private::NativeInterface< I >
 

Namespaces

namespace  QNativeInterface
 
namespace  QNativeInterface::Private
 

Macros

#define QT_DECLARE_NATIVE_INTERFACE_3(NativeInterface, Revision, BaseType)
 
#define QT_DECLARE_NATIVE_INTERFACE_2(NativeInterface, Revision)    static_assert(false, "Must provide a base type when specifying revision");
 
#define QT_DECLARE_NATIVE_INTERFACE_1(NativeInterface)    QT_DECLARE_NATIVE_INTERFACE_3(NativeInterface, 0, void)
 
#define QT_DECLARE_NATIVE_INTERFACE(...)    QT_OVERLOADED_MACRO(QT_DECLARE_NATIVE_INTERFACE, __VA_ARGS__)
 
#define QT_DECLARE_NATIVE_INTERFACE_ACCESSOR(T)
 

Functions

template<typename NativeInterface >
bool constexpr QNativeInterface::Private::hasTypeInfo ()
 

Macro Definition Documentation

◆ QT_DECLARE_NATIVE_INTERFACE

#define QT_DECLARE_NATIVE_INTERFACE ( ...)     QT_OVERLOADED_MACRO(QT_DECLARE_NATIVE_INTERFACE, __VA_ARGS__)

Definition at line 47 of file qnativeinterface.h.

◆ QT_DECLARE_NATIVE_INTERFACE_1

#define QT_DECLARE_NATIVE_INTERFACE_1 ( NativeInterface)     QT_DECLARE_NATIVE_INTERFACE_3(NativeInterface, 0, void)

Definition at line 44 of file qnativeinterface.h.

◆ QT_DECLARE_NATIVE_INTERFACE_2

#define QT_DECLARE_NATIVE_INTERFACE_2 ( NativeInterface,
Revision )    static_assert(false, "Must provide a base type when specifying revision");

Definition at line 41 of file qnativeinterface.h.

◆ QT_DECLARE_NATIVE_INTERFACE_3

#define QT_DECLARE_NATIVE_INTERFACE_3 ( NativeInterface,
Revision,
BaseType )
Value:
protected: \
virtual ~NativeInterface(); \
\
struct TypeInfo { \
using baseType = BaseType; \
static constexpr char const *name = QT_STRINGIFY(NativeInterface); \
static constexpr int revision = Revision; \
}; \
\
template <typename, typename> \
\
template <typename> \
friend bool constexpr QNativeInterface::Private::hasTypeInfo(); \
\
template <typename> \
public: \
NativeInterface() = default; \
Q_DISABLE_COPY_MOVE(NativeInterface)
GLuint name
#define QT_STRINGIFY(x)

Definition at line 16 of file qnativeinterface.h.

◆ QT_DECLARE_NATIVE_INTERFACE_ACCESSOR

#define QT_DECLARE_NATIVE_INTERFACE_ACCESSOR ( T)
Value:
template <typename NativeInterface, typename TypeInfo = QNativeInterface::Private::NativeInterface<NativeInterface>, \
typename BaseType = T, std::enable_if_t<TypeInfo::template isCompatibleWith<T>, bool> = true> \
NativeInterface *nativeInterface() const \
{ \
return static_cast<NativeInterface*>(resolveInterface( \
TypeInfo::name(), TypeInfo::revision())); \
} \
protected: \
void *resolveInterface(const char *name, int revision) const; \
public:

Definition at line 133 of file qnativeinterface.h.