ReactOS  0.4.13-dev-482-ge57f103
time_get< _Ch, _InIt > Class Template Reference

#include <_facets_fwd.h>

Inheritance diagram for time_get< _Ch, _InIt >:
Collaboration diagram for time_get< _Ch, _InIt >:

Public Types

typedef _Ch char_type
 
typedef _InIt iter_type
 
- Public Types inherited from time_base
enum  dateorder {
  no_order, dmy, mdy, ymd,
  ydm
}
 

Public Member Functions

 time_get (size_t __refs=0)
 
dateorder date_order () const
 
iter_type get_time (iter_type __s, iter_type __end, ios_base &__str, ios_base::iostate &__err, tm *__t) const
 
iter_type get_date (iter_type __s, iter_type __end, ios_base &__str, ios_base::iostate &__err, tm *__t) const
 
iter_type get_weekday (iter_type __s, iter_type __end, ios_base &__str, ios_base::iostate &__err, tm *__t) const
 
iter_type get_monthname (iter_type __s, iter_type __end, ios_base &__str, ios_base::iostate &__err, tm *__t) const
 
iter_type get_year (iter_type __s, iter_type __end, ios_base &__str, ios_base::iostate &__err, tm *__t) const
 

Static Public Attributes

static locale::id id
 

Protected Member Functions

 time_get (const char *__name, size_t __refs)
 
 time_get (_Locale_time *__time)
 
 ~time_get ()
 
virtual dateorder do_date_order () const
 
virtual iter_type do_get_time (iter_type __s, iter_type __end, ios_base &, ios_base::iostate &__err, tm *__t) const
 
virtual iter_type do_get_date (iter_type __s, iter_type __end, ios_base &, ios_base::iostate &__err, tm *__t) const
 
virtual iter_type do_get_weekday (iter_type __s, iter_type __end, ios_base &, ios_base::iostate &__err, tm *__t) const
 
virtual iter_type do_get_monthname (iter_type __s, iter_type __end, ios_base &, ios_base::iostate &__err, tm *__t) const
 
virtual iter_type do_get_year (iter_type __s, iter_type __end, ios_base &, ios_base::iostate &__err, tm *__t) const
 
- Protected Member Functions inherited from locale::facet
 facet (size_t __init_count=0)
 
virtual ~facet ()
 
- Protected Member Functions inherited from _Refcount_Base
 _Refcount_Base (__stl_atomic_t __n)
 
__stl_atomic_t _M_incr ()
 
__stl_atomic_t _M_decr ()
 

Detailed Description

template<class _Ch, class _InIt>
class time_get< _Ch, _InIt >

Definition at line 42 of file _facets_fwd.h.

Member Typedef Documentation

◆ char_type

template<class _Ch, class _InIt>
typedef _Ch time_get< _Ch, _InIt >::char_type

Definition at line 133 of file _time_facets.h.

◆ iter_type

template<class _Ch, class _InIt>
typedef _InIt time_get< _Ch, _InIt >::iter_type

Definition at line 134 of file _time_facets.h.

Constructor & Destructor Documentation

◆ time_get() [1/3]

template<class _Ch, class _InIt>
time_get< _Ch, _InIt >::time_get ( size_t  __refs = 0)
inlineexplicit

Definition at line 136 of file _time_facets.h.

136  : locale::facet(__refs)
137  {}

◆ time_get() [2/3]

template<class _Ch, class _InIt>
time_get< _Ch, _InIt >::time_get ( const char __name,
size_t  __refs 
)
inlineprotected

Definition at line 159 of file _time_facets.h.

160  : locale::facet(__refs), _STLP_PRIV time_init<_Ch>(__name)
161  {}
#define _STLP_PRIV
Definition: _dm.h:70

◆ time_get() [3/3]

template<class _Ch, class _InIt>
time_get< _Ch, _InIt >::time_get ( _Locale_time __time)
inlineprotected

Definition at line 162 of file _time_facets.h.

163  : _STLP_PRIV time_init<_Ch>(__time)
164  {}
#define _STLP_PRIV
Definition: _dm.h:70

◆ ~time_get()

template<class _Ch, class _InIt>
time_get< _Ch, _InIt >::~time_get ( )
inlineprotected

Definition at line 166 of file _time_facets.h.

166 {}

Member Function Documentation

◆ date_order()

template<class _Ch, class _InIt>
dateorder time_get< _Ch, _InIt >::date_order ( ) const
inline

Definition at line 139 of file _time_facets.h.

139 { return do_date_order(); }
virtual dateorder do_date_order() const
Definition: _time_facets.h:168

