Krita Source Code Documentation
Loading...
Searching...
No Matches
KisLibraryResourcePointer< T, P > Struct Template Reference

#include <KoFontLibraryResourceUtils.h>

+ Inheritance diagram for KisLibraryResourcePointer< T, P >:

Public Member Functions

auto data () const
 
 KisLibraryResourcePointer ()
 
 KisLibraryResourcePointer (T *ptr)
 
void reset ()
 
void reset (T *ptr)
 

Static Private Member Functions

static void noDestroy (T *ptr)
 

Detailed Description

template<typename T, void(*)(T *) P>
struct KisLibraryResourcePointer< T, P >

Shared pointer that holds a standard allocated resource. We use a wrapper because by C++ standards it calls the deleter unconditionally. This leads to crashes on FontConfig: https://invent.kde.org/graphics/krita/-/merge_requests/1607#note_567848

Definition at line 46 of file KoFontLibraryResourceUtils.h.

Constructor & Destructor Documentation

◆ KisLibraryResourcePointer() [1/2]

template<typename T , void(*)(T *) P>
KisLibraryResourcePointer< T, P >::KisLibraryResourcePointer ( )
inline

Definition at line 48 of file KoFontLibraryResourceUtils.h.

◆ KisLibraryResourcePointer() [2/2]

template<typename T , void(*)(T *) P>
KisLibraryResourcePointer< T, P >::KisLibraryResourcePointer ( T * ptr)
inline

Definition at line 53 of file KoFontLibraryResourceUtils.h.

Member Function Documentation

◆ data()

template<typename T , void(*)(T *) P>
auto KisLibraryResourcePointer< T, P >::data ( ) const
inline

Definition at line 68 of file KoFontLibraryResourceUtils.h.

69 {
70 return this->get();
71 }
VertexDescriptor get(PredecessorMap const &m, VertexDescriptor v)

References get().

◆ noDestroy()

template<typename T , void(*)(T *) P>
static void KisLibraryResourcePointer< T, P >::noDestroy ( T * ptr)
inlinestaticprivate

Definition at line 74 of file KoFontLibraryResourceUtils.h.

74 {
75 Q_UNUSED(ptr);
76 }

◆ reset() [1/2]

template<typename T , void(*)(T *) P>
void KisLibraryResourcePointer< T, P >::reset ( )
inline

Definition at line 64 of file KoFontLibraryResourceUtils.h.

64 {
66 }

◆ reset() [2/2]

template<typename T , void(*)(T *) P>
void KisLibraryResourcePointer< T, P >::reset ( T * ptr)
inline

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