ReactOS 0.4.15-dev-7942-gd23573b
num_put< _CharT, _OutputIter > Class Template Reference

#include <_num_put.h>

Inheritance diagram for num_put< _CharT, _OutputIter >:
Collaboration diagram for num_put< _CharT, _OutputIter >:

Public Types

typedef _CharT char_type
 
typedef _OutputIter iter_type
 

Public Member Functions

 num_put (size_t __refs=0)
 
iter_type put (iter_type __s, ios_base &__f, char_type __fill, bool __val) const
 
iter_type put (iter_type __s, ios_base &__f, char_type __fill, long __val) const
 
iter_type put (iter_type __s, ios_base &__f, char_type __fill, unsigned long __val) const
 
iter_type put (iter_type __s, ios_base &__f, char_type __fill, double __val) const
 
iter_type put (iter_type __s, ios_base &__f, char_type __fill, long double __val) const
 
iter_type put (iter_type __s, ios_base &__f, char_type __fill, const void *__val) const
 

Static Public Attributes

static locale::id id
 

Protected Member Functions

 ~num_put ()
 
virtual _OutputIter do_put (_OutputIter __s, ios_base &__f, _CharT __fill, bool __val) const
 
virtual _OutputIter do_put (_OutputIter __s, ios_base &__f, _CharT __fill, long __val) const
 
virtual _OutputIter do_put (_OutputIter __s, ios_base &__f, _CharT __fill, unsigned long __val) const
 
virtual _OutputIter do_put (_OutputIter __s, ios_base &__f, _CharT __fill, double __val) const
 
virtual _OutputIter do_put (_OutputIter __s, ios_base &__f, _CharT __fill, long double __val) const
 
virtual _OutputIter do_put (_OutputIter __s, ios_base &__f, _CharT __fill, const void *__val) 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 _CharT, class _OutputIter>
class num_put< _CharT, _OutputIter >

Definition at line 52 of file _num_put.h.

Member Typedef Documentation

◆ char_type

template<class _CharT , class _OutputIter >
typedef _CharT num_put< _CharT, _OutputIter >::char_type

Definition at line 54 of file _num_put.h.

◆ iter_type

template<class _CharT , class _OutputIter >
typedef _OutputIter num_put< _CharT, _OutputIter >::iter_type

Definition at line 55 of file _num_put.h.

Constructor & Destructor Documentation

◆ num_put()

template<class _CharT , class _OutputIter >
num_put< _CharT, _OutputIter >::num_put ( size_t  __refs = 0)
inlineexplicit

Definition at line 57 of file _num_put.h.

57: locale::facet(__refs) {}

◆ ~num_put()

template<class _CharT , class _OutputIter >
num_put< _CharT, _OutputIter >::~num_put ( )
inlineprotected

Definition at line 107 of file _num_put.h.

107{}

Member Function Documentation

◆ do_put() [1/6]

template<class _CharT , class _OutputIter >
_OutputIter num_put< _CharT, _OutputIter >::do_put ( _OutputIter  __s,
ios_base __f,
_CharT  __fill,
bool  __val 
) const
protectedvirtual

Definition at line 420 of file _num_put.c.

421 {
422 if (!(__f.flags() & ios_base::boolalpha))
423 // 22.2.2.2.2.23: shall return do_put for int and not directly __do_put_integer.
424 return do_put(__s, __f, __fill, __STATIC_CAST(long, __val));
425
426 return _STLP_PRIV __do_put_bool(__s, __f, __fill, __val);
427}
void __fill(_ForwardIter __first, _ForwardIter __last, const _Tp &__val, const input_iterator_tag &, _Distance *)
Definition: _algobase.h:417
_STLP_INLINE_LOOP _InputIter const _Tp & __val
Definition: _algobase.h:656
#define _STLP_PRIV
Definition: _dm.h:70
_OutputIter _STLP_CALL __do_put_bool(_OutputIter __s, ios_base &__f, _CharT __fill, bool __x)
Definition: _num_put.c:386
fmtflags flags() const
Definition: _ios_base.h:107
virtual _OutputIter do_put(_OutputIter __s, ios_base &__f, _CharT __fill, bool __val) const
Definition: _num_put.c:420
#define __STATIC_CAST(__x, __y)
Definition: features.h:585

