YSTest  PreAlpha_b500_20140530
The YSLib Test Project
 全部  命名空间 文件 函数 变量 类型定义 枚举 枚举值 友元 宏定义  
ycommon.h
浏览该文件的文档.
1 /*
2  © 2009-2014 FrankHB.
3 
4  This file is part of the YSLib project, and may only be used,
5  modified, and distributed under the terms of the YSLib project
6  license, LICENSE.TXT. By continuing to use, modify, or distribute
7  this file you indicate that you have read the license and
8  understand and accept it fully.
9 */
10 
28 #ifndef YCL_INC_ycommon_h_
29 #define YCL_INC_ycommon_h_ 1
30 
31 //平台定义。
32 #include "YModules.h"
33 #include YFM_YCLib_Platform
34 
35 //平台中立部分。
36 #include <ydef.h>
37 #include <ystdex/cassert.h>
38 #include <ystdex/cstdio.h>
39 #include <cstdlib>
40 #include <string>
41 #include YFM_YBaseMacro
42 
43 //平台相关部分。
44 //#include <unistd.h>
45 
47 namespace platform
48 {
49 
56 
57 
62 namespace Descriptions
63 {
64 
69 enum RecordLevel : std::uint8_t
70 {
71  Emergent = 0x00,
72  Alert = 0x20,
73  Critical = 0x40,
74  Err = 0x60,
75  Warning = 0x80,
76  Notice = 0xA0,
77  Informative = 0xC0,
78  Debug = 0xE0
79 };
80 
81 } // namespace Descriptions;
82 
83 } // namespace platform;
84 
89 namespace platform_ex
90 {
91 
92 #if YCL_DS
93 
101 YF_API bool
102 AllowSleep(bool);
103 
104 #elif YCL_Win32
105 #elif YCL_Android
106 #else
107 # error "Unsupported platform found."
108 #endif
109 
110 } // namespace platform_ex;
111 
112 #endif
113 
ISO C 标准输入/输出扩展。
#define YF_API
Definition: Platform.h:64
系统环境和公用类型和宏的基础定义。
ISO C 断言/调试跟踪扩展。
YB_NORETURN YF_API void terminate() ynothrow
异常终止函数。
Definition: ycommon.cpp:39
std::size_t size ynothrow
RecordLevel
记录等级。
Definition: ycommon.h:69
#define YB_NORETURN
指定无返回值函数。
Definition: ydef.h:311