man std::time_get_byname (Fonctions bibliothèques) -
NAME
std::time_get_byname -
SYNOPSIS
Inherits std::time_get< CharT, InIter >< CharT, InIter >.
Public Types
typedef CharT char_type
Public typedefs.
typedef InIter iter_type
Public typedefs.
typedef basic_string< CharT > string_type
enum dateorder
Public Member Functions
time_get_byname (const char *, size_t __refs=0)
dateorder date_order () const
Return preferred order of month, day, and year.
iter_type get_time (iter_type __beg, iter_type __end, ios_base &__io, ios_base::iostate &__err, tm *__tm) const
Parse input time string.
iter_type get_date (iter_type __beg, iter_type __end, ios_base &__io, ios_base::iostate &__err, tm *__tm) const
Parse input date string.
iter_type get_weekday (iter_type __beg, iter_type __end, ios_base &__io, ios_base::iostate &__err, tm *__tm) const
Parse input weekday string.
iter_type get_monthname (iter_type __beg, iter_type __end, ios_base &__io, ios_base::iostate &__err, tm *__tm) const
Parse input month string.
iter_type get_year (iter_type __beg, iter_type __end, ios_base &__io, ios_base::iostate &__err, tm *__tm) const
Parse input year string.
Static Public Attributes
static locale::id id
Numpunct facet id.
Protected Member Functions
virtual ~time_get_byname ()
virtual dateorder do_date_order () const
Return preferred order of month, day, and year.
virtual iter_type do_get_time (iter_type __beg, iter_type __end, ios_base &__io, ios_base::iostate &__err, tm *__tm) const
Parse input time string.
virtual iter_type do_get_date (iter_type __beg, iter_type __end, ios_base &__io, ios_base::iostate &__err, tm *__tm) const
Parse input date string.
virtual iter_type do_get_weekday (iter_type __beg, iter_type __end, ios_base &, ios_base::iostate &__err, tm *__tm) const
Parse input weekday string.
virtual iter_type do_get_monthname (iter_type __beg, iter_type __end, ios_base &, ios_base::iostate &__err, tm *__tm) const
Parse input month string.
virtual iter_type do_get_year (iter_type __beg, iter_type __end, ios_base &__io, ios_base::iostate &__err, tm *__tm) const
Parse input year string.
iter_type M_extract_num (iter_type __beg, iter_type __end, int &__member, int __min, int __max, size_t __len, ios_base &__io, ios_base::iostate &__err) const
iter_type M_extract_name (iter_type __beg, iter_type __end, int &__member, const CharT **names, size_t indexlen, ios_base &__io, ios_base::iostate &__err) const
iter_type M_extract_via_format (iter_type __beg, iter_type __end, ios_base &__io, ios_base::iostate &__err, tm *__tm, const CharT *__format) const
Static Protected Member Functions
static c_locale S_get_c_locale ()
static const char * S_get_c_name ()
Friends
class locale::Impl
Detailed Description
template<typename CharT, typename InIter> class std::time_get_byname< CharT, InIter >
Definition at line 3290 of file locale_facets.h.
Member Typedef Documentation
template<typename CharT, typename InIter> typedef CharT std::time_get_byname< CharT, InIter >::char_type
Public typedefs.
Reimplemented from std::time_get< CharT, InIter >.
Definition at line 3294 of file locale_facets.h.
template<typename CharT, typename InIter> typedef InIter std::time_get_byname< CharT, InIter >::iter_type
Public typedefs.
Reimplemented from std::time_get< CharT, InIter >.
Definition at line 3295 of file locale_facets.h.
Member Function Documentation
template<typename CharT, typename InIter> dateorder std::time_get< CharT, InIter >::date_order () const [inline, inherited]
Return preferred order of month, day, and year.
This function returns an enum from timebase::dateorder giving the preferred ordering if the format 'x' given to time_put::put() only uses month, day, and year. If the format 'x' for the associated locale uses other fields, this function returns timebase::dateorder::noorder.
NOTE: The library always returns noorder at the moment.
Returns: A member of timebase::dateorder.
Definition at line 3017 of file locale_facets.h.
References std::time_get< CharT, InIter >::do_date_order().
template<typename CharT, typename InIter> time_base::dateorder std::time_get< CharT, InIter >::do_date_order () const [protected, virtual, inherited]
Return preferred order of month, day, and year.
This function returns an enum from timebase::dateorder giving the preferred ordering if the format 'x' given to time_put::put() only uses month, day, and year. This function is a hook for derived classes to change the value returned.
Returns: A member of timebase::dateorder.
Definition at line 1715 of file locale_facets.tcc.
Referenced by std::time_get< CharT, InIter >::date_order().
template<typename CharT, typename InIter> InIter std::time_get< CharT, InIter >::do_get_date (iter_type __beg, iter_type __end, ios_base & __io, ios_base::iostate & __err, tm * __tm) const [protected, virtual, inherited]
Parse input date string.
This function parses a date according to the format 'X' and puts the results into a user-supplied struct tm. This function is a hook for derived classes to change the value returned.
See also: get_date() for details.
Parameters:
beg Start of string to parse.
end End of string to parse.
io Source of the locale.
err Error flags to set.
tm Pointer to struct tm to fill in.
Returns: Iterator to first char beyond date string.
Definition at line 2060 of file locale_facets.tcc.
References std::ios_base::eofbit.
Referenced by std::time_get< CharT, InIter >::get_date().
template<typename CharT, typename InIter> InIter std::time_get< CharT, InIter >::do_get_monthname (iter_type __beg, iter_type __end, ios_base &, ios_base::iostate & __err, tm * __tm) const [protected, virtual, inherited]
Parse input month string.
This function parses a month name and puts the results into a user-supplied struct tm. This function is a hook for derived classes to change the value returned.
See also: get_monthname() for details.
Parameters:
beg Start of string to parse.
end End of string to parse.
io Source of the locale.
err Error flags to set.
tm Pointer to struct tm to fill in.
Returns: Iterator to first char beyond month name.
Definition at line 2122 of file locale_facets.tcc.
References std::ios_base::eofbit, and std::ios_base::failbit.
Referenced by std::time_get< CharT, InIter >::get_monthname().
template<typename CharT, typename InIter> InIter std::time_get< CharT, InIter >::do_get_time (iter_type __beg, iter_type __end, ios_base & __io, ios_base::iostate & __err, tm * __tm) const [protected, virtual, inherited]
Parse input time string.
This function parses a time according to the format 'x' and puts the results into a user-supplied struct tm. This function is a hook for derived classes to change the value returned.
See also: get_time() for details.
Parameters:
beg Start of string to parse.
end End of string to parse.
io Source of the locale.
err Error flags to set.
tm Pointer to struct tm to fill in.
Returns: Iterator to first char beyond time string.
Definition at line 2043 of file locale_facets.tcc.
References std::ios_base::eofbit.
Referenced by std::time_get< CharT, InIter >::get_time().
template<typename CharT, typename InIter> InIter std::time_get< CharT, InIter >::do_get_weekday (iter_type __beg, iter_type __end, ios_base &, ios_base::iostate & __err, tm * __tm) const [protected, virtual, inherited]
Parse input weekday string.
This function parses a weekday name and puts the results into a user-supplied struct tm. This function is a hook for derived classes to change the value returned.
See also: get_weekday() for details.
Parameters:
beg Start of string to parse.
end End of string to parse.
io Source of the locale.
err Error flags to set.
tm Pointer to struct tm to fill in.
Returns: Iterator to first char beyond weekday name.
Definition at line 2077 of file locale_facets.tcc.
References std::ios_base::eofbit, and std::ios_base::failbit.
Referenced by std::time_get< CharT, InIter >::get_weekday().
template<typename CharT, typename InIter> InIter std::time_get< CharT, InIter >::do_get_year (iter_type __beg, iter_type __end, ios_base & __io, ios_base::iostate & __err, tm * __tm) const [protected, virtual, inherited]
Parse input year string.
This function reads up to 4 characters to parse a year string and puts the results into a user-supplied struct tm. This function is a hook for derived classes to change the value returned.
See also: get_year() for details.
Parameters:
beg Start of string to parse.
end End of string to parse.
io Source of the locale.
err Error flags to set.
tm Pointer to struct tm to fill in.
Returns: Iterator to first char beyond year.
Definition at line 2168 of file locale_facets.tcc.
References std::ctype_abstract_base< CharT >::narrow().
Referenced by std::time_get< CharT, InIter >::get_year().
template<typename CharT, typename InIter> iter_type std::time_get< CharT, InIter >::get_date (iter_type __beg, iter_type __end, ios_base & __io, ios_base::iostate & __err, tm * __tm) const [inline, inherited]
Parse input date string.
This function parses a date according to the format 'X' and puts the results into a user-supplied struct tm. The result is returned by calling time_get::do_get_date().
If there is a valid date string according to format 'X', tm will be filled in accordingly and the returned iterator will point to the first character beyond the date string. If an error occurs before the end, err |= ios_base::failbit. If parsing reads all the characters, err |= ios_base::eofbit.
Parameters:
beg Start of string to parse.
end End of string to parse.
io Source of the locale.
err Error flags to set.
tm Pointer to struct tm to fill in.
Returns: Iterator to first char beyond date string.
Definition at line 3066 of file locale_facets.h.
References std::time_get< CharT, InIter >::do_get_date().
template<typename CharT, typename InIter> iter_type std::time_get< CharT, InIter >::get_monthname (iter_type __beg, iter_type __end, ios_base & __io, ios_base::iostate & __err, tm * __tm) const [inline, inherited]
Parse input month string.
This function parses a month name and puts the results into a user-supplied struct tm. The result is returned by calling time_get::do_get_monthname().
Parsing starts by parsing an abbreviated month name. If a valid abbreviation is followed by a character that would lead to the full month name, parsing continues until the full name is found or an error occurs. Otherwise parsing finishes at the end of the abbreviated name.
If an error occurs before the end, err |= ios_base::failbit. If parsing reads all the characters, err |= ios_base::eofbit.
Parameters:
beg Start of string to parse.
end End of string to parse.
io Source of the locale.
err Error flags to set.
tm Pointer to struct tm to fill in.
Returns: Iterator to first char beyond month name.
Definition at line 3123 of file locale_facets.h.
References std::time_get< CharT, InIter >::do_get_monthname().
template<typename CharT, typename InIter> iter_type std::time_get< CharT, InIter >::get_time (iter_type __beg, iter_type __end, ios_base & __io, ios_base::iostate & __err, tm * __tm) const [inline, inherited]
Parse input time string.
This function parses a time according to the format 'x' and puts the results into a user-supplied struct tm. The result is returned by calling time_get::do_get_time().
If there is a valid time string according to format 'x', tm will be filled in accordingly and the returned iterator will point to the first character beyond the time string. If an error occurs before the end, err |= ios_base::failbit. If parsing reads all the characters, err |= ios_base::eofbit.
Parameters:
beg Start of string to parse.
end End of string to parse.
io Source of the locale.
err Error flags to set.
tm Pointer to struct tm to fill in.
Returns: Iterator to first char beyond time string.
Definition at line 3041 of file locale_facets.h.
References std::time_get< CharT, InIter >::do_get_time().
template<typename CharT, typename InIter> iter_type std::time_get< CharT, InIter >::get_weekday (iter_type __beg, iter_type __end, ios_base & __io, ios_base::iostate & __err, tm * __tm) const [inline, inherited]
Parse input weekday string.
This function parses a weekday name and puts the results into a user-supplied struct tm. The result is returned by calling time_get::do_get_weekday().
Parsing starts by parsing an abbreviated weekday name. If a valid abbreviation is followed by a character that would lead to the full weekday name, parsing continues until the full name is found or an error occurs. Otherwise parsing finishes at the end of the abbreviated name.
If an error occurs before the end, err |= ios_base::failbit. If parsing reads all the characters, err |= ios_base::eofbit.
Parameters:
beg Start of string to parse.
end End of string to parse.
io Source of the locale.
err Error flags to set.
tm Pointer to struct tm to fill in.
Returns: Iterator to first char beyond weekday name.
Definition at line 3094 of file locale_facets.h.
References std::time_get< CharT, InIter >::do_get_weekday().
template<typename CharT, typename InIter> iter_type std::time_get< CharT, InIter >::get_year (iter_type __beg, iter_type __end, ios_base & __io, ios_base::iostate & __err, tm * __tm) const [inline, inherited]
Parse input year string.
This function reads up to 4 characters to parse a year string and puts the results into a user-supplied struct tm. The result is returned by calling time_get::do_get_year().
4 consecutive digits are interpreted as a full year. If there are exactly 2 consecutive digits, the library interprets this as the number of years since 1900.
If an error occurs before the end, err |= ios_base::failbit. If parsing reads all the characters, err |= ios_base::eofbit.
Parameters:
beg Start of string to parse.
end End of string to parse.
io Source of the locale.
err Error flags to set.
tm Pointer to struct tm to fill in.
Returns: Iterator to first char beyond year.
Definition at line 3149 of file locale_facets.h.
References std::time_get< CharT, InIter >::do_get_year().
Member Data Documentation
template<typename CharT, typename InIter> locale::id std::time_get< CharT, InIter >::id [static, inherited]
Numpunct facet id.
Definition at line 2990 of file locale_facets.h.
Author
Generated automatically by Doxygen for libstdc++-v3 Source from the source code.