miqt/qt6/gen_qwaitcondition.cpp

68 lines
1.7 KiB
C++
Raw Normal View History

2024-10-20 18:21:03 +13:00
#include <QDeadlineTimer>
#include <QMutex>
#include <QReadWriteLock>
#include <QWaitCondition>
#include <qwaitcondition.h>
#include "gen_qwaitcondition.h"
#ifdef __cplusplus
extern "C" {
#endif
#ifdef __cplusplus
} /* extern C */
#endif
2024-10-20 18:21:03 +13:00
2024-12-07 17:15:57 +13:00
QWaitCondition* QWaitCondition_new() {
return new QWaitCondition();
2024-10-20 18:21:03 +13:00
}
bool QWaitCondition_Wait(QWaitCondition* self, QMutex* lockedMutex) {
return self->wait(lockedMutex);
}
bool QWaitCondition_Wait2(QWaitCondition* self, QMutex* lockedMutex, unsigned long time) {
return self->wait(lockedMutex, static_cast<unsigned long>(time));
}
bool QWaitCondition_WaitWithLockedReadWriteLock(QWaitCondition* self, QReadWriteLock* lockedReadWriteLock) {
return self->wait(lockedReadWriteLock);
}
bool QWaitCondition_Wait3(QWaitCondition* self, QReadWriteLock* lockedReadWriteLock, unsigned long time) {
return self->wait(lockedReadWriteLock, static_cast<unsigned long>(time));
}
void QWaitCondition_WakeOne(QWaitCondition* self) {
self->wakeOne();
}
void QWaitCondition_WakeAll(QWaitCondition* self) {
self->wakeAll();
}
void QWaitCondition_NotifyOne(QWaitCondition* self) {
self->notify_one();
}
void QWaitCondition_NotifyAll(QWaitCondition* self) {
self->notify_all();
}
bool QWaitCondition_Wait22(QWaitCondition* self, QMutex* lockedMutex, QDeadlineTimer* deadline) {
return self->wait(lockedMutex, *deadline);
}
bool QWaitCondition_Wait23(QWaitCondition* self, QReadWriteLock* lockedReadWriteLock, QDeadlineTimer* deadline) {
return self->wait(lockedReadWriteLock, *deadline);
}
2024-11-19 19:29:06 +13:00
void QWaitCondition_Delete(QWaitCondition* self, bool isSubclass) {
if (isSubclass) {
delete dynamic_cast<QWaitCondition*>( self );
} else {
delete self;
}
2024-10-20 18:21:03 +13:00
}