1// Copyright (C) 2020 Klaralvdalens Datakonsult AB (KDAB).
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3#ifndef QABSTRACTASPECTJOBMANAGER_P_H
4#define QABSTRACTASPECTJOBMANAGER_P_H
5
6//
7// W A R N I N G
8// -------------
9//
10// This file is not part of the Qt API. It exists for the convenience
11// of other Qt classes. This header file may change from version to
12// version without notice, or even be removed.
13//
14// We mean it.
15//
16
17#include <Qt3DCore/qaspectjob.h>
18#include <QtCore/QObject>
19#include <private/qglobal_p.h>
20
21QT_BEGIN_NAMESPACE
22
23namespace Qt3DCore {
24
25class Q_3DCORESHARED_EXPORT QAbstractAspectJobManager : public QObject
26{
27 Q_OBJECT
28public:
29 explicit QAbstractAspectJobManager(QObject *p = nullptr);
30
31 virtual void initialize() {}
32 virtual void enqueueJobs(const std::vector<QAspectJobPtr> &jobQueue) = 0;
33 virtual int waitForAllJobs() = 0;
34
35 // Callback signature for running SynchronizedJobs
36 typedef void (*JobFunction)(void *);
37 virtual void waitForPerThreadFunction(JobFunction func, void *arg) = 0;
38};
39
40} // namespace Qt3DCore
41
42QT_END_NAMESPACE
43
44#endif // QABSTRACTASPECTJOBMANAGER_P_H
45

source code of qt3d/src/core/jobs/qabstractaspectjobmanager_p.h