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
00073 #ifndef PANTHEIOS_INCL_PANTHEIOS_INSERTERS_HPP_CHARACTER
00074 #define PANTHEIOS_INCL_PANTHEIOS_INSERTERS_HPP_CHARACTER
00075
00076
00077
00078
00079
00080 #ifndef PANTHEIOS_DOCUMENTATION_SKIP_SECTION
00081 # define PANTHEIOS_VER_PANTHEIOS_INSERTERS_HPP_CHARACTER_MAJOR 1
00082 # define PANTHEIOS_VER_PANTHEIOS_INSERTERS_HPP_CHARACTER_MINOR 4
00083 # define PANTHEIOS_VER_PANTHEIOS_INSERTERS_HPP_CHARACTER_REVISION 1
00084 # define PANTHEIOS_VER_PANTHEIOS_INSERTERS_HPP_CHARACTER_EDIT 22
00085 #endif
00086
00087
00088
00089
00090
00091 #ifndef PANTHEIOS_INCL_PANTHEIOS_H_PANTHEIOS
00092 # include <pantheios/pantheios.h>
00093 #endif
00094 #ifndef PANTHEIOS_INCL_PANTHEIOS_INSERTERS_HPP_FMT
00095 # include <pantheios/inserters/fmt.hpp>
00096 #endif
00097
00098 #ifndef STLSOFT_INCL_STLSOFT_SHIMS_ACCESS_STRING_H_FWD
00099 # include <stlsoft/shims/access/string/fwd.h>
00100 #endif
00101
00102
00103
00104
00105
00106 #if !defined(PANTHEIOS_NO_NAMESPACE)
00107 namespace pantheios
00108 {
00109
00110 #endif
00111
00112
00113
00114
00115
00145 class character
00146 {
00147 public:
00149 typedef character class_type;
00150
00151 public:
00153 explicit character(char value);
00154
00155 private:
00156 explicit character(int);
00157
00158 public:
00160 pan_char_t const* data() const;
00162 pan_char_t const* c_str() const;
00164 size_t length() const;
00165
00166 private:
00167 pan_char_t m_value[2];
00168
00169 private:
00170 #if !defined(STLSOFT_COMPILER_IS_GCC)
00171 character(class_type const&);
00172 #endif
00173 class_type& operator =(class_type const&);
00174 };
00175
00176
00177
00178
00179
00180 #ifndef PANTHEIOS_DOCUMENTATION_SKIP_SECTION
00181
00182 # if !defined(PANTHEIOS_NO_NAMESPACE)
00183 namespace shims
00184 {
00185 # endif
00186
00188 # ifdef PANTHEIOS_USE_WIDE_STRINGS
00189 inline wchar_t const* c_str_data_w(character const& r)
00190 # else
00191 inline char const* c_str_data_a(character const& r)
00192 # endif
00193 {
00194 return r.data();
00195 }
00197 inline pan_char_t const* c_str_data(character const& r)
00198 {
00199 return r.data();
00200 }
00201
00203 # ifdef PANTHEIOS_USE_WIDE_STRINGS
00204 inline size_t c_str_len_w(character const& r)
00205 # else
00206 inline size_t c_str_len_a(character const& r)
00207 # endif
00208 {
00209 return r.length();
00210 }
00212 inline size_t c_str_len(character const& r)
00213 {
00214 return r.length();
00215 }
00216
00218 # ifdef PANTHEIOS_USE_WIDE_STRINGS
00219 inline wchar_t const* c_str_ptr_a(character const& r)
00220 # else
00221 inline char const* c_str_ptr_a(character const& r)
00222 # endif
00223 {
00224 return r.c_str();
00225 }
00227 inline pan_char_t const* c_str_ptr(character const& r)
00228 {
00229 return r.c_str();
00230 }
00231
00232 # if !defined(PANTHEIOS_NO_NAMESPACE)
00233 }
00234
00235 # if defined(STLSOFT_COMPILER_IS_GCC)
00236
00237
00238
00239
00240
00241 # ifdef PANTHEIOS_USE_WIDE_STRINGS
00242 using ::pantheios::shims::c_str_data_w;
00243 using ::pantheios::shims::c_str_len_w;
00244 using ::pantheios::shims::c_str_ptr_w;
00245 # else
00246 using ::pantheios::shims::c_str_data_a;
00247 using ::pantheios::shims::c_str_len_a;
00248 using ::pantheios::shims::c_str_ptr_a;
00249 # endif
00250 using ::pantheios::shims::c_str_data;
00251 using ::pantheios::shims::c_str_len;
00252 using ::pantheios::shims::c_str_ptr;
00253 # endif
00254
00255 # endif
00256
00257 #endif
00258
00259
00260
00261
00262
00263 inline character::character(char value)
00264 {
00265 m_value[0] = value;
00266 m_value[1] = '\0';
00267 }
00268
00269 inline pan_char_t const* character::data() const
00270 {
00271 return m_value;
00272 }
00273
00274 inline pan_char_t const* character::c_str() const
00275 {
00276 return m_value;
00277 }
00278
00279 inline size_t character::length() const
00280 {
00281 return 1;
00282 }
00283
00284
00285
00286
00287
00288 #if !defined(PANTHEIOS_NO_NAMESPACE)
00289 }
00290
00291 namespace stlsoft
00292 {
00293
00294
00295
00296
00297
00298
00299
00300 # ifdef PANTHEIOS_USE_WIDE_STRINGS
00301 using ::pantheios::shims::c_str_data_w;
00302 using ::pantheios::shims::c_str_len_w;
00303 using ::pantheios::shims::c_str_ptr_w;
00304 # else
00305 using ::pantheios::shims::c_str_data_a;
00306 using ::pantheios::shims::c_str_len_a;
00307 using ::pantheios::shims::c_str_ptr_a;
00308 # endif
00309 using ::pantheios::shims::c_str_data;
00310 using ::pantheios::shims::c_str_len;
00311 using ::pantheios::shims::c_str_ptr;
00312 }
00313
00314 #endif
00315
00316
00317
00318
00319
00320 #ifdef STLSOFT_PPF_pragma_once_SUPPORT
00321 # pragma once
00322 #endif
00323
00324
00325
00326 #endif
00327
00328