在线文档教程
C++
本土化 | Localizations

std::messages

STD:信息

Defined in header
template< class CharT > class messages;

类模板std::messages是一个标准的locale方面,它封装了从消息目录(如GNU提供的目录)检索字符串。gettext或由POSIX猫...

消息的来源是实现定义的。

二次

二次

继承图

标准库提供了两个独立的%28区域设置无关%29的专门化:

在标头中定义<locale>

*。

STD:信息<char>访问窄字符串消息目录

STD::消息<wchar[医]访问宽字符串消息目录

此外,在C++程序中构造的每个locale对象都实现了自己的%28 locale特定于这些专门化的%29版本。

成员类型

Member typeDefinition
char_typeCharT
string_typestd::basic_string<CharT>

成员函数

(constructor)constructs a new messages facet (public member function)
(destructor)destructs a messages facet (protected member function)
openinvokes do_open (public member function)
getinvokes do_get (public member function)
closeinvokes do_close (public member function)

成员对象

static std::locale::id idid of the locale (public member object)

受保护成员函数

do_open virtualopens a named message catalog (virtual protected member function)
do_get virtualretrieves a message from an open message catalog (virtual protected member function)
do_close virtualcloses a message catalog (virtual protected member function)

从STD::Message继承而来[医]底座

TypeDefinition
catalogint

另见

messages_basedefines messages catalog type (class template)
messages_bynamecreates a messages facet for the named locale (class template)

© cppreference.com

在CreativeCommonsAttribution下授权-ShareAlike未移植许可v3.0。

http://en.cppreference.com/w/cpp/locale/Messages