◆ do_date_order()

template<class _Ch, class _InIt>
virtual dateorder time_get< _Ch, _InIt >::do_date_order ( ) const
inlineprotectedvirtual

Reimplemented in time_get_byname< _Ch, _InIt >.

Definition at line 168 of file _time_facets.h.

168 { return this->_M_dateorder; }

Referenced by time_get< _Ch, _InIt >::date_order().

◆ do_get_date()

template<class _Ch , class _InIt >
_STLP_MOVE_TO_STD_NAMESPACE _InIt time_get< _Ch, _InIt >::do_get_date ( iter_type  __s,
iter_type  __end,
ios_base __str,
ios_base::iostate __err,
tm __t 
) const
protectedvirtual

Definition at line 305 of file _time_facets.c.

307  {
308  typedef string::const_iterator string_iterator;
309 
310  string_iterator __format = this->_M_timeinfo._M_date_format.begin();
311  string_iterator __format_end = this->_M_timeinfo._M_date_format.end();
312 
313  string_iterator __result
314  = _STLP_PRIV __get_formatted_time(__s, __end, __format, __format_end,
315  __STATIC_CAST(_Ch*, 0), this->_M_timeinfo,
316  __str, __err, __t);
317  if (__result == __format_end)
318  __err = ios_base::goodbit;
319  else {
320  __err = ios_base::failbit;
321  if (__s == __end)
322  __err |= ios_base::eofbit;
323  }
324  return __s;
325 }
_Check_return_ wchar_t _Ch
Definition: string.h:647
#define __STATIC_CAST(__x, __y)
Definition: features.h:585
#define _STLP_PRIV
Definition: _dm.h:70

Referenced by time_get< _Ch, _InIt >::get_date().

◆ do_get_monthname()

template<class _Ch , class _InIt >
_InIt time_get< _Ch, _InIt >::do_get_monthname ( iter_type  __s,
iter_type  __end,
ios_base __str,
ios_base::iostate __err,
tm __t 
) const
protectedvirtual

Definition at line 385 of file _time_facets.c.

387  {
388  bool __result =
389  _STLP_PRIV __get_short_or_long_monthname(__s, __end, this->_M_timeinfo, __t);
390  if (__result)
391  __err = ios_base::goodbit;
392  else {
393  __err = ios_base::failbit;
394  if (__s == __end)
395  __err |= ios_base::eofbit;
396  }
397  return __s;
398 }
bool _STLP_CALL __get_short_or_long_monthname(_InIt &__first, _InIt &__last, const _TimeInfo &__table, tm *__t)
Definition: _time_facets.c:292
#define _STLP_PRIV
Definition: _dm.h:70

Referenced by time_get< _Ch, _InIt >::get_monthname().

◆ do_get_time()

template<class _Ch , class _InIt >
_InIt time_get< _Ch, _InIt >::do_get_time ( iter_type  __s,
iter_type  __end,
ios_base __str,
ios_base::iostate __err,
tm __t 
) const
protectedvirtual

Definition at line 329 of file _time_facets.c.

331  {
332  typedef string::const_iterator string_iterator;
333  string_iterator __format = this->_M_timeinfo._M_time_format.begin();
334  string_iterator __format_end = this->_M_timeinfo._M_time_format.end();
335 
336  string_iterator __result
337  = _STLP_PRIV __get_formatted_time(__s, __end, __format, __format_end,
338  __STATIC_CAST(_Ch*, 0), this->_M_timeinfo,
339  __str, __err, __t);
340  __err = __result == __format_end ? ios_base::goodbit
341  : ios_base::failbit;
342  if (__s == __end)
343  __err |= ios_base::eofbit;
344  return __s;
345 }
_Check_return_ wchar_t _Ch
Definition: string.h:647
#define __STATIC_CAST(__x, __y)
Definition: features.h:585
#define _STLP_PRIV
Definition: _dm.h:70

Referenced by time_get< _Ch, _InIt >::get_time().

◆ do_get_weekday()

template<class _Ch , class _InIt >
_InIt time_get< _Ch, _InIt >::do_get_weekday ( iter_type  __s,
iter_type  __end,
ios_base __str,
ios_base::iostate __err,
tm __t 
) const
protectedvirtual

Definition at line 368 of file _time_facets.c.

370  {
371  bool __result =
372  _STLP_PRIV __get_short_or_long_dayname(__s, __end, this->_M_timeinfo, __t);
373  if (__result)
374  __err = ios_base::goodbit;
375  else {
376  __err = ios_base::failbit;
377  if (__s == __end)
378  __err |= ios_base::eofbit;
379  }
380  return __s;
381 }
bool _STLP_CALL __get_short_or_long_dayname(_InIt &__first, _InIt &__last, const _TimeInfo &__table, tm *__t)
Definition: _time_facets.c:281
#define _STLP_PRIV
Definition: _dm.h:70

