MGL(Win32)
Toggle main menu visibility
総合概要
クラス
クラス一覧
クラス索引
クラス階層
クラスメンバ
全て
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
関数
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
~
変数
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
x
y
z
型定義
列挙型
ファイル
ファイル一覧
ファイルメンバ
全て
関数
変数
マクロ定義
•
全て
クラス
ファイル
関数
変数
型定義
列挙型
列挙値
マクロ定義
ページ
読み取り中…
検索中…
一致する文字列を見つけられません
include
mgl
system
mgl_system_debug_macro.h
[詳解]
1
// SPDX-License-Identifier: Zlib
2
/* ------------------------------------------------------------------------- */
9
/* ------------------------------------------------------------------------- */
10
11
#ifndef INCGUARD_MGL_SYSTEM_DEBUG_MACRO_H_1614221761
12
#define INCGUARD_MGL_SYSTEM_DEBUG_MACRO_H_1614221761
13
14
#include <
mgl/mgl_environment.h
>
15
#include <
mgl/system/mgl_system_module_set.h
>
16
17
#if defined(MGL_DEBUG)
18
20
#define MGL_LOG(logLevel, ...) \
21
do \
22
{ \
23
MGL::System::ModuleSet::GetInstance().GetDebugModule().Log(logLevel, __VA_ARGS__); \
24
} while (0)
25
27
#define MGL_ERROR(...) \
28
do \
29
{ \
30
MGL_LOG(MGL::System::LogLevel::Error, __VA_ARGS__); \
31
} while (0)
32
34
#define MGL_WARNING(...) \
35
do \
36
{ \
37
MGL_LOG(MGL::System::LogLevel::Warning, __VA_ARGS__); \
38
} while (0)
39
41
#define MGL_TRACE(...) \
42
do \
43
{ \
44
MGL_LOG(MGL::System::LogLevel::AppTrace, __VA_ARGS__); \
45
} while (0)
46
48
#define MGL_LIBRARY_TRACE(...) \
49
do \
50
{ \
51
MGL_LOG(MGL::System::LogLevel::LibraryTrace, __VA_ARGS__); \
52
} while (0)
53
55
#define MGL_TRAP() \
56
do \
57
{ \
58
MGL::System::ModuleSet::GetInstance().GetDebugModule().Trap(); \
59
} while (0)
60
62
#define MGL_ABORT() \
63
do \
64
{ \
65
MGL::System::ModuleSet::GetInstance().GetDebugModule().Abort(); \
66
} while (0)
67
69
#define MGL_ASSERT(expr, ...) \
70
do \
71
{ \
72
if (!(expr)) \
73
{ \
74
MGL_ERROR("[ASSERT] %s:%d\n%s", __FILE__, __LINE__, __VA_ARGS__); \
75
MGL_ABORT(); \
76
} \
77
} while (0)
78
79
#else
80
81
#define MGL_LOG(...) ((void)0)
82
#define MGL_ERROR(...) ((void)0)
83
#define MGL_WARNING(...) ((void)0)
84
#define MGL_TRACE(...) ((void)0)
85
#define MGL_LIBRARY_TRACE(...) ((void)0)
86
#define MGL_TRAP(...) ((void)0)
87
#define MGL_ABORT(...) ((void)0)
88
#define MGL_ASSERT(...) ((void)0)
89
90
#endif
91
92
#endif
// INCGUARD_MGL_SYSTEM_DEBUG_MACRO_H_1614221761
93
94
// vim: et ts=4 sw=4 sts=4
mgl_environment.h
MGL 環境定義
mgl_system_module_set.h
MGL システム関連モジュールセット
構築:
1.12.0