YSTest  PreAlpha_b500_20140530
The YSLib Test Project
 全部  命名空间 文件 函数 变量 类型定义 枚举 枚举值 友元 宏定义  
Native Encoding Conversion

本机文本编码转换。 更多...

函数

YF_API std::string platform_ex::Windows::MBCSToMBCS (const char *, std::size_t, int=CP_UTF8, int=CP_ACP)
 转换第一个 int 参数指定编码的字符串为第二个 int 参数指定的编码。 更多...
 
 platform_ex::Windows::RegisterKey (::HKEY h_parent, const wchar_t *key)
 注册表键。 更多...
 
 platform_ex::Windows::~RegisterKey ()
 
 platform_ex::Windows::DefGetter (const ynothrow,::HKEY, Key, h_key)}
 
YF_API std::string platform_ex::Windows::UTF8ToMBCS (const char *, std::size_t, int=CP_ACP)
 
std::string platform_ex::Windows::UTF8ToMBCS (const char *str, int cp=CP_ACP)
 
std::string platform_ex::Windows::UTF8ToMBCS (const std::string &str, int cp=CP_ACP)
 
std::string platform_ex::Windows::WCSToMBCS (const wchar_t *str, std::size_t len, int cp)
 
std::string platform_ex::Windows::WCSToMBCS (const wchar_t *str, int cp=CP_ACP)
 
std::string platform_ex::Windows::WCSToMBCS (const std::wstring &str, int cp=CP_ACP)
 
std::wstring platform_ex::Windows::MBCSToWCS (const char *str, std::size_t len, int cp)
 
std::wstring platform_ex::Windows::MBCSToWCS (const char *str, int cp=CP_ACP)
 
std::wstring platform_ex::Windows::MBCSToWCS (const std::string &str, int cp=CP_ACP)
 
using platform_ex::Windows::Win32Exception::ErrorCode = ::DWORD
 
ErrorCode platform_ex::Windows::Win32Exception::err
 
 platform_ex::Windows::Win32Exception::Message
 
 platform_ex::Windows::Win32Exception::ErrorCode
 
 platform_ex::Windows::Win32Exception::Win32Exception (ErrorCode, const std::string &="Win32 exception", LevelType={}) ynothrow
 
 platform_ex::Windows::Win32Exception::DefGetter (const ynothrow, ErrorCode, ErrorCode, err) DefGetter(const ynothrow
 
 platform_ex::Windows::Win32Exception::FormatMessage (err)) explicit DefCvt(const ynothrow
 
static err std::string platform_ex::Windows::Win32Exception::FormatMessage (ErrorCode) ynothrow
 格式化错误消息字符串。 更多...
 

详细描述

本机文本编码转换。

自从
build 431

类型定义说明

自从
build 435

在文件 include/YCLib/MinGW32.h65 行定义.

函数说明

platform_ex::Windows::Win32Exception::DefGetter ( const ynothrow  ,
ErrorCode  ,
ErrorCode  ,
err   
) const
自从
build 437
platform_ex::Windows::DefGetter ( const ynothrow  ,
::HKEY  ,
Key  ,
h_key   
)
platform_ex::Windows::Win32Exception::FormatMessage ( err  ) const
std::string platform_ex::Windows::Win32Exception::FormatMessage ( ErrorCode  ec)
static

格式化错误消息字符串。

返回
若发生异常则结果为空,否则为区域固定为 en-US 的系统消息字符串。

在文件 MinGW32.cpp57 行定义.

参考 platform_ex::Windows::WCSToMBCS().

函数调用图:

std::string platform_ex::Windows::MBCSToMBCS ( const char *  str,
std::size_t  len,
int  cp_src = CP_UTF8,
int  cp_dst = CP_ACP 
)

转换第一个 int 参数指定编码的字符串为第二个 int 参数指定的编码。

自从
build 476

在文件 MinGW32.cpp98 行定义.

参考 platform_ex::Windows::WCSToMBCS().

函数调用图:

YF_API std::wstring platform_ex::Windows::MBCSToWCS ( const char *  str,
std::size_t  len,
int  cp 
)

在文件 MinGW32.cpp124 行定义.

参考自 platform_ex::Windows::MBCSToWCS().

这是这个函数的调用关系图:

std::wstring platform_ex::Windows::MBCSToWCS ( const char *  str,
int  cp = CP_ACP 
)
inline

在文件 E/include/YCLib/MinGW32.h165 行定义.

参考 platform_ex::Windows::MBCSToWCS() , 以及 ystdex::ntctslen().

函数调用图:

std::wstring platform_ex::Windows::MBCSToWCS ( const std::string &  str,
int  cp = CP_ACP 
)
inline

在文件 E/include/YCLib/MinGW32.h170 行定义.

参考 platform_ex::Windows::MBCSToWCS().

函数调用图:

platform_ex::Windows::RegisterKey ( ::HKEY  h_parent,
const wchar_t *  key 
)
inline

注册表键。

自从
build 435
待办事项:
增加和实现查询值等功能接口。

在文件 include/YCLib/MinGW32.h161 行定义.

参考 YF_Raise_Win32Exception.

YF_API std::string platform_ex::Windows::UTF8ToMBCS ( const char *  ,
std::size_t  ,
int  = CP_ACP 
)

参考自 platform_ex::Windows::UTF8ToMBCS().

这是这个函数的调用关系图:

std::string platform_ex::Windows::UTF8ToMBCS ( const char *  str,
int  cp = CP_ACP 
)
inline

在文件 E/include/YCLib/MinGW32.h139 行定义.

参考 ystdex::ntctslen() , 以及 platform_ex::Windows::UTF8ToMBCS().

函数调用图:

std::string platform_ex::Windows::UTF8ToMBCS ( const std::string &  str,
int  cp = CP_ACP 
)
inline

在文件 E/include/YCLib/MinGW32.h144 行定义.

参考 platform_ex::Windows::UTF8ToMBCS().

函数调用图:

YF_API std::string platform_ex::Windows::WCSToMBCS ( const wchar_t *  str,
std::size_t  len,
int  cp 
)

在文件 MinGW32.cpp113 行定义.

参考自 platform_ex::Windows::Win32Exception::FormatMessage(), platform_ex::Windows::MBCSToMBCS() , 以及 platform_ex::Windows::WCSToMBCS().

这是这个函数的调用关系图:

std::string platform_ex::Windows::WCSToMBCS ( const wchar_t *  str,
int  cp = CP_ACP 
)
inline

在文件 E/include/YCLib/MinGW32.h152 行定义.

参考 ystdex::ntctslen() , 以及 platform_ex::Windows::WCSToMBCS().

函数调用图:

std::string platform_ex::Windows::WCSToMBCS ( const std::wstring &  str,
int  cp = CP_ACP 
)
inline

在文件 E/include/YCLib/MinGW32.h157 行定义.

参考 platform_ex::Windows::WCSToMBCS().

函数调用图:

platform_ex::Windows::Win32Exception::Win32Exception ( ErrorCode  ,
const std::string &  = "Win32 exception",
LevelType  = {} 
)
前置条件
错误码不等于 0 。
警告
初始化参数时可能会改变 ::GetLastError() 的结果。
platform_ex::Windows::~RegisterKey ( )

在文件 include/YCLib/MinGW32.h166 行定义.

变量说明

ErrorCode platform_ex::Windows::Win32Exception::err
private

在文件 include/YCLib/MinGW32.h68 行定义.

platform_ex::Windows::Win32Exception::Message

在文件 include/YCLib/MinGW32.h80 行定义.