YSTest  PreAlpha_b400_20130424
The YSLib Test Project
 全部  命名空间 文件 函数 变量 类型定义 枚举 枚举值 友元 宏定义  
yadaptor.h
浏览该文件的文档.
1 /*
2  Copyright by FrankHB 2010 - 2013.
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 
33 #ifndef YSL_INC_Adaptor_yadaptor_h_
34 #define YSL_INC_Adaptor_yadaptor_h_ 1
35 
36 //引入平台设置和存储调试设施。
37 #include "ynew.h"
38 
39 // 确保包含标准库必要部分。
40 #include <cmath>
41 #include <algorithm> // for std::min, std::max;
42 
43 //包含 YStandardEx 公用部分。
44 #include <ystdex/functional.hpp>
45 #include <ystdex/utility.hpp>
46 #include <ystdex/string.hpp> // for std::to_string, ystdex::to_string;
47 
48 //包含 YCLib 公用部分。
49 #include "YCLib/ycommon.h"
50 #include "YCLib/Keys.h"
51 #include "YCLib/Timer.h"
52 #include "YCLib/FileSystem.h"
53 #include "YCLib/Video.h"
54 
55 /*
56 !\brief YSLib 命名空间。
57 \since 早于 build 132
58 */
60 
61 //目标平台中立接口。
62 
68 typedef std::uint8_t u8;
69 typedef std::uint16_t u16;
70 typedef std::uint32_t u32;
71 typedef std::uint64_t u64;
72 typedef std::int8_t s8;
73 typedef std::int16_t s16;
74 typedef std::int32_t s32;
75 typedef std::int64_t s64;
76 typedef volatile u8 vu8;
77 typedef volatile u16 vu16;
78 typedef volatile u32 vu32;
79 typedef volatile u64 vu64;
80 typedef volatile s8 vs8;
81 typedef volatile s16 vs16;
82 typedef volatile s32 vs32;
83 typedef volatile s64 vs64;
85 
91 using ystdex::seq_apply;
94 
100 using ystdex::noncopyable;
102 using ystdex::nonmovable;
103 using ystdex::nullptr_t;
105 
113 using ::round;
115 
121 using std::min;
122 using std::max;
123 //}
124 
126 
127 
128 using ystdex::arrlen;
130 using std::to_string;
132 using ystdex::to_string;
134 
135 
136 //非目标平台中立接口。
137 
143 using ystdex::errno_t;
144 using ystdex::ptrdiff_t;
145 using ystdex::size_t;
147 using ystdex::wint_t;
149 
155 
156 
162 
163 using platform::ufopen;
165 using platform::ufexists;
166 using platform::direxists;
172 using platform::uchdir;
174 using platform::truncate;
176 
177 //系统处理函数。
178 using platform::terminate;
179 
180 //基本图形定义。
181 using platform::SPos;
182 using platform::SDst;
183 
184 //文件系统抽象。
191 using platform::path_t;
192 
193 using platform::HFileNode;
196 
197 //文件系统常量。
198 using platform::PATHSTR;
200 
201 //基本输出接口。
202 using platform::InitVideo;
203 
204 //计时器和时钟。
205 using platform::GetTicks;
208 
209 //输入类型。
210 namespace KeyCodes = platform::KeyCodes;
211 using platform::KeyInput;
212 
214 YSL_BEGIN_NAMESPACE(Drawing)
215 
216 using platform::PixelType;
217 using platform::BitmapPtr;
218 using platform::ConstBitmapPtr;
223 using platform::FetchAlpha;
224 using platform::FetchOpaque;
226 using platform::Color;
227 namespace ColorSpace = platform::ColorSpace;
228 
229 YSL_END_NAMESPACE(Drawing)
230 
231 YSL_END
232 
233 #endif
234