libstdc++
std::time_get_byname< _CharT, _InIter > Class Template Reference

#include <locale_facets_nonio.h>

Inheritance diagram for std::time_get_byname< _CharT, _InIter >:
[legend]

Public Types

typedef _CharT char_type
 
enum  dateorder {
  no_order , dmy , mdy , ymd ,
  ydm
}
 
typedef _InIter iter_type
 

Public Member Functions

 time_get_byname (const char *, size_t __refs=0)
 
 time_get_byname (const string &__s, size_t __refs=0)
 
dateorder date_order () const
 
iter_type get (iter_type __s, iter_type __end, ios_base &__io, ios_base::iostate &__err, tm *__tm, char __format, char __modifier=0) const
 
iter_type get (iter_type __s, iter_type __end, ios_base &__io, ios_base::iostate &__err, tm *__tm, const char_type *__fmt, const char_type *__fmtend) const
 
iter_type get_date (iter_type __beg, iter_type __end, ios_base &__io, ios_base::iostate &__err, tm *__tm) const
 
iter_type get_monthname (iter_type __beg, iter_type __end, ios_base &__io, ios_base::iostate &__err, tm *__tm) const
 
iter_type get_time (iter_type __beg, iter_type __end, ios_base &__io, ios_base::iostate &__err, tm *__tm) const
 
iter_type get_weekday (iter_type __beg, iter_type __end, ios_base &__io, ios_base::iostate &__err, tm *__tm) const
 
iter_type get_year (iter_type __beg, iter_type __end, ios_base &__io, ios_base::iostate &__err, tm *__tm) const
 

Static Public Attributes

static locale::id id
 

Protected Member Functions

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_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_via_format (iter_type __beg, iter_type __end, ios_base &__io, ios_base::iostate &__err, tm *__tm, const _CharT *__format) const
 
iter_type _M_extract_wday_or_month (iter_type __beg, iter_type __end, int &__member, const _CharT **__names, size_t __indexlen, ios_base &__io, ios_base::iostate &__err) const
 
virtual dateorder do_date_order () const
 
iter_type do_get (iter_type __s, iter_type __end, ios_base &__f, ios_base::iostate &__err, tm *__tm, char __format, char __modifier) const
 
virtual iter_type do_get_date (iter_type __beg, iter_type __end, ios_base &__io, ios_base::iostate &__err, tm *__tm) const
 
virtual iter_type do_get_monthname (iter_type __beg, iter_type __end, ios_base &, ios_base::iostate &__err, tm *__tm) const
 
virtual iter_type do_get_time (iter_type __beg, iter_type __end, ios_base &__io, ios_base::iostate &__err, tm *__tm) const
 
virtual iter_type do_get_weekday (iter_type __beg, iter_type __end, ios_base &, ios_base::iostate &__err, tm *__tm) const
 
virtual iter_type do_get_year (iter_type __beg, iter_type __end, ios_base &__io, ios_base::iostate &__err, tm *__tm) const
 

Static Protected Member Functions

static __c_locale _S_clone_c_locale (__c_locale &__cloc) throw ()
 
static void _S_create_c_locale (__c_locale &__cloc, const char *__s, __c_locale __old=0)
 
static void _S_destroy_c_locale (__c_locale &__cloc)
 
static __c_locale _S_get_c_locale ()
 
static const char * _S_get_c_name () throw ()
 
static __c_locale _S_lc_ctype_c_locale (__c_locale __cloc, const char *__s)
 

Detailed Description

template<typename _CharT, typename _InIter>
class std::time_get_byname< _CharT, _InIter >

class time_get_byname [22.2.5.2].

Definition at line 760 of file locale_facets_nonio.h.

Member Typedef Documentation

◆ char_type

template<typename _CharT , typename _InIter >
typedef _CharT std::time_get_byname< _CharT, _InIter >::char_type

Definition at line 764 of file locale_facets_nonio.h.

