std::time_get_byname
STD:时间[医]弄到[医]名名
Defined in header | | |
---|
template< class CharT, class InputIterator = std::istreambuf_iterator<CharT> > class time_get_byname : public std::time_get<CharT, InputIterator> | | |
std::time_get_byname
是std::time_get
facet,它封装在构造时指定的区域设置的时间和日期解析规则。
标准库提供了两个专门化。
在标头中定义<locale>
*。
STD:时间[医]弄到[医]<char,InputIterator>窄/多字节时间解析
STD:时间[医]弄到[医]名<wchar[医]T,InputIterator>宽字符串时间解析
成员类型
Member type | Definition |
---|
char_type | CharT |
iter_type | OutputIterator |
成员函数
(constructor) | constructs a new time_get_byname facet (public member function) |
---|
(destructor) | destroys a time_get_byname facet (protected member function) |
STD:时间[医]弄到[医]名称::时间[医]弄到[医]名名
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) |
构造一个新的std::time_get_byname
区域设置的方面name
...
refs
用于资源管理:如果refs == 0
时,该实现破坏了面。std::locale
保存它的对象被销毁。否则,该对象不会被销毁。
参数
name | - | the name of the locale |
---|
refs | - | the number of references that link to the facet |
STD:时间[医]弄到[医]名称:~时间[医]弄到[医]名名
protected: ~time_get_byname( | | |
---|
摧毁了这个面。
继承自STD:时间[医]弄到
Member type | Definition |
---|
char_type | CharT |
iter_type | InputIt |
成员对象
Member name | Type |
---|
id (static) | std::locale::id |
成员函数
date_order | invokes do_date_order (public member function of std::time_get) |
---|
get_time | invokes do_get_time (public member function of std::time_get) |
get_date | invokes do_get_date (public member function of std::time_get) |
get_weekday | invokes do_get_weekday (public member function of std::time_get) |
get_monthname | invokes do_get_monthname (public member function of std::time_get) |
get_year | invokes do_get_year (public member function of std::time_get) |
get (C++11) | invokes do_get (public member function of std::time_get) |
受保护成员函数
do_date_order virtual | obtains preferred ordering of day, month, and year (virtual protected member function of std::time_get) |
---|
do_get_time virtual | extracts hours, minutes, and seconds from input stream (virtual protected member function of std::time_get) |
do_get_date virtual | extracts month, day, and year from input stream (virtual protected member function of std::time_get) |
do_get_weekday virtual | extracts the name of a day of the week from input stream (virtual protected member function of std::time_get) |
do_get_monthname virtual | extacts a month name from input stream (virtual protected member function of std::time_get) |
do_get_year virtual | extracts a year from input stream (virtual protected member function of std::time_get) |
do_get virtual | extracts date/time components from input stream, according to the specified format (virtual protected member function of std::time_get) |
从STD::Time继承而来[医]底座
Type | Definition |
---|
dateorder | date order enumeration type, defining the values no_order, dmy, mdy, ymd, and ydm |
例
另见
time_get | parses time/date values from an input character sequence into struct std::tm (class template) |
---|
get_time (C++11) | parses a date/time value of specified format (function template) |
在CreativeCommonsAttribution下授权-ShareAlike未移植许可v3.0。
http://en.cppreference.com/w/cpp/locale/time[医]弄到[医]名名