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< Indirect > 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< Indirect >:

Public Member Functions

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

Detailed Description

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

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

Since
6.11 \inmodule QtCore

QVariant::ConstPointer<Indirect> wraps a pointed-to value of type Indirect 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 348 of file qvariant.h.

Constructor & Destructor Documentation

◆ ConstPointer() [1/2]

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

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

Definition at line 354 of file qvariant.h.

◆ ConstPointer() [2/2]

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

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

Definition at line 357 of file qvariant.h.

Member Function Documentation

◆ operator*()

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

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

Definition at line 361 of file qvariant.h.


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