◆ iter_type

template<typename _CharT , typename _InIter >
typedef _InIter std::time_get_byname< _CharT, _InIter >::iter_type

Definition at line 765 of file locale_facets_nonio.h.

Member Enumeration Documentation

◆ dateorder

enum std::time_base::dateorder
inherited

Definition at line 55 of file locale_facets_nonio.h.

Constructor & Destructor Documentation

◆ time_get_byname() [1/2]

template<typename _CharT , typename _InIter >
std::time_get_byname< _CharT, _InIter >::time_get_byname ( const char *  ,
size_t  __refs = 0 
)
inlineexplicit

Definition at line 768 of file locale_facets_nonio.h.

◆ time_get_byname() [2/2]

template<typename _CharT , typename _InIter >
std::time_get_byname< _CharT, _InIter >::time_get_byname ( const string __s,
size_t  __refs = 0 
)
inlineexplicit

Definition at line 773 of file locale_facets_nonio.h.

◆ ~time_get_byname()

template<typename _CharT , typename _InIter >
virtual std::time_get_byname< _CharT, _InIter >::~time_get_byname ( )
inlineprotectedvirtual

Definition at line 779 of file locale_facets_nonio.h.

Member Function Documentation

◆ _M_extract_name()

template<typename _CharT , typename _InIter >
_InIter std::time_get< _CharT, _InIter >::_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
protectedinherited

Definition at line 969 of file locale_facets_nonio.tcc.

◆ _M_extract_num()

template<typename _CharT , typename _InIter >
_InIter std::time_get< _CharT, _InIter >::_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
protectedinherited

Definition at line 926 of file locale_facets_nonio.tcc.

◆ _M_extract_via_format()

template<typename _CharT , typename _InIter >
_InIter std::time_get< _CharT, _InIter >::_M_extract_via_format ( iter_type  __beg,
iter_type  __end,
ios_base __io,
ios_base::iostate __err,
tm *  __tm,
const _CharT *  __format 
) const
protectedinherited

Definition at line 692 of file locale_facets_nonio.tcc.

◆ _M_extract_wday_or_month()

template<typename _CharT , typename _InIter >
_InIter std::time_get< _CharT, _InIter >::_M_extract_wday_or_month ( iter_type  __beg,
iter_type  __end,
int &  __member,
const _CharT **  __names,
size_t  __indexlen,
ios_base __io,
ios_base::iostate __err 
) const
protectedinherited

Definition at line 1045 of file locale_facets_nonio.tcc.

◆ date_order()

template<typename _CharT , typename _InIter >
dateorder std::time_get< _CharT, _InIter >::date_order ( ) const
inlineinherited

Return preferred order of month, day, and year.

This function returns an enum from time_base::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 time_base::dateorder::noorder.

NOTE: The library always returns noorder at the moment.

Returns
A member of time_base::dateorder.

Definition at line 406 of file locale_facets_nonio.h.

References std::time_get< _CharT, _InIter >::do_date_order().

◆ do_date_order()

template<typename _CharT , typename _InIter >
_GLIBCXX_END_NAMESPACE_LDBL_OR_CXX11 time_base::dateorder std::time_get< _CharT, _InIter >::do_date_order
protectedvirtualinherited

Return preferred order of month, day, and year.

This function returns an enum from time_base::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 time_base::dateorder.

Definition at line 685 of file locale_facets_nonio.tcc.

Referenced by std::time_get< _CharT, _InIter >::date_order().

◆ do_get()

template<typename _CharT , typename _InIter >
_InIter std::time_get< _CharT, _InIter >::do_get ( iter_type  __s,
iter_type  __end,
ios_base __f,
ios_base::iostate __err,
tm *  __tm,
char  __format,
char  __modifier 
) const
inlineprotectedinherited

Parse input string according to format.

This function parses the string according to the provided format and optional modifier. This function is a hook for derived classes to change the value returned.

