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 PANTHEIOS_INCL_PANTHEIOS_INSERTERS_HPP_POINTER
00050 #define PANTHEIOS_INCL_PANTHEIOS_INSERTERS_HPP_POINTER
00051
00052
00053
00054
00055
00056 #ifndef PANTHEIOS_DOCUMENTATION_SKIP_SECTION
00057 # define PANTHEIOS_VER_PANTHEIOS_INSERTERS_HPP_POINTER_MAJOR 2
00058 # define PANTHEIOS_VER_PANTHEIOS_INSERTERS_HPP_POINTER_MINOR 4
00059 # define PANTHEIOS_VER_PANTHEIOS_INSERTERS_HPP_POINTER_REVISION 4
00060 # define PANTHEIOS_VER_PANTHEIOS_INSERTERS_HPP_POINTER_EDIT 29
00061 #endif
00062
00063
00064
00065
00066
00067 #ifndef PANTHEIOS_INCL_PANTHEIOS_H_PANTHEIOS
00068 # include <pantheios/pantheios.h>
00069 #endif
00070 #ifndef PANTHEIOS_INCL_PANTHEIOS_INSERTERS_HPP_FMT
00071 # include <pantheios/inserters/fmt.hpp>
00072 #endif
00073
00074 #ifndef STLSOFT_INCL_STLSOFT_SHIMS_ACCESS_STRING_H_FWD
00075 # include <stlsoft/shims/access/string/fwd.h>
00076 #endif
00077
00078
00079
00080
00081
00082 #if !defined(PANTHEIOS_NO_NAMESPACE)
00083 namespace pantheios
00084 {
00085 #endif
00086
00087
00088
00089
00090
00111 class pointer
00112 {
00113 public:
00115 typedef pointer class_type;
00116
00117 public:
00131 pointer(void const volatile* pv, int widthAndFormat);
00132
00140 pointer(void const volatile* pv, int minWidth, int format);
00141
00142 public:
00144 pan_char_t const* data() const;
00146 pan_char_t const* c_str() const;
00148 size_t length() const;
00149
00150 private:
00151 void construct_() const;
00152 void construct_();
00153
00154 static int validate_width_(int minWidth);
00155
00156 private:
00157 void const volatile* m_value;
00158 size_t m_len;
00159 const int m_minWidth;
00160 const int m_format;
00161 pan_char_t m_sz[23];
00162
00163 private:
00164 #if !defined(STLSOFT_COMPILER_IS_GCC)
00165 pointer(class_type const&);
00166 #endif
00167 class_type& operator =(class_type const&);
00168 };
00169
00170
00171
00172
00173
00174 #ifndef PANTHEIOS_DOCUMENTATION_SKIP_SECTION
00175
00176 # if !defined(PANTHEIOS_NO_NAMESPACE)
00177 namespace shims
00178 {
00179 # endif
00180
00182 # ifdef PANTHEIOS_USE_WIDE_STRINGS
00183 inline wchar_t const* c_str_data_w(pointer const& p)
00184 # else
00185 inline char const* c_str_data_a(pointer const& p)
00186 # endif
00187 {
00188 return p.data();
00189 }
00191 inline pan_char_t const* c_str_data(pointer const& p)
00192 {
00193 return p.data();
00194 }
00195
00197 # ifdef PANTHEIOS_USE_WIDE_STRINGS
00198 inline size_t c_str_len_w(pointer const& p)
00199 # else
00200 inline size_t c_str_len_a(pointer const& p)
00201 # endif
00202 {
00203 return p.length();
00204 }
00206 inline size_t c_str_len(pointer const& p)
00207 {
00208 return p.length();
00209 }
00210
00212 # ifdef PANTHEIOS_USE_WIDE_STRINGS
00213 inline wchar_t const* c_str_ptr_w(pointer const& p)
00214 # else
00215 inline char const* c_str_ptr_a(pointer const& p)
00216 # endif
00217 {
00218 return p.c_str();
00219 }
00221 inline pan_char_t const* c_str_ptr(pointer const& p)
00222 {
00223 return p.c_str();
00224 }
00225
00226 # if !defined(PANTHEIOS_NO_NAMESPACE)
00227 }
00228
00229 # if defined(STLSOFT_COMPILER_IS_GCC)
00230
00231
00232
00233
00234
00235 # ifdef PANTHEIOS_USE_WIDE_STRINGS
00236 using ::pantheios::shims::c_str_data_w;
00237 using ::pantheios::shims::c_str_len_w;
00238 using ::pantheios::shims::c_str_ptr_w;
00239 # else
00240 using ::pantheios::shims::c_str_data_a;
00241 using ::pantheios::shims::c_str_len_a;
00242 using ::pantheios::shims::c_str_ptr_a;
00243 # endif
00244 using ::pantheios::shims::c_str_data;
00245 using ::pantheios::shims::c_str_len;
00246 using ::pantheios::shims::c_str_ptr;
00247 # endif
00248
00249 # endif
00250
00251 #endif
00252
00253
00254
00255
00256
00257 #if !defined(PANTHEIOS_NO_NAMESPACE)
00258 }
00259
00260 namespace stlsoft
00261 {
00262
00263
00264
00265
00266
00267
00268
00269 # ifdef PANTHEIOS_USE_WIDE_STRINGS
00270 using ::pantheios::shims::c_str_data_w;
00271 using ::pantheios::shims::c_str_len_w;
00272 using ::pantheios::shims::c_str_ptr_w;
00273 # else
00274 using ::pantheios::shims::c_str_data_a;
00275 using ::pantheios::shims::c_str_len_a;
00276 using ::pantheios::shims::c_str_ptr_a;
00277 # endif
00278 using ::pantheios::shims::c_str_data;
00279 using ::pantheios::shims::c_str_len;
00280 using ::pantheios::shims::c_str_ptr;
00281 }
00282
00283 #endif
00284
00285
00286
00287
00288
00289 #ifdef STLSOFT_PPF_pragma_once_SUPPORT
00290 # pragma once
00291 #endif
00292
00293
00294
00295 #endif
00296
00297