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

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_bynamestd::time_getfacet,它封装在构造时指定的区域设置的时间和日期解析规则。

标准库提供了两个专门化。

在标头中定义<locale>

*。

STD:时间[医]弄到[医]<char,InputIterator>窄/多字节时间解析

STD:时间[医]弄到[医]名<wchar[医]T,InputIterator>宽字符串时间解析

成员类型

Member typeDefinition
char_typeCharT
iter_typeOutputIterator

成员函数

(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 typeDefinition
char_typeCharT
iter_typeInputIt

成员对象

Member nameType
id (static)std::locale::id

成员函数

date_orderinvokes do_date_order (public member function of std::time_get)
get_timeinvokes do_get_time (public member function of std::time_get)
get_dateinvokes do_get_date (public member function of std::time_get)
get_weekdayinvokes do_get_weekday (public member function of std::time_get)
get_monthnameinvokes do_get_monthname (public member function of std::time_get)
get_yearinvokes 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 virtualobtains preferred ordering of day, month, and year (virtual protected member function of std::time_get)
do_get_time virtualextracts hours, minutes, and seconds from input stream (virtual protected member function of std::time_get)
do_get_date virtualextracts month, day, and year from input stream (virtual protected member function of std::time_get)
do_get_weekday virtualextracts the name of a day of the week from input stream (virtual protected member function of std::time_get)
do_get_monthname virtualextacts a month name from input stream (virtual protected member function of std::time_get)
do_get_year virtualextracts a year from input stream (virtual protected member function of std::time_get)
do_get virtualextracts date/time components from input stream, according to the specified format (virtual protected member function of std::time_get)

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

TypeDefinition
dateorderdate order enumeration type, defining the values no_order, dmy, mdy, ymd, and ydm

另见

time_getparses 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)

© cppreference.com

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

http://en.cppreference.com/w/cpp/locale/time[医]弄到[医]名名