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     28
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 
00086 #endif 
00087 
00088 
00089 
00090 
00091 
00112 class pointer
00113 {
00114 public:
00116     typedef pointer     class_type;
00117 
00118 public:
00130     pointer(void const volatile* pv, int widthAndFormat);
00131 
00139     pointer(void const volatile* pv, int minWidth, int format);
00140 
00141 public:
00143     pan_char_t const*   data() const;
00145     pan_char_t const*   c_str() const;
00147     size_t              length() const;
00148 
00149 private:
00150     void construct_() const;
00151     void construct_();
00152 
00153     static int validate_width_(int minWidth);
00154 
00155 private:
00156     void const volatile*    m_value;
00157     size_t                  m_len;
00158     const int               m_minWidth;
00159     const int               m_format;
00160     pan_char_t              m_sz[23];
00161 
00162 private:
00163 #if !defined(STLSOFT_COMPILER_IS_GCC)
00164     pointer(class_type const&);
00165 #endif 
00166     class_type& operator =(class_type const&);
00167 };
00168 
00169 
00170 
00171 
00172 
00173 #ifndef PANTHEIOS_DOCUMENTATION_SKIP_SECTION
00174 
00175 # if !defined(PANTHEIOS_NO_NAMESPACE)
00176 namespace shims
00177 {
00178 # endif 
00179 
00181 # ifdef PANTHEIOS_USE_WIDE_STRINGS
00182 inline wchar_t const* c_str_data_w(pointer const& p)
00183 # else 
00184 inline char const* c_str_data_a(pointer const& p)
00185 # endif 
00186 {
00187     return p.data();
00188 }
00190 inline pan_char_t const* c_str_data(pointer const& p)
00191 {
00192     return p.data();
00193 }
00194 
00196 # ifdef PANTHEIOS_USE_WIDE_STRINGS
00197 inline size_t c_str_len_w(pointer const& p)
00198 # else 
00199 inline size_t c_str_len_a(pointer const& p)
00200 # endif 
00201 {
00202     return p.length();
00203 }
00205 inline size_t c_str_len(pointer const& p)
00206 {
00207     return p.length();
00208 }
00209 
00211 # ifdef PANTHEIOS_USE_WIDE_STRINGS
00212 inline wchar_t const* c_str_ptr_w(pointer const& p)
00213 # else 
00214 inline char const* c_str_ptr_a(pointer const& p)
00215 # endif 
00216 {
00217     return p.c_str();
00218 }
00220 inline pan_char_t const* c_str_ptr(pointer const& p)
00221 {
00222     return p.c_str();
00223 }
00224 
00225 # if !defined(PANTHEIOS_NO_NAMESPACE)
00226 } 
00227 
00228 #  if defined(STLSOFT_COMPILER_IS_GCC)
00229     
00230 
00231 
00232 
00233 
00234 #   ifdef PANTHEIOS_USE_WIDE_STRINGS
00235     using ::pantheios::shims::c_str_data_w;
00236     using ::pantheios::shims::c_str_len_w;
00237     using ::pantheios::shims::c_str_ptr_w;
00238 #   else 
00239     using ::pantheios::shims::c_str_data_a;
00240     using ::pantheios::shims::c_str_len_a;
00241     using ::pantheios::shims::c_str_ptr_a;
00242 #   endif 
00243     using ::pantheios::shims::c_str_data;
00244     using ::pantheios::shims::c_str_len;
00245     using ::pantheios::shims::c_str_ptr;
00246 #  endif 
00247 
00248 # endif 
00249 
00250 #endif 
00251 
00252 
00253 
00254 
00255 
00256 #if !defined(PANTHEIOS_NO_NAMESPACE)
00257 } 
00258 
00259 namespace stlsoft
00260 {
00261     
00262     
00263     
00264     
00265     
00266     
00267 
00268 # ifdef PANTHEIOS_USE_WIDE_STRINGS
00269     using ::pantheios::shims::c_str_data_w;
00270     using ::pantheios::shims::c_str_len_w;
00271     using ::pantheios::shims::c_str_ptr_w;
00272 # else 
00273     using ::pantheios::shims::c_str_data_a;
00274     using ::pantheios::shims::c_str_len_a;
00275     using ::pantheios::shims::c_str_ptr_a;
00276 # endif 
00277     using ::pantheios::shims::c_str_data;
00278     using ::pantheios::shims::c_str_len;
00279     using ::pantheios::shims::c_str_ptr;
00280 }
00281 
00282 #endif 
00283 
00284 
00285 
00286 
00287 
00288 #ifdef STLSOFT_PPF_pragma_once_SUPPORT
00289 # pragma once
00290 #endif 
00291 
00292 
00293 
00294 #endif 
00295 
00296