Referenced by num_put< _CharT, _OutputIter >::put().

◆ do_put() [2/6]

template<class _CharT , class _OutputIter >
_OutputIter num_put< _CharT, _OutputIter >::do_put ( _OutputIter  __s,
ios_base __f,
_CharT  __fill,
const void __val 
) const
protectedvirtual

Definition at line 475 of file _num_put.c.

476 {
477 const ctype<_CharT>& __c_type = use_facet<ctype<_CharT> >(__f.getloc());
478 ios_base::fmtflags __save_flags = __f.flags();
479
480 __f.setf(ios_base::hex, ios_base::basefield);
481 __f.setf(ios_base::showbase);
482 __f.setf(ios_base::internal, ios_base::adjustfield);
483 __f.width((sizeof(void*) * 2) + 2); // digits in pointer type plus '0x' prefix
484 if ( __val == 0 ) {
485 // base ('0x') not shown for null, but I really want to type it
486 // for pointer. Print it first in this case.
487 const char* __table_ptr = (__save_flags & ios_base::uppercase) ?
489 __s++ = __c_type.widen( '0' );
490 __s++ = __c_type.widen( __table_ptr[16] );
491 __f.width((sizeof(void*) * 2)); // digits in pointer type
492 } else {
493 __f.width((sizeof(void*) * 2) + 2); // digits in pointer type plus '0x' prefix
494 }
495#if defined (_STLP_MSVC)
496# pragma warning (push)
497# pragma warning (disable : 4311) //pointer truncation from 'const void*' to 'unsigned long'
498#endif
499 _OutputIter result =
500#ifdef _WIN64 // ReactOS, compilation with 64 bit gcc
501_STLP_PRIV __do_put_integer(__s, __f, __c_type.widen('0'), __REINTERPRET_CAST(unsigned _STLP_LONG_LONG,__val));
502#else
503#ifdef _STLP_LONG_LONG
504 ( sizeof(void*) == sizeof(unsigned long) ) ?
505#endif
506 _STLP_PRIV __do_put_integer(__s, __f, __c_type.widen('0'), __REINTERPRET_CAST(unsigned long,__val))
507#ifdef _STLP_LONG_LONG
508 : /* ( sizeof(void*) == sizeof(unsigned _STLP_LONG_LONG) ) ? */
509 _STLP_PRIV __do_put_integer(__s, __f, __c_type.widen('0'), __REINTERPRET_CAST(unsigned _STLP_LONG_LONG,__val))
510#endif
511 ;
512#endif
513#if defined (_STLP_MSVC)
514# pragma warning (pop)
515#endif
516 __f.flags(__save_flags);
517 return result;
518}
#define _STLP_LONG_LONG
Definition: _apcc.h:12
_STLP_DECLSPEC const char *_STLP_CALL __hex_char_table_hi()
Definition: num_put.cpp:121
_STLP_DECLSPEC const char *_STLP_CALL __hex_char_table_lo()
Definition: num_put.cpp:118
_OutputIter _STLP_CALL __do_put_integer(_OutputIter __s, ios_base &__f, _CharT __fill, _Integer __x)
Definition: _num_put.c:372
Definition: _ctype.h:58
fmtflags setf(fmtflags __flag)
Definition: _ios_base.h:114
streamsize width() const
Definition: _ios_base.h:134
int fmtflags
Definition: _ios_base.h:57
locale getloc() const
Definition: _ios_base.h:143
#define __REINTERPRET_CAST(__x, __y)
Definition: features.h:586
GLuint64EXT * result
Definition: glext.h:11304

◆ do_put() [3/6]

template<class _CharT , class _OutputIter >
_OutputIter num_put< _CharT, _OutputIter >::do_put ( _OutputIter  __s,
ios_base __f,
_CharT  __fill,
double  __val 
) const
protectedvirtual