See also
get() for more details.
Parameters
__sStart of string to parse.
__endEnd of string to parse.
__fSource of the locale.
__errError flags to set.
__tmPointer to struct tm to fill in.
__formatFormat specifier.
__modifierFormat modifier.
Returns
Iterator to first char not parsed.

Definition at line 1298 of file locale_facets_nonio.tcc.

References std::ios_base::_M_getloc(), std::ios_base::eofbit, std::ios_base::goodbit, and std::__ctype_abstract_base< _CharT >::widen().

Referenced by std::time_get< _CharT, _InIter >::get().

◆ do_get_date()

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
protectedvirtualinherited

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
__begStart of string to parse.
__endEnd of string to parse.
__ioSource of the locale.
__errError flags to set.
__tmPointer to struct tm to fill in.
Returns
Iterator to first char beyond date string.

Definition at line 1134 of file locale_facets_nonio.tcc.

References std::ios_base::_M_getloc(), and std::ios_base::eofbit.

Referenced by std::time_get< _CharT, _InIter >::get_date().

◆ do_get_monthname()

template<typename _CharT , typename _InIter >
_InIter std::time_get< _CharT, _InIter >::do_get_monthname ( iter_type  __beg,
iter_type  __end,
ios_base __io,
ios_base::iostate __err,
tm *  __tm 
) const
protectedvirtualinherited

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
__begStart of string to parse.
__endEnd of string to parse.
__ioSource of the locale.
__errError flags to set.
__tmPointer to struct tm to fill in.
Returns
Iterator to first char beyond month name.

Definition at line 1177 of file locale_facets_nonio.tcc.

References std::ios_base::_M_getloc(), std::ios_base::eofbit, std::ios_base::failbit, and std::ios_base::goodbit.

Referenced by std::time_get< _CharT, _InIter >::get_monthname().

◆ do_get_time()

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
protectedvirtualinherited

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
__begStart of string to parse.
__endEnd of string to parse.
__ioSource of the locale.
__errError flags to set.
__tmPointer to struct tm to fill in.
Returns
Iterator to first char beyond time string.

Definition at line 1117 of file locale_facets_nonio.tcc.

References std::ios_base::_M_getloc(), and std::ios_base::eofbit.

Referenced by std::time_get< _CharT, _InIter >::get_time().

◆ do_get_weekday()

template<typename _CharT , typename _InIter >
_InIter std::time_get< _CharT, _InIter >::do_get_weekday ( iter_type  __beg,
iter_type  __end,
ios_base __io,
ios_base::iostate __err,
tm *  __tm 
) const
protectedvirtualinherited

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
__begStart of string to parse.
__endEnd of string to parse.
__ioSource of the locale.
__errError flags to set.
__tmPointer to struct tm to fill in.
Returns
Iterator to first char beyond weekday name.

Definition at line 1151 of file locale_facets_nonio.tcc.

References std::ios_base::_M_getloc(), std::ios_base::eofbit, std::ios_base::failbit, and std::ios_base::goodbit.

Referenced by std::time_get< _CharT, _InIter >::get_weekday().

◆ do_get_year()

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
protectedvirtualinherited

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
__begStart of string to parse.
__endEnd of string to parse.
__ioSource of the locale.
__errError flags to set.
__tmPointer to struct tm to fill in.
Returns
Iterator to first char beyond year.

Definition at line 1203 of file locale_facets_nonio.tcc.

References std::ios_base::eofbit, std::ios_base::failbit, and std::ios_base::goodbit.

Referenced by std::time_get< _CharT, _InIter >::get_year().

◆ get() [1/2]

template<typename _CharT , typename _InIter >
iter_type std::time_get< _CharT, _InIter >::get ( iter_type  __s,
iter_type  __end,
ios_base __io,
ios_base::iostate __err,
tm *  __tm,
char  __format,
char  __modifier = 0 
) const
inlineinherited