Referenced by time_get< _Ch, _InIt >::get_weekday().

◆ do_get_year()

template<class _Ch , class _InIt >
_InIt time_get< _Ch, _InIt >::do_get_year ( iter_type  __s,
iter_type  __end,
ios_base ,
ios_base::iostate __err,
tm __t 
) const
protectedvirtual

Definition at line 349 of file _time_facets.c.

351  {
352  if (__s == __end) {
353  __err = ios_base::failbit | ios_base::eofbit;
354  return __s;
355  }
356 
357  bool __pr = _STLP_PRIV __get_decimal_integer(__s, __end, __t->tm_year, __STATIC_CAST(_Ch*, 0));
358  __t->tm_year -= 1900;
359  __err = __pr ? ios_base::goodbit : ios_base::failbit;
360  if (__s == __end)
361  __err |= ios_base::eofbit;
362 
363  return __s;
364 }
_Check_return_ wchar_t _Ch
Definition: string.h:647
#define __STATIC_CAST(__x, __y)
Definition: features.h:585
int tm_year
Definition: time.h:82
bool _STLP_CALL __get_decimal_integer(_InputIter &__first, _InputIter &__last, _Integer &__val, _CharT *)
Definition: _num_get.c:239
#define _STLP_PRIV
Definition: _dm.h:70

Referenced by time_get< _Ch, _InIt >::get_year().

◆ get_date()

template<class _Ch, class _InIt>
iter_type time_get< _Ch, _InIt >::get_date ( iter_type  __s,
iter_type  __end,
ios_base __str,
ios_base::iostate __err,
tm __t 
) const
inline

Definition at line 143 of file _time_facets.h.

145  { return do_get_date(__s, __end, __str, __err, __t); }
virtual iter_type do_get_date(iter_type __s, iter_type __end, ios_base &, ios_base::iostate &__err, tm *__t) const
Definition: _time_facets.c:305

◆ get_monthname()

template<class _Ch, class _InIt>
iter_type time_get< _Ch, _InIt >::get_monthname ( iter_type  __s,
iter_type  __end,
ios_base __str,
ios_base::iostate __err,
tm __t 
) const
inline

Definition at line 149 of file _time_facets.h.

151  { return do_get_monthname(__s, __end, __str, __err, __t); }
virtual iter_type do_get_monthname(iter_type __s, iter_type __end, ios_base &, ios_base::iostate &__err, tm *__t) const
Definition: _time_facets.c:385

◆ get_time()

template<class _Ch, class _InIt>
iter_type time_get< _Ch, _InIt >::get_time ( iter_type  __s,
iter_type  __end,
ios_base __str,
ios_base::iostate __err,
tm __t 
) const
inline

Definition at line 140 of file _time_facets.h.

142  { return do_get_time(__s, __end, __str, __err, __t); }
virtual iter_type do_get_time(iter_type __s, iter_type __end, ios_base &, ios_base::iostate &__err, tm *__t) const
Definition: _time_facets.c:329

◆ get_weekday()

template<class _Ch, class _InIt>
iter_type time_get< _Ch, _InIt >::get_weekday ( iter_type  __s,
iter_type  __end,
ios_base __str,
ios_base::iostate __err,
tm __t 
) const
inline

Definition at line 146 of file _time_facets.h.

148  { return do_get_weekday(__s, __end, __str, __err, __t); }
virtual iter_type do_get_weekday(iter_type __s, iter_type __end, ios_base &, ios_base::iostate &__err, tm *__t) const
Definition: _time_facets.c:368

◆ get_year()

template<class _Ch, class _InIt>
iter_type time_get< _Ch, _InIt >::get_year ( iter_type  __s,
iter_type  __end,
ios_base __str,
ios_base::iostate __err,
tm __t 
) const
inline

Definition at line 152 of file _time_facets.h.

154  { return do_get_year(__s, __end, __str, __err, __t); }
virtual iter_type do_get_year(iter_type __s, iter_type __end, ios_base &, ios_base::iostate &__err, tm *__t) const
Definition: _time_facets.c:349

Member Data Documentation

◆ id

template<class _Ch, class _InIt>
_STLP_BEGIN_NAMESPACE locale::id time_get< _CharT, _InputIterator >::id
static

Definition at line 156 of file _time_facets.h.


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