QtCore/qthreadstorage.h Source File
Go to the documentation of this file.
42 #ifndef QTHREADSTORAGE_H
43 #define QTHREADSTORAGE_H
58 explicit QThreadStorageData(
void (*func)(
void *));
59 ~QThreadStorageData();
64 static void finish(
void**);
68 #if !defined(QT_MOC_CPP)
78 return *(
reinterpret_cast<T**
>(
v));
86 return v ? *(
reinterpret_cast<T**
>(
v)) : 0;
97 {
delete static_cast<T *
>(d); }
100 template <
typename T>
105 if (!v) v = d.
set(
new T());
106 return *(
reinterpret_cast<T*
>(*v));
109 template <
typename T>
114 return v ? *(
reinterpret_cast<T*
>(*v)) : T();
117 template <
typename T>
122 template <
typename T>
125 {
delete static_cast<T *
>(d); }
139 static inline void deleteData(
void *
x)
147 {
return d.
get() != 0; }
162 #endif // QT_NO_THREAD
164 #endif // QTHREADSTORAGE_H
T *& qThreadStorage_localData(QThreadStorageData &d, T **)
typedef void(APIENTRYP PFNGLBLENDCOLORPROC)(GLclampf red
#define QT_BEGIN_NAMESPACE
void qThreadStorage_setLocalData(QThreadStorageData &d, T **t)
void qThreadStorage_deleteData(void *d, T **)
T * qThreadStorage_localData_const(const QThreadStorageData &d, T **)
bool hasLocalData() const