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_GLOBAL_H
5#define QT3DCORE_GLOBAL_H
6
7#include <QtCore/qglobal.h>
8#include <Qt3DCore/qt3dcore-config.h>
9
10QT_BEGIN_NAMESPACE
11
12#if defined(QT_SHARED) || !defined(QT_STATIC)
13# if defined(QT_BUILD_3DCORE_LIB)
14# define Q_3DCORESHARED_EXPORT Q_DECL_EXPORT
15# else
16# define Q_3DCORESHARED_EXPORT Q_DECL_IMPORT
17# endif
18#else
19# define Q_3DCORESHARED_EXPORT
20#endif
21
22#define QT3D_DECLARE_TYPEINFO(NS, Class, Flags) \
23 } /* NS */ \
24 Q_DECLARE_TYPEINFO(NS :: Class, Flags); \
25 namespace NS { \
26 /*end*/
27
28#define QT3D_DECLARE_TYPEINFO_2(OuterNS, InnerNS, Class, Flags) \
29 } /* InnerNS */ \
30 QT3D_DECLARE_TYPEINFO(OuterNS, InnerNS :: Class, Flags) \
31 namespace InnerNS { \
32 /*end*/
33
34#define QT3D_DECLARE_TYPEINFO_3(OuterNS, InnerNS, InnerMostNS, Class, Flags) \
35 } /* InnerMostNS */ \
36 QT3D_DECLARE_TYPEINFO_2(OuterNS, InnerNS, InnerMostNS :: Class, Flags) \
37 namespace InnerMostNS { \
38 /*end*/
39
40#define QT3D_DECLARE_SHARED(NS, Class) \
41 inline void swap(Class &lhs, Class &rhs) \
42 noexcept(noexcept(lhs.swap(rhs))) \
43 { lhs.swap(rhs); } \
44 QT3D_DECLARE_TYPEINFO(NS, Class, Q_RELOCATABLE_TYPE) \
45 /*end*/
46
47#define QT3D_DECLARE_SHARED_2(OuterNS, InnerNS, Class) \
48 inline void swap(Class &lhs, Class &rhs) \
49 noexcept(noexcept(lhs.swap(rhs))) \
50 { lhs.swap(rhs); } \
51 QT3D_DECLARE_TYPEINFO_2(OuterNS, InnerNS, Class, Q_RELOCATABLE_TYPE) \
52 /*end*/
53
54#define QT3D_REVISION(major, minor) Q_REVISION(major, minor)
55#define QT3D_PROPERTY_REVISION(major, minor) REVISION(major, minor)
56
57QT_END_NAMESPACE
58
59#endif // QT3DCORE_GLOBAL_H
60

source code of qt3d/src/core/qt3dcore_global.h