Debian Codegraph @

include/dlog_global.h

raw
1 // SPDX-FileCopyrightText: 2024 UnionTech Software Technology Co., Ltd.
2 //
3 // SPDX-License-Identifier: LGPL-2.1-or-later
4
5 #ifndef DLOGGER_GLOBAL_H
6 #define DLOGGER_GLOBAL_H
7
8 #include <QtCore/qglobal.h>
9
10 #define DLOG_NAMESPACE Dtk
11
12 #if !defined(DLOG_NAMESPACE)
13 #define DLOG_BEGIN_NAMESPACE
14 #define DLOG_END_NAMESPACE
15 #define DLOG_USE_NAMESPACE
16 #else
17 #define DLOG_BEGIN_NAMESPACE \
18 namespace DLOG_NAMESPACE \
19 {
20 #define DLOG_END_NAMESPACE }
21 #define DLOG_USE_NAMESPACE using namespace DLOG_NAMESPACE;
22 #endif
23
24 #define DLOGCORE_NAMESPACE Core
25 #define DLOG_CORE_NAMESPACE DLOG_NAMESPACE::DLOGCORE_NAMESPACE
26
27 #if !defined(DLOGCORE_NAMESPACE)
28 #define DLOG_CORE_BEGIN_NAMESPACE
29 #define DLOG_CORE_END_NAMESPACE
30 #define DLOG_CORE_USE_NAMESPACE
31 #else
32 #define DLOG_CORE_BEGIN_NAMESPACE \
33 namespace DLOG_NAMESPACE \
34 { \
35 namespace DLOGCORE_NAMESPACE \
36 {
37 #define DLOG_CORE_END_NAMESPACE \
38 } \
39 }
40 #define DLOG_CORE_USE_NAMESPACE using namespace DLOG_CORE_NAMESPACE;
41 #endif
42
43 #if defined(DLOG_STATIC_LIB)
44 #define LIBDLOG_SHARED_EXPORT
45 #else
46 #if defined(LIBDLOG_LIBRARY)
47 #define LIBDLOG_SHARED_EXPORT Q_DECL_EXPORT
48 #else
49 #define LIBDLOG_SHARED_EXPORT Q_DECL_IMPORT
50 #endif
51 #endif
52
53 #ifdef DLOG_DEPRECATED_CHECK
54 #define DLOG_DECL_DEPRECATED_X(text) Q_DECL_HIDDEN
55 #define DLOG_DECL_DEPRECATED Q_DECL_HIDDEN
56 #else
57 #ifdef __GNUC__
58 #if __GNUC__ < 13
59 #define DLOG_DECL_DEPRECATED __attribute__((__deprecated__))
60 #define DLOG_DECL_DEPRECATED_X(text) __attribute__((__deprecated__(text)))
61 #else
62 #define DLOG_DECL_DEPRECATED Q_DECL_DEPRECATED
63 #define DLOG_DECL_DEPRECATED_X Q_DECL_DEPRECATED_X
64 #endif
65 #else
66 #define DLOG_DECL_DEPRECATED Q_DECL_DEPRECATED
67 #define DLOG_DECL_DEPRECATED_X Q_DECL_DEPRECATED_X
68 #endif
69 #endif
70
71 #endif // DLOGGER_GLOBAL_H