Home | Info | Community | Development | myReactOS | Contact Us
ReactOS Development > Doxygen_num_put.h
Go to the documentation of this file.
00001 /* 00002 * Copyright (c) 1999 00003 * Silicon Graphics Computer Systems, Inc. 00004 * 00005 * Copyright (c) 1999 00006 * Boris Fomitchev 00007 * 00008 * This material is provided "as is", with absolutely no warranty expressed 00009 * or implied. Any use is at your own risk. 00010 * 00011 * Permission to use or copy this software for any purpose is hereby granted 00012 * without fee, provided the above notices are retained on all copies. 00013 * Permission to modify the code and to distribute modified code is granted, 00014 * provided the above notices are retained, and a notice that the code was 00015 * modified is included with the above copyright notice. 00016 * 00017 */ 00018 // WARNING: This is an internal header file, included by other C++ 00019 // standard library headers. You should not attempt to use this header 00020 // file directly. 00021 00022 00023 #ifndef _STLP_INTERNAL_NUM_PUT_H 00024 #define _STLP_INTERNAL_NUM_PUT_H 00025 00026 #ifndef _STLP_INTERNAL_NUMPUNCT_H 00027 # include <stl/_numpunct.h> 00028 #endif 00029 00030 #ifndef _STLP_INTERNAL_CTYPE_H 00031 # include <stl/_ctype.h> 00032 #endif 00033 00034 #ifndef _STLP_INTERNAL_OSTREAMBUF_ITERATOR_H 00035 # include <stl/_ostreambuf_iterator.h> 00036 #endif 00037 00038 #ifndef _STLP_INTERNAL_IOSTREAM_STRING_H 00039 # include <stl/_iostream_string.h> 00040 #endif 00041 00042 #ifndef _STLP_FACETS_FWD_H 00043 # include <stl/_facets_fwd.h> 00044 #endif 00045 00046 _STLP_BEGIN_NAMESPACE 00047 00048 //---------------------------------------------------------------------- 00049 // num_put facet 00050 00051 template <class _CharT, class _OutputIter> 00052 class num_put: public locale::facet { 00053 public: 00054 typedef _CharT char_type; 00055 typedef _OutputIter iter_type; 00056 00057 explicit num_put(size_t __refs = 0) : locale::facet(__refs) {} 00058 00059 #if !defined (_STLP_NO_BOOL) 00060 iter_type put(iter_type __s, ios_base& __f, char_type __fill, 00061 bool __val) const { 00062 return do_put(__s, __f, __fill, __val); 00063 } 00064 #endif 00065 iter_type put(iter_type __s, ios_base& __f, char_type __fill, 00066 long __val) const { 00067 return do_put(__s, __f, __fill, __val); 00068 } 00069 00070 iter_type put(iter_type __s, ios_base& __f, char_type __fill, 00071 unsigned long __val) const { 00072 return do_put(__s, __f, __fill, __val); 00073 } 00074 00075 #if defined (_STLP_LONG_LONG) 00076 iter_type put(iter_type __s, ios_base& __f, char_type __fill, 00077 _STLP_LONG_LONG __val) const { 00078 return do_put(__s, __f, __fill, __val); 00079 } 00080 00081 iter_type put(iter_type __s, ios_base& __f, char_type __fill, 00082 unsigned _STLP_LONG_LONG __val) const { 00083 return do_put(__s, __f, __fill, __val); 00084 } 00085 #endif 00086 00087 iter_type put(iter_type __s, ios_base& __f, char_type __fill, 00088 double __val) const { 00089 return do_put(__s, __f, __fill, (double)__val); 00090 } 00091 00092 #if !defined (_STLP_NO_LONG_DOUBLE) 00093 iter_type put(iter_type __s, ios_base& __f, char_type __fill, 00094 long double __val) const { 00095 return do_put(__s, __f, __fill, __val); 00096 } 00097 #endif 00098 00099 iter_type put(iter_type __s, ios_base& __f, char_type __fill, 00100 const void * __val) const { 00101 return do_put(__s, __f, __fill, __val); 00102 } 00103 00104 static locale::id id; 00105 00106 protected: 00107 ~num_put() {} 00108 #if !defined (_STLP_NO_BOOL) 00109 virtual _OutputIter do_put(_OutputIter __s, ios_base& __f, _CharT __fill, bool __val) const; 00110 #endif 00111 virtual _OutputIter do_put(_OutputIter __s, ios_base& __f, _CharT __fill, long __val) const; 00112 virtual _OutputIter do_put(_OutputIter __s, ios_base& __f, _CharT __fill, unsigned long __val) const; 00113 virtual _OutputIter do_put(_OutputIter __s, ios_base& __f, _CharT __fill, double __val) const; 00114 #if !defined (_STLP_NO_LONG_DOUBLE) 00115 virtual _OutputIter do_put(_OutputIter __s, ios_base& __f, _CharT __fill, long double __val) const; 00116 #endif 00117 00118 #if defined (_STLP_LONG_LONG) 00119 virtual _OutputIter do_put(_OutputIter __s, ios_base& __f, _CharT __fill, _STLP_LONG_LONG __val) const; 00120 virtual _OutputIter do_put(_OutputIter __s, ios_base& __f, _CharT __fill, 00121 unsigned _STLP_LONG_LONG __val) const ; 00122 #endif 00123 virtual _OutputIter do_put(_OutputIter __s, ios_base& __f, _CharT __fill, const void* __val) const; 00124 }; 00125 00126 #if defined (_STLP_USE_TEMPLATE_EXPORT) 00127 _STLP_EXPORT_TEMPLATE_CLASS num_put<char, ostreambuf_iterator<char, char_traits<char> > >; 00128 # if !defined (_STLP_NO_WCHAR_T) 00129 _STLP_EXPORT_TEMPLATE_CLASS num_put<wchar_t, ostreambuf_iterator<wchar_t, char_traits<wchar_t> > >; 00130 # endif 00131 #endif 00132 00133 #if defined (_STLP_EXPOSE_STREAM_IMPLEMENTATION) 00134 00135 _STLP_MOVE_TO_PRIV_NAMESPACE 00136 00137 template <class _Integer> 00138 char* _STLP_CALL 00139 __write_integer_backward(char* __buf, ios_base::fmtflags __flags, _Integer __x); 00140 00141 /* 00142 * Returns the position on the right of the digits that has to be considered 00143 * for the application of the grouping policy. 00144 */ 00145 extern size_t _STLP_CALL __write_float(__iostring&, ios_base::fmtflags, int, double); 00146 # if !defined (_STLP_NO_LONG_DOUBLE) 00147 extern size_t _STLP_CALL __write_float(__iostring&, ios_base::fmtflags, int, long double); 00148 # endif 00149 00150 /* 00151 * Gets the digits of the integer part. 00152 */ 00153 void _STLP_CALL __get_floor_digits(__iostring&, _STLP_LONGEST_FLOAT_TYPE); 00154 00155 template <class _CharT> 00156 void _STLP_CALL __get_money_digits(_STLP_BASIC_IOSTRING(_CharT)&, ios_base&, _STLP_LONGEST_FLOAT_TYPE); 00157 00158 # if !defined (_STLP_NO_WCHAR_T) 00159 extern void _STLP_CALL __convert_float_buffer(__iostring const&, __iowstring&, const ctype<wchar_t>&, wchar_t, bool = true); 00160 # endif 00161 extern void _STLP_CALL __adjust_float_buffer(__iostring&, char); 00162 00163 extern char* _STLP_CALL 00164 __write_integer(char* buf, ios_base::fmtflags flags, long x); 00165 00166 extern ptrdiff_t _STLP_CALL __insert_grouping(char* first, char* last, const string&, char, char, char, int); 00167 extern void _STLP_CALL __insert_grouping(__iostring&, size_t, const string&, char, char, char, int); 00168 # if !defined (_STLP_NO_WCHAR_T) 00169 extern ptrdiff_t _STLP_CALL __insert_grouping(wchar_t*, wchar_t*, const string&, wchar_t, wchar_t, wchar_t, int); 00170 extern void _STLP_CALL __insert_grouping(__iowstring&, size_t, const string&, wchar_t, wchar_t, wchar_t, int); 00171 # endif 00172 00173 _STLP_MOVE_TO_STD_NAMESPACE 00174 00175 #endif /* _STLP_EXPOSE_STREAM_IMPLEMENTATION */ 00176 00177 _STLP_END_NAMESPACE 00178 00179 #if defined (_STLP_EXPOSE_STREAM_IMPLEMENTATION) && !defined (_STLP_LINK_TIME_INSTANTIATION) 00180 # include <stl/_num_put.c> 00181 #endif 00182 00183 #endif /* _STLP_INTERNAL_NUMERIC_FACETS_H */ 00184 00185 // Local Variables: 00186 // mode:C++ 00187 // End: Generated on Fri May 25 2012 04:27:52 for ReactOS by
1.7.6.1
|