std:: time_get_byname
|
定义于头文件
<locale>
|
||
|
template
<
class
CharT,
|
||
std::time_get_byname
是一个
std::time_get
facet,它封装了在其构造时指定的区域设置的时间与日期解析规则。
目录 |
特化
标准库保证提供满足以下类型要求的每个特化:
-
CharT是 char 和 wchar_t 之一,且 -
InputIt必须满足 LegacyInputIterator 的要求。
嵌套类型
| 类型 | 定义 |
char_type
|
CharT
|
iter_type
|
InputIt
|
成员函数
|
(constructor)
|
构造新的
time_get_byname
facet
(公开成员函数) |
|
(destructor)
|
销毁
time_get_byname
facet
(受保护成员函数) |
std::time_get_byname:: time_get_byname
|
explicit
time_get_byname
(
const
char
*
name,
std::
size_t
refs
=
0
)
;
|
||
|
explicit
time_get_byname
(
const
std::
string
&
name,
std::
size_t
refs
=
0
)
;
|
(since C++11) | |
构造一个具有
name
区域设置的新
std::time_get_byname
facet。
refs 用于资源管理:如果 refs == 0 ,当最后一个持有该 facet 的 std::locale 对象被销毁时,实现将销毁该 facet。否则,该对象不会被销毁。
参数
| name | - | 区域设置的名称 |
| refs | - | 链接到该 facet 的引用数量 |
std::time_get_byname:: ~time_get_byname
|
protected
:
~time_get_byname ( ) ; |
||
销毁该facet。
继承自 std:: time_get
| 类型 | 定义 |
char_type
|
CharT
|
iter_type
|
InputIt
|
数据成员
| 成员 | 描述 |
std::locale::id
id
[静态]
|
facet 的标识符 |
成员函数
调用
do_date_order
(
std::time_get<CharT,InputIt>
的公开成员函数)
|
|
调用
do_get_time
(
std::time_get<CharT,InputIt>
的公开成员函数)
|
|
调用
do_get_date
(
std::time_get<CharT,InputIt>
的公开成员函数)
|
|
调用
do_get_weekday
(
std::time_get<CharT,InputIt>
的公开成员函数)
|
|
调用
do_get_monthname
(
std::time_get<CharT,InputIt>
的公开成员函数)
|
|
调用
do_get_year
(
std::time_get<CharT,InputIt>
的公开成员函数)
|
|
|
(C++11)
|
调用
do_get
(
std::time_get<CharT,InputIt>
的公开成员函数)
|
受保护成员函数
|
[虚函数]
|
获取日、月、年的首选排序顺序
(
std::time_get<CharT,InputIt>
的虚受保护成员函数)
|
|
[虚函数]
|
从输入流提取时、分、秒
(
std::time_get<CharT,InputIt>
的虚受保护成员函数)
|
|
[虚函数]
|
从输入流提取月、日、年
(
std::time_get<CharT,InputIt>
的虚受保护成员函数)
|
|
[虚函数]
|
从输入流提取星期几的名称
(
std::time_get<CharT,InputIt>
的虚受保护成员函数)
|
|
[虚函数]
|
从输入流提取月份名称
(
std::time_get<CharT,InputIt>
的虚受保护成员函数)
|
|
[虚函数]
|
从输入流提取年份
(
std::time_get<CharT,InputIt>
的虚受保护成员函数)
|
|
[虚函数]
(C++11)
|
根据指定格式从输入流提取日期/时间组件
(
std::time_get<CharT,InputIt>
的虚受保护成员函数)
|
示例
|
本节内容不完整
原因:缺少示例 |
参见
|
从输入字符序列解析时间/日期值到
std::tm
(类模板) |
|
|
(C++11)
|
解析指定格式的日期/时间值
(函数模板) |