Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
QVariant::Private Struct Reference

#include <qvariant.h>

+ Collaboration diagram for QVariant::Private:

Public Member Functions

constexpr Private () noexcept
 
 Private (const QtPrivate::QMetaTypeInterface *iface) noexcept
 
template<typename T >
 Private (std::piecewise_construct_t, const T &t)
 
const voidstorage () const
 
template<typename T >
const T & get () const
 
const QtPrivate::QMetaTypeInterfacetypeInterface () const
 
QMetaType type () const
 

Static Public Member Functions

static constexpr bool canUseInternalSpace (const QtPrivate::QMetaTypeInterface *type)
 

Public Attributes

union { 
 
   uchar   data [MaxInternalSize] = {} 
 
   PrivateShared *   shared 
 
   double   _forAlignment 
 
data 
 
quintptr is_shared: 1
 
quintptr is_null: 1
 
quintptr packedType: sizeof(QMetaType) * 8 - 2
 

Static Public Attributes

static constexpr size_t MaxInternalSize = 3 * sizeof(void *)
 
template<size_t S>
static constexpr bool FitsInInternalSize = S <= MaxInternalSize
 
template<typename T >
static constexpr bool CanUseInternalSpace
 

Detailed Description

Definition at line 97 of file qvariant.h.

Constructor & Destructor Documentation

◆ Private() [1/3]

QVariant::Private::Private ( )
inlineconstexprnoexcept

Definition at line 120 of file qvariant.h.

◆ Private() [2/3]

QVariant::Private::Private ( const QtPrivate::QMetaTypeInterface * iface)
inlineexplicitnoexcept

Definition at line 76 of file qvariant_p.h.

◆ Private() [3/3]

template<typename T >
QVariant::Private::Private ( std::piecewise_construct_t ,
const T & t )
inlineexplicit

Definition at line 83 of file qvariant_p.h.

Member Function Documentation

◆ canUseInternalSpace()

static constexpr bool QVariant::Private::canUseInternalSpace ( const QtPrivate::QMetaTypeInterface * type)
inlinestaticconstexpr

Definition at line 103 of file qvariant.h.

◆ get()

template<typename T >
const T & QVariant::Private::get ( ) const
inline

Definition at line 128 of file qvariant.h.

◆ storage()

const void * QVariant::Private::storage ( ) const
inline

Definition at line 124 of file qvariant.h.

◆ type()

QMetaType QVariant::Private::type ( ) const
inline

Definition at line 136 of file qvariant.h.

◆ typeInterface()

const QtPrivate::QMetaTypeInterface * QVariant::Private::typeInterface ( ) const
inline

Definition at line 131 of file qvariant.h.

Member Data Documentation

◆ _forAlignment

double QVariant::Private::_forAlignment

Definition at line 114 of file qvariant.h.

◆ CanUseInternalSpace

template<typename T >
bool QVariant::Private::CanUseInternalSpace
staticconstexpr
Initial value:
=
(QTypeInfo<T>::isRelocatable && FitsInInternalSize<sizeof(T)> && alignof(T) <= alignof(double))
static constexpr bool FitsInInternalSize
Definition qvariant.h:100

Definition at line 101 of file qvariant.h.

◆ data [1/2]

uchar QVariant::Private::data[MaxInternalSize] = {}

Definition at line 112 of file qvariant.h.

◆ [union] [2/2]

union { ... } QVariant::Private::data

◆ FitsInInternalSize

template<size_t S>
bool QVariant::Private::FitsInInternalSize = S <= MaxInternalSize
staticconstexpr

Definition at line 100 of file qvariant.h.

◆ is_null

quintptr QVariant::Private::is_null

Definition at line 117 of file qvariant.h.

◆ is_shared

quintptr QVariant::Private::is_shared

Definition at line 116 of file qvariant.h.

◆ MaxInternalSize

size_t QVariant::Private::MaxInternalSize = 3 * sizeof(void *)
staticconstexpr

Definition at line 99 of file qvariant.h.

◆ packedType

quintptr QVariant::Private::packedType

Definition at line 118 of file qvariant.h.

◆ shared

PrivateShared* QVariant::Private::shared

Definition at line 113 of file qvariant.h.


The documentation for this struct was generated from the following files: