xcal
基于 C++23 的现代图形渲染引擎
载入中...
搜索中...
未找到
public.h
浏览该文件的文档.
1#pragma once
2#define XCLOG_FILE_TRACK
3#define XCLOG_LINE_TRACK
4#define XCLOG_FUNCTION_TRACK
5#include <xclogger/logger.hpp>
6#ifdef _WIN32
8XCLOG_ENABLE_ASYNCZMQLOGSUBMITSTREAM("tcp://127.0.0.1:5553")
9#else
12#endif
13
14#define XCAL_FATAL_LEVEL 4
15#define XCAL_ERROR_LEVEL 3
16#define XCAL_WARN_LEVEL 2
17#define XCAL_INFO_LEVEL 1
18#define XCAL_DEBUG_LEVEL 0
19
20#define XCAL_DEBUG(role, label) XLOG(XCAL_DEBUG_LEVEL, role, label)
21#define XCAL_FATAL(role, label) XLOG(XCAL_FATAL_LEVEL, role, label)
22#define XCAL_ERROR(role, label) XLOG(XCAL_ERROR_LEVEL, role, label)
23#define XCAL_WARN(role, label) XLOG(XCAL_WARN_LEVEL, role, label)
24#define XCAL_INFO(role, label) XLOG(XCAL_INFO_LEVEL, role, label)
25
26namespace xcal {
27using float_t = float;
28using bool_t = bool;
29}; // namespace xcal
30
31#ifndef _STD
32# define _STD ::std::
33#endif
34#if defined(XCAL_ENABLE_DYNAMIC_LIBRARY) || \
35 defined(XCAL_CODEC_ENABLE_DYNAMIC_LIBRARY)
36// 定义导出和导入宏
37# ifdef _WIN32
38// Windows平台
39# ifdef __GNUC__
40// 使用GCC编译器
41# define XCAL_EXPORT __attribute__((dllexport))
42# define XCAL_IMPORT __attribute__((dllimport))
43# else
44// 使用MSVC或其他Windows编译器
45# define XCAL_EXPORT __declspec(dllexport)
46# define XCAL_IMPORT __declspec(dllimport)
47# endif
48# else
49// 非Windows平台
50# if __GNUC__ >= 4
51// 使用GCC 4及以上版本
52# define XCAL_EXPORT __attribute__((visibility("default")))
53# define XCAL_IMPORT
54# else
55// 其他编译器
56# define XCAL_EXPORT
57# define XCAL_IMPORT
58# endif
59# endif
60#endif // XCAL_ENABLE_DYNAMIC_LIBRARY
61
62#ifdef XCAL_ENABLE_DYNAMIC_LIBRARY
63# ifdef XCAL_BUILD
64# define XCAL_API XCAL_EXPORT
65# else
66# define XCAL_API XCAL_IMPORT
67# endif
68#else
69# define XCAL_API
70#endif
71#ifdef XCAL_CODEC_ENABLE_DYNAMIC_LIBRARY
72# ifdef XCAL_CODEC_BUILD
73# define XCAL_CODEC_API XCAL_EXPORT
74# else
75# define XCAL_CODEC_API XCAL_IMPORT
76# endif
77#else
78# define XCAL_CODEC_API
79#endif
#define XCLOG_ENABLE_ASYNCZMQLOGSUBMITSTREAM(addr)
bool bool_t
Definition public.h:28
float float_t
Definition public.h:27
XCLOG_ENABLE_ASYNCSTREAMLOGSUBMITSTREAM()