Parse input string according to format.

This function calls time_get::do_get with the provided parameters.

See also
do_get() and get().
Parameters
__sStart of string to parse.
__endEnd of string to parse.
__ioSource of the locale.
__errError flags to set.
__tmPointer to struct tm to fill in.
__formatFormat specifier.
__modifierFormat modifier.
Returns
Iterator to first char not parsed.

Definition at line 559 of file locale_facets_nonio.h.

References std::time_get< _CharT, _InIter >::do_get().

◆ get() [2/2]

template<typename _CharT , typename _InIter >
_InIter std::time_get< _CharT, _InIter >::get ( iter_type  __s,
iter_type  __end,
ios_base __io,
ios_base::iostate __err,
tm *  __tm,
const char_type __fmt,
const char_type __fmtend 
) const
inlineinherited

Parse input string according to format.

This function parses the input string according to a provided format string. It does the inverse of time_put::put. The format string follows the format specified for strftime(3)/strptime(3). The actual parsing is done by time_get::do_get.

Parameters
__sStart of string to parse.
__endEnd of string to parse.
__ioSource of the locale.
__errError flags to set.
__tmPointer to struct tm to fill in.
__fmtStart of the format string.
__fmtendEnd of the format string.
Returns
Iterator to first char not parsed.

Definition at line 1226 of file locale_facets_nonio.tcc.

References std::ios_base::_M_getloc(), std::ios_base::eofbit, std::ios_base::failbit, std::ios_base::goodbit, std::__ctype_abstract_base< _CharT >::is(), std::__ctype_abstract_base< _CharT >::narrow(), std::__ctype_abstract_base< _CharT >::tolower(), and std::__ctype_abstract_base< _CharT >::toupper().

◆ get_date()

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
inlineinherited

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
__begStart of string to parse.
__endEnd of string to parse.
__ioSource of the locale.
__errError flags to set.
__tmPointer to struct tm to fill in.
Returns
Iterator to first char beyond date string.

Definition at line 455 of file locale_facets_nonio.h.

References std::time_get< _CharT, _InIter >::do_get_date().

◆ get_monthname()

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
inlineinherited

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
__begStart of string to parse.
__endEnd of string to parse.
__ioSource of the locale.
__errError flags to set.
__tmPointer to struct tm to fill in.
Returns
Iterator to first char beyond month name.

Definition at line 512 of file locale_facets_nonio.h.

References std::time_get< _CharT, _InIter >::do_get_monthname().

◆ get_time()

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
inlineinherited

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
__begStart of string to parse.
__endEnd of string to parse.
__ioSource of the locale.
__errError flags to set.
__tmPointer to struct tm to fill in.
Returns
Iterator to first char beyond time string.

Definition at line 430 of file locale_facets_nonio.h.

References std::time_get< _CharT, _InIter >::do_get_time().

◆ get_weekday()

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
inlineinherited

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
__begStart of string to parse.
__endEnd of string to parse.
__ioSource of the locale.
__errError flags to set.
__tmPointer to struct tm to fill in.
Returns
Iterator to first char beyond weekday name.

Definition at line 483 of file locale_facets_nonio.h.

References std::time_get< _CharT, _InIter >::do_get_weekday().

◆ get_year()

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
inlineinherited

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
__begStart of string to parse.
__endEnd of string to parse.
__ioSource of the locale.
__errError flags to set.
__tmPointer to struct tm to fill in.
Returns
Iterator to first char beyond year.

Definition at line 538 of file locale_facets_nonio.h.

References std::time_get< _CharT, _InIter >::do_get_year().

Member Data Documentation

◆ id

template<typename _CharT , typename _InIter >
locale::id std::time_get< _CharT, _InIter >::id
staticinherited

Numpunct facet id.

Definition at line 379 of file locale_facets_nonio.h.


The documentation for this class was generated from the following file: