YSTest: Initialization.h 源文件

YSTest PreAlpha_b900_20201012 The YSLib Test Project

Initialization.h
浏览该文件的文档.
1 /*
2 © 2009-2016, 2019-2020 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 INC_Helper_Initialization_h_
29 #define INC_Helper_Initialization_h_ 1
30
31 #include "YModules.h"
32 #include YFM_YSLib_Core_ValueNode // for string, ValueNode;
33 #include YFM_YSLib_Service_FileSystem // for IO::Path;
34 #include YFM_YSLib_Core_YApplication // for Application;
35 #include YFM_YSLib_Adaptor_Font // for Drawing::FontCache;
36 #include YFM_YSLib_Service_ContentType // for MIMEBiMapping;
37
38 namespace YSLib
39 {
40
41 #if YCL_DS
42
46 extern bool ShowInitializedLog;
47 #endif
48
49
56 YF_API void
57 TraceForOutermost(const std::exception&, RecordLevel) ynothrow;
58
59
61
62
76 YB_ATTR_nodiscard YF_API YB_PURE bool
77 CheckLocalFHSLayout(const string&);
78
84 YB_ATTR_nodiscard YF_API YB_PURE const IO::Path&
85 FetchLocalFHSRootPath();
86
91 YB_ATTR_nodiscard YF_API YB_PURE const string&
92 FetchRootPathString();
93
102 YB_ATTR_nodiscard YF_API YB_PURE IO::Path
103 GetLocalFHSRootPathOf(const string&);
105
106
115 YB_ATTR_nodiscard YF_API YB_NONNULL(1, 2) ValueNode
116 LoadNPLA1File(const char* disp, const char* path, ValueNode(*creator)(),
117 bool show_info = {});
118
124 YF_API void
125 LoadComponents(Application&, const ValueNode&);
126
133 YF_API ValueNode
134 LoadConfiguration(bool = {});
135
141 YF_API void
142 SaveConfiguration(const ValueNode&);
143
144
153 YF_API void
154 InitializeSystemFontCache(Drawing::FontCache&, const string&, const string&);
155
156
162 YF_API ValueNode&
163 FetchRoot() ynothrow;
164
170 YF_API Drawing::FontCache&
171 FetchDefaultFontCache();
172
177 YF_API MIMEBiMapping&
178 FetchMIMEBiMapping();
179
180 } // namespace YSLib;
181
182 #endif
183
YSLib::IO::Path
路径。
Definition: YSLib/Service/FileSystem.h:217
YSLib::FetchMIMEBiMapping
YF_API MIMEBiMapping & FetchMIMEBiMapping()
取 MIME 类型名和文件扩展名双向映射对象。
Definition: Initialization.cpp:836
YB_ATTR_nodiscard
#define YB_ATTR_nodiscard
标记返回值不被忽略的属性。
Definition: ydef.h:715
YSLib::CheckLocalFHSLayout
YB_ATTR_nodiscard YF_API YB_PURE bool CheckLocalFHSLayout(const string &)
判断指定程序映像的路径字符串指示的位置是否符合局部 FHS 目录布局。
YB_PURE
#define YB_PURE
指示函数或函数模板实例为纯函数。
Definition: ydef.h:919
YSLib::FetchDefaultFontCache
YF_API Drawing::FontCache & FetchDefaultFontCache()
取默认字体缓存。
Definition: Initialization.cpp:822
YF_API
#define YF_API
Definition: Platform.h:56
YSLib::GetLocalFHSRootPathOf
YB_ATTR_nodiscard YF_API YB_PURE IO::Path GetLocalFHSRootPathOf(const string &)
取指定程序映像的路径字符串对应的局部 fHS 根路径。
YSLib::Drawing::FontCache
字体缓存。
Definition: Font.h:467
YSLib::show_info
YB_ATTR_nodiscard YF_API const char ValueNode(*) boo show_info)
Definition: Initialization.h:117
YSLib::SaveConfiguration
YF_API void SaveConfiguration(const ValueNode &)
保存默认配置。
Definition: Initialization.cpp:750
YSLib::TraceForOutermost
YF_API void TraceForOutermost(const std::exception &, RecordLevel) ynothrow
处理最外层边界的异常，若捕获致命错误则在之后终止程序。
Definition: Initialization.cpp:619
YSLib::ValueNode
值类型节点。
Definition: ValueNode.h:73
YSLib::MIMEBiMapping
MIME 和文件扩展名双向映射。
Definition: ContentType.h:45
YSLib::FetchRoot
YF_API ValueNode & FetchRoot() ynothrow
取值类型根节点。
Definition: Initialization.cpp:816
YSLib::path
YB_ATTR_nodiscard YF_API const char * path
Definition: Initialization.h:116
YSLib::LoadComponents
YF_API void LoadComponents(Application &, const ValueNode &)
初始化应用程序组件。
Definition: Initialization.cpp:707
YSLib
YSLib 命名空间。
Definition: AndroidHost.h:46
YSLib::FetchLocalFHSRootPath
YB_ATTR_nodiscard YF_API YB_PURE const IO::Path & FetchLocalFHSRootPath()
取根路径字符串对应的局部 FHS 根路径。
Definition: Initialization.cpp:652
YSLib::LoadConfiguration
YF_API ValueNode LoadConfiguration(bool={})
载入默认配置。
Definition: Initialization.cpp:730
YModules.h
YSLib 用户界面模块配置文件。
YSLib::ynothrow
YB_PURE const _type size_t n ynothrow
Definition: YCoreUtilities.h:169
YSLib::RecordLevel
YF_API const char RecordLevel
Definition: YException.h:148
YSLib::YB_NONNULL
YB_ATTR_nodiscard YF_API YB_NONNULL(1, 2) ValueNode LoadNPLA1File(const char *disp
载入 NPLA1 配置文件。
YSLib::InitializeSystemFontCache
YF_API void InitializeSystemFontCache(Drawing::FontCache &, const string &, const string &)
初始化系统字体缓存。
const
const Decapsulate const Decapsulate &y ynothrow ContextNode &ctx const
Definition: NPLA1Forms.cpp:1629
YSLib::LoadNPLA1File
ValueNode LoadNPLA1File(const char *disp, const char *path, ValueNode(*creator)(), bool show_info)
Definition: Initialization.cpp:693
YSLib::FetchRootPathString
YB_ATTR_nodiscard YF_API YB_PURE const string & FetchRootPathString()
取框架根路径字符串。
Definition: Initialization.cpp:669
YSLib::creator
YB_ATTR_nodiscard YF_API const char ValueNode(* creator)()
Definition: Initialization.h:116