00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00048 #ifndef WINSTL_INCL_WINSTL_CONVERSION_NUMBER_HPP_GROUPING_FUNCTIONS
00049 #define WINSTL_INCL_WINSTL_CONVERSION_NUMBER_HPP_GROUPING_FUNCTIONS
00050
00051 #ifndef STLSOFT_DOCUMENTATION_SKIP_SECTION
00052 # define WINSTL_VER_WINSTL_CONVERSION_NUMBER_HPP_GROUPING_FUNCTIONS_MAJOR 1
00053 # define WINSTL_VER_WINSTL_CONVERSION_NUMBER_HPP_GROUPING_FUNCTIONS_MINOR 0
00054 # define WINSTL_VER_WINSTL_CONVERSION_NUMBER_HPP_GROUPING_FUNCTIONS_REVISION 4
00055 # define WINSTL_VER_WINSTL_CONVERSION_NUMBER_HPP_GROUPING_FUNCTIONS_EDIT 11
00056 #endif
00057
00058
00059
00060
00061
00062 #ifndef WINSTL_INCL_WINSTL_H_WINSTL
00063 # include <winstl/winstl.h>
00064 #endif
00065 #ifndef WINSTL_INCL_WINSTL_SYSTEM_HPP_SYSTEM_TRAITS
00066 # include <winstl/system/system_traits.hpp>
00067 #endif
00068 #ifndef STLSOFT_INCL_STLSOFT_CONVERSION_NUMBER_HPP_GROUPING_FUNCTIONS
00069 # include <stlsoft/conversion/number/grouping_functions.hpp>
00070 #endif
00071 #ifndef STLSOFT_INCL_STLSOFT_META_HPP_YESNO
00072 # include <stlsoft/meta/yesno.hpp>
00073 #endif
00074 #ifndef STLSOFT_INCL_STLSOFT_META_HPP_IS_INTEGRAL_TYPE
00075 # include <stlsoft/meta/is_integral_type.hpp>
00076 #endif
00077
00078
00079
00080
00081
00082 #ifndef _WINSTL_NO_NAMESPACE
00083 # if defined(_STLSOFT_NO_NAMESPACE) || \
00084 defined(STLSOFT_DOCUMENTATION_SKIP_SECTION)
00085
00086 namespace winstl
00087 {
00088 # else
00089
00090
00091 namespace stlsoft
00092 {
00093
00094 namespace winstl_project
00095 {
00096
00097 # endif
00098 #endif
00099
00100
00101
00102
00103
00104 #if 0
00105 template< typename C
00106 , typename N
00107 >
00108 ws_size_t format_thousands( C *dest
00109 , ws_size_t cchDest
00110 , N const& number
00111 );
00112 #endif
00113
00114 #ifndef STLSOFT_DOCUMENTATION_SKIP_SECTION
00115
00116 template< typename C
00117 , typename I
00118 >
00119 inline ws_size_t format_thousands_3_impl( C *dest
00120 , ws_size_t cchDest
00121 , I const &number
00122 , stlsoft::yes_type
00123 )
00124 {
00125 typedef system_traits<C> traits_t;
00126
00127 int cch = traits_t::get_locale_info(LOCALE_USER_DEFAULT, LOCALE_SGROUPING, NULL, 0);
00128 stlsoft::auto_buffer<C> picture(1 + cch);
00129
00130 cch = traits_t::get_locale_info(LOCALE_USER_DEFAULT, LOCALE_SGROUPING, &picture[0], picture.size());
00131
00132 return stlsoft::format_thousands(dest, cchDest, picture.data(), number);
00133 }
00134
00135 template<typename C>
00136 inline ws_size_t format_thousands_3_impl( C *dest
00137 , ws_size_t cchDest
00138 , C const *number
00139 , stlsoft::no_type
00140 )
00141 {
00142 typedef system_traits<C> traits_t;
00143
00144 int cch = traits_t::get_locale_info(LOCALE_USER_DEFAULT, LOCALE_SGROUPING, NULL, 0);
00145 stlsoft::auto_buffer<C> picture(1 + cch);
00146
00147 cch = traits_t::get_locale_info(LOCALE_USER_DEFAULT, LOCALE_SGROUPING, &picture[0], picture.size());
00148
00149 return stlsoft::translate_thousands(dest, cchDest, picture.data(), number);
00150 }
00151
00152 #endif
00153
00154 template< typename C
00155 , typename N
00156 >
00157 inline ws_size_t format_thousands( C *dest
00158 , ws_size_t cchDest
00159 , N const& number
00160 )
00161 {
00162 typedef ss_typename_type_k stlsoft::is_integral_type<N>::type yesno_type;
00163
00164 return format_thousands_3_impl(dest, cchDest, number, yesno_type());
00165 }
00166
00168
00169
00170 #ifdef STLSOFT_UNITTEST
00171
00172 #endif
00173
00174
00175
00176 #ifndef _WINSTL_NO_NAMESPACE
00177 # if defined(_STLSOFT_NO_NAMESPACE) || \
00178 defined(STLSOFT_DOCUMENTATION_SKIP_SECTION)
00179 }
00180 # else
00181 }
00182 }
00183 # endif
00184 #endif
00185
00186
00187
00188 #endif
00189
00190