1// Copyright (C) 2017 The Qt Company Ltd.
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 QT3DRENDER_RENDER_QRENDERPLUGIN_P_H
5#define QT3DRENDER_RENDER_QRENDERPLUGIN_P_H
6
7//
8// W A R N I N G
9// -------------
10//
11// This file is not part of the Qt API. It exists for the convenience
12// of other Qt classes. This header file may change from version to
13// version without notice, or even be removed.
14//
15// We mean it.
16//
17
18#include <private/qt3drender_global_p.h>
19
20#include <Qt3DCore/qbackendnode.h>
21#include <Qt3DRender/qrenderaspect.h>
22
23#include <QtCore/qobject.h>
24#include <QtCore/qstringlist.h>
25
26QT_BEGIN_NAMESPACE
27
28namespace Qt3DRender {
29
30namespace Render {
31
32class AbstractRenderer;
33
34class Q_3DRENDERSHARED_PRIVATE_EXPORT QRenderPlugin
35{
36public:
37 virtual bool registerBackendTypes(QRenderAspect *aspect, AbstractRenderer *renderer) = 0;
38 virtual bool unregisterBackendTypes(QRenderAspect *aspect) = 0;
39
40protected:
41 void registerBackendType(QRenderAspect *aspect, const QMetaObject &obj, const Qt3DCore::QBackendNodeMapperPtr &functor)
42 {
43 aspect->registerBackendType(obj, functor);
44 }
45 void unregisterBackendType(QRenderAspect *aspect, const QMetaObject &obj)
46 {
47 aspect->unregisterBackendType(obj);
48 }
49};
50
51} // namespace Render
52} // namespace Qt3DRender
53
54QT_END_NAMESPACE
55
56#endif // QT3DRENDER_RENDER_QRENDERPLUGIN_P_H
57

source code of qt3d/src/render/frontend/qrenderplugin_p.h