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
00041
00042
00049 #ifndef FASTFORMAT_INCL_FASTFORMAT_SHIMS_CONVERSION_FILTER_TYPE_HPP_FAST_INTEGERS
00050 #define FASTFORMAT_INCL_FASTFORMAT_SHIMS_CONVERSION_FILTER_TYPE_HPP_FAST_INTEGERS
00051
00052
00053
00054
00055
00056 #ifndef FASTFORMAT_DOCUMENTATION_SKIP_SECTION
00057 # define FASTFORMAT_VER_FASTFORMAT_SHIMS_CONVERSION_FILTER_TYPE_HPP_FAST_INTEGERS_MAJOR 2
00058 # define FASTFORMAT_VER_FASTFORMAT_SHIMS_CONVERSION_FILTER_TYPE_HPP_FAST_INTEGERS_MINOR 0
00059 # define FASTFORMAT_VER_FASTFORMAT_SHIMS_CONVERSION_FILTER_TYPE_HPP_FAST_INTEGERS_REVISION 1
00060 # define FASTFORMAT_VER_FASTFORMAT_SHIMS_CONVERSION_FILTER_TYPE_HPP_FAST_INTEGERS_EDIT 7
00061 #endif
00062
00063
00064
00065
00066
00067 #ifndef __cplusplus
00068 # error This file can only be included in C++ compilation units
00069 #endif
00070
00071
00072
00073
00074
00075 #include <fastformat/fastformat.h>
00076 #include <fastformat/internal/stlsoft.h>
00077 #include <fastformat/quality/contract.h>
00078
00079 #include <stlsoft/conversion/integer_to_string.hpp>
00080 #include <stlsoft/string/shim_string.hpp>
00081
00082
00083
00084
00085
00086 #if !defined(FASTFORMAT_NO_NAMESPACE)
00087 namespace fastformat
00088 {
00089 namespace filters
00090 {
00091 #endif
00092
00093
00094
00095
00096
00097
00098
00099
00100
00101
00102
00103
00104
00105
00106 #if defined(STLSOFT_CF_BUILTIN_long_long_SUPPORT) || \
00107 defined(STLSOFT_CF_64BIT_INT_SUPPORT)
00108
00113 inline ::stlsoft::basic_shim_string<ff_char_t, 20> filter_type(
00114 # if defined(STLSOFT_CF_BUILTIN_long_long_SUPPORT)
00115 signed long long value
00116 , signed long long const*
00117 # elif defined(STLSOFT_CF_64BIT_INT_SUPPORT)
00118 ::stlsoft::sint64_t value
00119 , ::stlsoft::sint64_t const*
00120 # else
00121 # error Bad discrimination
00122 # endif
00123 , ff_char_t const volatile*
00124 )
00125 {
00126 ff_char_t sz[21];
00127 size_t n;
00128 ff_char_t const* s = ::stlsoft::integer_to_string(&sz[0], STLSOFT_NUM_ELEMENTS(sz), value, n);
00129
00130 return stlsoft::basic_shim_string<ff_char_t, 20>(s, n);
00131 }
00132
00137 inline ::stlsoft::basic_shim_string<ff_char_t, 20> filter_type(
00138 # if defined(STLSOFT_CF_BUILTIN_long_long_SUPPORT)
00139 unsigned long long value
00140 , unsigned long long const*
00141 # elif defined(STLSOFT_CF_64BIT_INT_SUPPORT)
00142 ::stlsoft::uint64_t value
00143 , ::stlsoft::uint64_t const*
00144 # else
00145 # error Bad discrimination
00146 # endif
00147 , ff_char_t const volatile*
00148 )
00149 {
00150 ff_char_t sz[21];
00151 size_t n;
00152 ff_char_t const* s = ::stlsoft::integer_to_string(&sz[0], STLSOFT_NUM_ELEMENTS(sz), value, n);
00153
00154 return stlsoft::basic_shim_string<ff_char_t, 20>(s, n);
00155 }
00156
00157 #endif
00158
00162 inline stlsoft::basic_shim_string<ff_char_t, 20> filter_type(signed long value, signed long const*, ff_char_t const volatile*)
00163 {
00164 ff_char_t sz[21];
00165 size_t n;
00166 ff_char_t const* s = ::stlsoft::integer_to_string(&sz[0], STLSOFT_NUM_ELEMENTS(sz), value, n);
00167
00168 return stlsoft::basic_shim_string<ff_char_t, 20>(s, n);
00169 }
00170
00174 inline stlsoft::basic_shim_string<ff_char_t, 20> filter_type(unsigned long value, unsigned long const*, ff_char_t const volatile*)
00175 {
00176 ff_char_t sz[21];
00177 size_t n;
00178 ff_char_t const* s = ::stlsoft::integer_to_string(&sz[0], STLSOFT_NUM_ELEMENTS(sz), value, n);
00179
00180 return stlsoft::basic_shim_string<ff_char_t, 20>(s, n);
00181 }
00182
00186 inline stlsoft::basic_shim_string<ff_char_t, 20> filter_type(signed int value, signed int const*, ff_char_t const volatile*)
00187 {
00188 signed long value2 = value;
00189
00190 return filter_type(value2, &value2, static_cast<ff_char_t const volatile*>(0));
00191 }
00192
00196 inline stlsoft::basic_shim_string<ff_char_t, 20> filter_type(unsigned int value, unsigned int const*, ff_char_t const volatile*)
00197 {
00198 unsigned long value2 = value;
00199
00200 return filter_type(value2, &value2, static_cast<ff_char_t const volatile*>(0));
00201 }
00202
00206 inline stlsoft::basic_shim_string<ff_char_t, 20> filter_type(signed short value, signed short const*, ff_char_t const volatile*)
00207 {
00208 signed long value2 = value;
00209
00210 return filter_type(value2, &value2, static_cast<ff_char_t const volatile*>(0));
00211 }
00212
00216 inline stlsoft::basic_shim_string<ff_char_t, 20> filter_type(unsigned short value, unsigned short const*, ff_char_t const volatile*)
00217 {
00218 unsigned long value2 = value;
00219
00220 return filter_type(value2, &value2, static_cast<ff_char_t const volatile*>(0));
00221 }
00222
00223
00224
00225
00226
00227 #if !defined(FASTFORMAT_NO_NAMESPACE)
00228 }
00229 }
00230 #endif
00231
00232
00233
00234
00235
00236 #ifdef STLSOFT_CF_PRAGMA_ONCE_SUPPORT
00237 # pragma once
00238 #endif
00239
00240
00241
00242 #endif
00243
00244