Home | Info | Community | Development | myReactOS | Contact Us
ReactOS Development > Doxygen_num_get.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_GET_H 00024 #define _STLP_INTERNAL_NUM_GET_H 00025 00026 #ifndef _STLP_INTERNAL_ISTREAMBUF_ITERATOR_H 00027 # include <stl/_istreambuf_iterator.h> 00028 #endif 00029 00030 #ifndef _STLP_C_LOCALE_H 00031 # include <stl/c_locale.h> 00032 #endif 00033 00034 #ifndef _STLP_INTERNAL_NUMPUNCT_H 00035 # include <stl/_numpunct.h> 00036 #endif 00037 00038 #ifndef _STLP_INTERNAL_CTYPE_H 00039 # include <stl/_ctype.h> 00040 #endif 00041 00042 #ifndef _STLP_INTERNAL_IOSTREAM_STRING_H 00043 # include <stl/_iostream_string.h> 00044 #endif 00045 00046 #ifndef _STLP_FACETS_FWD_H 00047 # include <stl/_facets_fwd.h> 00048 #endif 00049 00050 _STLP_BEGIN_NAMESPACE 00051 00052 //---------------------------------------------------------------------- 00053 // num_get facets 00054 00055 template <class _CharT, class _InputIter> 00056 class num_get: public locale::facet { 00057 public: 00058 typedef _CharT char_type; 00059 typedef _InputIter iter_type; 00060 00061 explicit num_get(size_t __refs = 0): locale::facet(__refs) {} 00062 00063 #if !defined (_STLP_NO_BOOL) 00064 _InputIter get(_InputIter __ii, _InputIter __end, ios_base& __str, 00065 ios_base::iostate& __err, bool& __val) const 00066 { return do_get(__ii, __end, __str, __err, __val); } 00067 #endif 00068 00069 #if defined (_STLP_FIX_LIBRARY_ISSUES) 00070 _InputIter get(_InputIter __ii, _InputIter __end, ios_base& __str, 00071 ios_base::iostate& __err, short& __val) const 00072 { return do_get(__ii, __end, __str, __err, __val); } 00073 00074 _InputIter get(_InputIter __ii, _InputIter __end, ios_base& __str, 00075 ios_base::iostate& __err, int& __val) const 00076 { return do_get(__ii, __end, __str, __err, __val); } 00077 #endif 00078 00079 _InputIter get(_InputIter __ii, _InputIter __end, ios_base& __str, 00080 ios_base::iostate& __err, long& __val) const 00081 { return do_get(__ii, __end, __str, __err, __val); } 00082 00083 _InputIter get(_InputIter __ii, _InputIter __end, ios_base& __str, 00084 ios_base::iostate& __err, unsigned short& __val) const 00085 { return do_get(__ii, __end, __str, __err, __val); } 00086 00087 _InputIter get(_InputIter __ii, _InputIter __end, ios_base& __str, 00088 ios_base::iostate& __err, unsigned int& __val) const 00089 { return do_get(__ii, __end, __str, __err, __val); } 00090 00091 _InputIter get(_InputIter __ii, _InputIter __end, ios_base& __str, 00092 ios_base::iostate& __err, unsigned long& __val) const 00093 { return do_get(__ii, __end, __str, __err, __val); } 00094 00095 #if defined (_STLP_LONG_LONG) 00096 _InputIter get(_InputIter __ii, _InputIter __end, ios_base& __str, 00097 ios_base::iostate& __err, _STLP_LONG_LONG& __val) const 00098 { return do_get(__ii, __end, __str, __err, __val); } 00099 00100 _InputIter get(_InputIter __ii, _InputIter __end, ios_base& __str, 00101 ios_base::iostate& __err, unsigned _STLP_LONG_LONG& __val) const 00102 { return do_get(__ii, __end, __str, __err, __val); } 00103 #endif /* _STLP_LONG_LONG */ 00104 00105 _InputIter get(_InputIter __ii, _InputIter __end, ios_base& __str, 00106 ios_base::iostate& __err, float& __val) const 00107 { return do_get(__ii, __end, __str, __err, __val); } 00108 00109 _InputIter get(_InputIter __ii, _InputIter __end, ios_base& __str, 00110 ios_base::iostate& __err, double& __val) const 00111 { return do_get(__ii, __end, __str, __err, __val); } 00112 00113 #if !defined (_STLP_NO_LONG_DOUBLE) 00114 _InputIter get(_InputIter __ii, _InputIter __end, ios_base& __str, 00115 ios_base::iostate& __err, long double& __val) const 00116 { return do_get(__ii, __end, __str, __err, __val); } 00117 # endif 00118 00119 _InputIter get(_InputIter __ii, _InputIter __end, ios_base& __str, 00120 ios_base::iostate& __err, void*& __val) const 00121 { return do_get(__ii, __end, __str, __err, __val); } 00122 00123 static locale::id id; 00124 00125 protected: 00126 ~num_get() {} 00127 00128 typedef string string_type; 00129 typedef ctype<_CharT> _Ctype; 00130 typedef numpunct<_CharT> _Numpunct; 00131 00132 #if !defined (_STLP_NO_BOOL) 00133 virtual _InputIter do_get(_InputIter __ii, _InputIter __end, ios_base& __str, 00134 ios_base::iostate& __err, bool& __val) const; 00135 #endif 00136 00137 virtual _InputIter do_get(_InputIter __ii, _InputIter __end, ios_base& __str, 00138 ios_base::iostate& __err, long& __val) const; 00139 virtual _InputIter do_get(_InputIter __ii, _InputIter __end, ios_base& __str, 00140 ios_base::iostate& __err, unsigned short& __val) const; 00141 virtual _InputIter do_get(_InputIter __ii, _InputIter __end, ios_base& __str, 00142 ios_base::iostate& __err, unsigned int& __val) const; 00143 virtual _InputIter do_get(_InputIter __ii, _InputIter __end, ios_base& __str, 00144 ios_base::iostate& __err, unsigned long& __val) const; 00145 00146 #if defined (_STLP_FIX_LIBRARY_ISSUES) 00147 // issue 118 : those are actually not supposed to be here 00148 virtual _InputIter do_get(_InputIter __ii, _InputIter __end, ios_base& __str, 00149 ios_base::iostate& __err, short& __val) const; 00150 virtual _InputIter do_get(_InputIter __ii, _InputIter __end, ios_base& __str, 00151 ios_base::iostate& __err, int& __val) const; 00152 #endif 00153 00154 virtual _InputIter do_get(_InputIter __ii, _InputIter __end, ios_base& __str, 00155 ios_base::iostate& __err, float& __val) const; 00156 virtual _InputIter do_get(_InputIter __ii, _InputIter __end, ios_base& __str, 00157 ios_base::iostate& __err, double& __val) const; 00158 virtual _InputIter do_get(_InputIter __ii, _InputIter __end, ios_base& __str, 00159 ios_base::iostate& __err, void*& __p) const; 00160 00161 #if !defined (_STLP_NO_LONG_DOUBLE) 00162 virtual _InputIter do_get(_InputIter __ii, _InputIter __end, ios_base& __str, 00163 ios_base::iostate& __err, long double& __val) const; 00164 #endif 00165 00166 #if defined (_STLP_LONG_LONG) 00167 virtual _InputIter do_get(_InputIter __ii, _InputIter __end, ios_base& __str, 00168 ios_base::iostate& __err, _STLP_LONG_LONG& __val) const; 00169 virtual _InputIter do_get(_InputIter __ii, _InputIter __end, ios_base& __str, 00170 ios_base::iostate& __err, unsigned _STLP_LONG_LONG& __val) const; 00171 #endif 00172 00173 }; 00174 00175 00176 #if defined (_STLP_USE_TEMPLATE_EXPORT) 00177 _STLP_EXPORT_TEMPLATE_CLASS num_get<char, istreambuf_iterator<char, char_traits<char> > >; 00178 // _STLP_EXPORT_TEMPLATE_CLASS num_get<char, const char*>; 00179 # if !defined (_STLP_NO_WCHAR_T) 00180 _STLP_EXPORT_TEMPLATE_CLASS num_get<wchar_t, istreambuf_iterator<wchar_t, char_traits<wchar_t> > >; 00181 // _STLP_EXPORT_TEMPLATE_CLASS num_get<wchar_t, const wchar_t*>; 00182 # endif 00183 #endif 00184 00185 #if defined (_STLP_EXPOSE_STREAM_IMPLEMENTATION) 00186 00187 _STLP_MOVE_TO_PRIV_NAMESPACE 00188 00189 _STLP_DECLSPEC bool _STLP_CALL __valid_grouping(const char*, const char*, const char*, const char*); 00190 00191 template <class _InputIter, class _Integer, class _CharT> 00192 bool _STLP_CALL 00193 __get_decimal_integer(_InputIter& __first, _InputIter& __last, _Integer& __val, _CharT*); 00194 00195 # if !defined (_STLP_NO_WCHAR_T) 00196 bool _STLP_DECLSPEC _STLP_CALL __get_fdigit(wchar_t&, const wchar_t*); 00197 bool _STLP_DECLSPEC _STLP_CALL __get_fdigit_or_sep(wchar_t&, wchar_t, const wchar_t*); 00198 # endif 00199 00200 inline void _STLP_CALL 00201 _Initialize_get_float(const ctype<char>&, 00202 char& Plus, char& Minus, 00203 char& pow_e, char& pow_E, 00204 char*) { 00205 Plus = '+'; 00206 Minus = '-'; 00207 pow_e = 'e'; 00208 pow_E = 'E'; 00209 } 00210 00211 # if !defined (_STLP_NO_WCHAR_T) 00212 void _STLP_DECLSPEC _STLP_CALL _Initialize_get_float(const ctype<wchar_t>&, 00213 wchar_t&, wchar_t&, wchar_t&, wchar_t&, wchar_t*); 00214 # endif 00215 void _STLP_DECLSPEC _STLP_CALL __string_to_float(const __iostring&, float&); 00216 void _STLP_DECLSPEC _STLP_CALL __string_to_float(const __iostring&, double&); 00217 # if !defined (_STLP_NO_LONG_DOUBLE) 00218 void _STLP_DECLSPEC _STLP_CALL __string_to_float(const __iostring&, long double&); 00219 # endif 00220 00221 _STLP_MOVE_TO_STD_NAMESPACE 00222 00223 #endif /* _STLP_EXPOSE_STREAM_IMPLEMENTATION */ 00224 00225 00226 _STLP_END_NAMESPACE 00227 00228 #if defined (_STLP_EXPOSE_STREAM_IMPLEMENTATION) && !defined (_STLP_LINK_TIME_INSTANTIATION) 00229 # include <stl/_num_get.c> 00230 #endif 00231 00232 #endif /* _STLP_INTERNAL_NUM_GET_H */ 00233 00234 // Local Variables: 00235 // mode:C++ 00236 // End: 00237 Generated on Sat May 26 2012 04:27:54 for ReactOS by
1.7.6.1
|