Definition at line 444 of file _num_put.c.

446{ return _STLP_PRIV __do_put_float(__s, __f, __fill, __val); }
_OutputIter _STLP_CALL __do_put_float(_OutputIter __s, ios_base &__f, _CharT __fill, _Float __x)
Definition: _num_put.c:115

◆ do_put() [4/6]

template<class _CharT , class _OutputIter >
_OutputIter num_put< _CharT, _OutputIter >::do_put ( _OutputIter  __s,
ios_base __f,
_CharT  __fill,
long  __val 
) const
protectedvirtual

Definition at line 432 of file _num_put.c.

434{ return _STLP_PRIV __do_put_integer(__s, __f, __fill, __val); }

◆ do_put() [5/6]

template<class _CharT , class _OutputIter >
_OutputIter num_put< _CharT, _OutputIter >::do_put ( _OutputIter  __s,
ios_base __f,
_CharT  __fill,
long double  __val 
) const
protectedvirtual

Definition at line 451 of file _num_put.c.

453{ return _STLP_PRIV __do_put_float(__s, __f, __fill, __val); }

◆ do_put() [6/6]

template<class _CharT , class _OutputIter >
_OutputIter num_put< _CharT, _OutputIter >::do_put ( _OutputIter  __s,
ios_base __f,
_CharT  __fill,
unsigned long  __val 
) const
protectedvirtual

Definition at line 438 of file _num_put.c.

440{ return _STLP_PRIV __do_put_integer(__s, __f, __fill, __val); }

◆ put() [1/6]

template<class _CharT , class _OutputIter >
iter_type num_put< _CharT, _OutputIter >::put ( iter_type  __s,
ios_base __f,
char_type  __fill,
bool  __val 
) const
inline

Definition at line 60 of file _num_put.h.

61 {
62 return do_put(__s, __f, __fill, __val);
63 }

Referenced by LocaleTest::_num_put_get().

◆ put() [2/6]

template<class _CharT , class _OutputIter >
iter_type num_put< _CharT, _OutputIter >::put ( iter_type  __s,
ios_base __f,
char_type  __fill,
const void __val 
) const
inline

Definition at line 99 of file _num_put.h.

100 {
101 return do_put(__s, __f, __fill, __val);
102 }

◆ put() [3/6]

template<class _CharT , class _OutputIter >
iter_type num_put< _CharT, _OutputIter >::put ( iter_type  __s,
ios_base __f,
char_type  __fill,
double  __val 
) const
inline

Definition at line 87 of file _num_put.h.

88 {
89 return do_put(__s, __f, __fill, (double)__val);
90 }

◆ put() [4/6]

template<class _CharT , class _OutputIter >
iter_type num_put< _CharT, _OutputIter >::put ( iter_type  __s,
ios_base __f,
char_type  __fill,
long  __val 
) const
inline

Definition at line 65 of file _num_put.h.

66 {
67 return do_put(__s, __f, __fill, __val);
68 }

◆ put() [5/6]

template<class _CharT , class _OutputIter >
iter_type num_put< _CharT, _OutputIter >::put ( iter_type  __s,
ios_base __f,
char_type  __fill,
long double  __val 
) const
inline

Definition at line 93 of file _num_put.h.

94 {
95 return do_put(__s, __f, __fill, __val);
96 }

◆ put() [6/6]

template<class _CharT , class _OutputIter >
iter_type num_put< _CharT, _OutputIter >::put ( iter_type  __s,
ios_base __f,
char_type  __fill,
unsigned long  __val 
) const
inline

Definition at line 70 of file _num_put.h.

71 {
72 return do_put(__s, __f, __fill, __val);
73 }

Member Data Documentation

◆ id

template<class _CharT , class _OutputIterator >
_STLP_MOVE_TO_STD_NAMESPACE locale::id num_put< _CharT, _OutputIterator >::id
static

Definition at line 104 of file _num_put.h.


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