1 | // Copyright (C) 2014 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 | |
4 | #ifndef QT3DCORE_QASPECTJOB_H |
5 | #define QT3DCORE_QASPECTJOB_H |
6 | |
7 | #include <Qt3DCore/qt3dcore_global.h> |
8 | #include <QtCore/QSharedPointer> |
9 | |
10 | QT_BEGIN_NAMESPACE |
11 | |
12 | namespace Qt3DCore { |
13 | |
14 | class QAspectJobPrivate; |
15 | class QAspectEngine; |
16 | |
17 | class Q_3DCORESHARED_EXPORT QAspectJob |
18 | { |
19 | public: |
20 | QAspectJob(); |
21 | virtual ~QAspectJob(); |
22 | |
23 | void addDependency(QWeakPointer<QAspectJob> dependency); |
24 | void removeDependency(QWeakPointer<QAspectJob> dependency); |
25 | |
26 | const std::vector<QWeakPointer<QAspectJob>> &dependencies() const; |
27 | |
28 | virtual void run() = 0; |
29 | virtual void postFrame(QAspectEngine *aspectEngine); |
30 | virtual bool isRequired(); |
31 | |
32 | protected: |
33 | explicit QAspectJob(QAspectJobPrivate &dd); |
34 | QAspectJobPrivate *d_ptr; |
35 | |
36 | private: |
37 | Q_DISABLE_COPY(QAspectJob) |
38 | Q_DECLARE_PRIVATE(QAspectJob) |
39 | }; |
40 | |
41 | typedef QSharedPointer<QAspectJob> QAspectJobPtr; |
42 | |
43 | } // namespace Qt3DCore |
44 | |
45 | QT_END_NAMESPACE |
46 | |
47 | #endif // QT3DCORE_QASPECTJOB_H |
48 |