Zrythm v2.0.0-DEV
a highly automated and intuitive digital audio workstation
Loading...
Searching...
No Matches
zrythm::utils::QObjectUniquePtr< T > Class Template Reference

A unique pointer for QObject objects that also works with QObject-based ownership. More...

#include <src/utils/qt.h>

Public Member Functions

 QObjectUniquePtr (T *ptr=nullptr)
 QObjectUniquePtr (QObjectUniquePtr &&other) noexcept
QObjectUniquePtr & operator= (QObjectUniquePtr &&other) noexcept
template<typename U>
requires std::derived_from<U, T>
QObjectUniquePtr & operator= (QObjectUniquePtr< U > &&other) noexcept
void reset (T *ptr=nullptr)
T * release ()
T * get () const
T * operator-> () const
T & operator* () const
 operator bool () const
bool operator== (std::nullptr_t) const
 operator QPointer< T > () const

Detailed Description

template<QObjectDerived T>
class zrythm::utils::QObjectUniquePtr< T >

A unique pointer for QObject objects that also works with QObject-based ownership.

Template Parameters
T

Definition at line 35 of file qt.h.

Constructor & Destructor Documentation

◆ QObjectUniquePtr() [1/2]

template<QObjectDerived T>
zrythm::utils::QObjectUniquePtr< T >::QObjectUniquePtr ( T * ptr = nullptr)
inline

Definition at line 38 of file qt.h.

◆ ~QObjectUniquePtr()

template<QObjectDerived T>
zrythm::utils::QObjectUniquePtr< T >::~QObjectUniquePtr ( )
inline

Definition at line 40 of file qt.h.

◆ QObjectUniquePtr() [2/2]

template<QObjectDerived T>
zrythm::utils::QObjectUniquePtr< T >::QObjectUniquePtr ( QObjectUniquePtr< T > && other)
inlinenoexcept

Definition at line 45 of file qt.h.

Member Function Documentation

◆ get()

template<QObjectDerived T>
T * zrythm::utils::QObjectUniquePtr< T >::get ( ) const
inline

Definition at line 87 of file qt.h.

◆ operator bool()

template<QObjectDerived T>
zrythm::utils::QObjectUniquePtr< T >::operator bool ( ) const
inlineexplicit

Definition at line 90 of file qt.h.

◆ operator QPointer< T >()

template<QObjectDerived T>
zrythm::utils::QObjectUniquePtr< T >::operator QPointer< T > ( ) const
inlineexplicit

Definition at line 95 of file qt.h.

◆ operator*()

template<QObjectDerived T>
T & zrythm::utils::QObjectUniquePtr< T >::operator* ( ) const
inline

Definition at line 89 of file qt.h.

◆ operator->()

template<QObjectDerived T>
T * zrythm::utils::QObjectUniquePtr< T >::operator-> ( ) const
inline

Definition at line 88 of file qt.h.

◆ operator=() [1/2]

template<QObjectDerived T>
QObjectUniquePtr & zrythm::utils::QObjectUniquePtr< T >::operator= ( QObjectUniquePtr< T > && other)
inlinenoexcept

Definition at line 48 of file qt.h.

◆ operator=() [2/2]

template<QObjectDerived T>
template<typename U>
requires std::derived_from<U, T>
QObjectUniquePtr & zrythm::utils::QObjectUniquePtr< T >::operator= ( QObjectUniquePtr< U > && other)
inlinenoexcept

Definition at line 58 of file qt.h.

◆ operator==()

template<QObjectDerived T>
bool zrythm::utils::QObjectUniquePtr< T >::operator== ( std::nullptr_t ) const
inline

Definition at line 92 of file qt.h.

◆ release()

template<QObjectDerived T>
T * zrythm::utils::QObjectUniquePtr< T >::release ( )
inline

Definition at line 80 of file qt.h.

◆ reset()

template<QObjectDerived T>
void zrythm::utils::QObjectUniquePtr< T >::reset ( T * ptr = nullptr)
inline

Definition at line 68 of file qt.h.


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