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
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]

constexpr 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.

References Q_ASSERT.

◆ 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.

References QVariant::QVariant(), customConstructShared(), packedType, and Q_ASSERT.

+ Here is the call graph for this function:

Member Function Documentation

◆ canUseInternalSpace()

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

Definition at line 103 of file qvariant.h.

References Q_ASSERT, and QMetaType::RelocatableType.

Referenced by createVariantData().

+ Here is the caller graph for this function:

◆ get()

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

Definition at line 128 of file qvariant.h.

Referenced by QVariant::isNull(), and QVariant::toBool().

+ Here is the caller graph for this function:

◆ storage()

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

Definition at line 124 of file qvariant.h.

Referenced by QVariant::equals().

+ Here is the caller graph for this function:

◆ type()

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

Definition at line 136 of file qvariant.h.

Referenced by QVariant::compare(), QVariant::convert(), QVariant::convert(), QVariant::equals(), QVariant::isValid(), QVariant::load(), QVariant::metaType(), QVariant::save(), QVariant::toBool(), QVariant::typeName(), and QVariant::view().

+ Here is the caller graph for this function:

◆ typeInterface()

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

Definition at line 131 of file qvariant.h.

Referenced by QVariant::detach().

+ Here is the caller graph for this function:

Member Data Documentation

◆ _forAlignment

double QVariant::Private::_forAlignment

Definition at line 114 of file qvariant.h.

◆ CanUseInternalSpace

template<typename T >
constexpr 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]

◆ [union] [2/2]

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

◆ FitsInInternalSize

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

Definition at line 100 of file qvariant.h.

◆ is_null

quintptr QVariant::Private::is_null

◆ is_shared

quintptr QVariant::Private::is_shared

◆ MaxInternalSize

constexpr 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.

Referenced by Private().

◆ shared

PrivateShared* QVariant::Private::shared

Definition at line 113 of file qvariant.h.


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