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::ConstPointer< Pointed > Class Template Reference

QVariant::ConstPointer is a template class that emulates a const pointer to QVariant. More...

#include <qvariant.h>

Collaboration diagram for QVariant::ConstPointer< Pointed >:

Public Member Functions

 ConstPointer (const Pointed &pointed) noexcept(std::is_nothrow_copy_constructible_v< Pointed >)
 Constructs a QVariant::ConstPointer from the value pointed to.
 ConstPointer (Pointed &&pointed) noexcept(std::is_nothrow_move_constructible_v< Pointed >)
 Constructs a QVariant::ConstPointer from the value pointed to.
ConstReference< Pointed > operator* () const noexcept(std::is_nothrow_copy_constructible_v< Pointed >)
 Dereferences the QVariant::ConstPointer to a QVariant::ConstReference.

Detailed Description

template<typename Pointed>
class QVariant::ConstPointer< Pointed >

QVariant::ConstPointer is a template class that emulates a const pointer to QVariant.

Since
6.11 \inmodule QtCore

QVariant::ConstPointer wraps pointed-to value and returns a QVariant::ConstReference to it from its operator*(). This makes it suitable as replacement for an actual pointer. We cannot return an actual pointer from generic iterators as the iterators don't hold an actual QVariant.

Definition at line 320 of file qvariant.h.

Constructor & Destructor Documentation

◆ ConstPointer() [1/2]

template<typename Pointed>
QVariant::ConstPointer< Pointed >::ConstPointer ( const Pointed & pointed)
inlineexplicitnoexcept

Constructs a QVariant::ConstPointer from the value pointed to.

Definition at line 326 of file qvariant.h.

◆ ConstPointer() [2/2]

template<typename Pointed>
QVariant::ConstPointer< Pointed >::ConstPointer ( Pointed && pointed)
inlineexplicitnoexcept

Constructs a QVariant::ConstPointer from the value pointed to.

Definition at line 329 of file qvariant.h.

Member Function Documentation

◆ operator*()

template<typename Pointed>
ConstReference< Pointed > QVariant::ConstPointer< Pointed >::operator* ( ) const
inlinenoexcept

Dereferences the QVariant::ConstPointer to a QVariant::ConstReference.

Definition at line 333 of file qvariant.h.


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