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
00047 #ifndef PANTHEIOS_INCL_PANTHEIOS_INSERTERS_HPP_BOOLEAN
00048 #define PANTHEIOS_INCL_PANTHEIOS_INSERTERS_HPP_BOOLEAN
00049
00050
00051
00052
00053
00054 #ifndef PANTHEIOS_DOCUMENTATION_SKIP_SECTION
00055 # define PANTHEIOS_VER_PANTHEIOS_INSERTERS_HPP_BOOLEAN_MAJOR 1
00056 # define PANTHEIOS_VER_PANTHEIOS_INSERTERS_HPP_BOOLEAN_MINOR 3
00057 # define PANTHEIOS_VER_PANTHEIOS_INSERTERS_HPP_BOOLEAN_REVISION 2
00058 # define PANTHEIOS_VER_PANTHEIOS_INSERTERS_HPP_BOOLEAN_EDIT 15
00059 #endif
00060
00061
00062
00063
00064
00065 #ifndef PANTHEIOS_INCL_PANTHEIOS_H_PANTHEIOS
00066 # include <pantheios/pantheios.h>
00067 #endif
00068
00069 #ifndef STLSOFT_INCL_STLSOFT_SHIMS_ACCESS_STRING_H_FWD
00070 # include <stlsoft/shims/access/string/fwd.h>
00071 #endif
00072
00073
00074
00075
00076
00077 #if !defined(PANTHEIOS_NO_NAMESPACE)
00078 namespace pantheios
00079 {
00080 #else
00081 # if defined(__RPCNDR_H__)
00082 # error pantheios::boolean may not be used with Windows when namespace is suspended. If you are including pantheios/inserters.hpp, try including only those specific inserter files that you need
00083 # endif
00084 #endif
00085
00086
00087
00088
00089
00112 class boolean
00113 {
00116 public:
00117 typedef boolean class_type;
00119
00122 public:
00126 explicit boolean(bool value)
00127 : m_value(value)
00128 {}
00129 private:
00130 class_type& operator =(class_type const&);
00132
00135 public:
00136 static void set_value_strings(pan_char_t const* falseName, pan_char_t const* trueName) ;
00138
00141 public:
00143 pan_char_t const* data() const
00144 {
00145 return get_slice_(m_value)->ptr;
00146 }
00148 pan_char_t const* c_str() const
00149 {
00150 return get_slice_(m_value)->ptr;
00151 }
00153 size_t length() const
00154 {
00155 return get_slice_(m_value)->len;
00156 }
00158
00161 private:
00162 static pan_slice_t const* get_slice_(bool value);
00164
00167 private:
00168 const bool m_value;
00170 };
00171
00172
00173
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
00187 # ifdef PANTHEIOS_USE_WIDE_STRINGS
00188
00189 inline wchar_t const* c_str_data_w(boolean const& b)
00190 {
00191 return b.data();
00192 }
00193 # else
00194
00195 inline char const* c_str_data_a(boolean const& b)
00196 {
00197 return b.data();
00198 }
00199 # endif
00200
00201 inline pan_char_t const* c_str_data(boolean const& b)
00202 {
00203 return b.data();
00204 }
00205
00206 # ifdef PANTHEIOS_USE_WIDE_STRINGS
00207
00208 inline size_t c_str_len_w(boolean const& b)
00209 {
00210 return b.length();
00211 }
00212 # else
00213
00214 inline size_t c_str_len_a(boolean const& b)
00215 {
00216 return b.length();
00217 }
00218 # endif
00219
00220 inline size_t c_str_len(boolean const& b)
00221 {
00222 return b.length();
00223 }
00224
00225 # ifdef PANTHEIOS_USE_WIDE_STRINGS
00226
00227 inline wchar_t const* c_str_ptr_w(boolean const& b)
00228 {
00229 return b.c_str();
00230 }
00231 # else
00232
00233 inline char const* c_str_ptr_a(boolean const& b)
00234 {
00235 return b.c_str();
00236 }
00237 # endif
00238
00239 inline pan_char_t const* c_str_ptr(boolean const& b)
00240 {
00241 return b.c_str();
00242 }
00243
00244 # if !defined(PANTHEIOS_NO_NAMESPACE)
00245 }
00246
00247 # if defined(STLSOFT_COMPILER_IS_GCC)
00248
00249
00250
00251
00252
00253 # ifdef PANTHEIOS_USE_WIDE_STRINGS
00254 using ::pantheios::shims::c_str_data_w;
00255 using ::pantheios::shims::c_str_len_w;
00256 using ::pantheios::shims::c_str_ptr_w;
00257 # else
00258 using ::pantheios::shims::c_str_data_a;
00259 using ::pantheios::shims::c_str_len_a;
00260 using ::pantheios::shims::c_str_ptr_a;
00261 # endif
00262 using ::pantheios::shims::c_str_data;
00263 using ::pantheios::shims::c_str_len;
00264 using ::pantheios::shims::c_str_ptr;
00265 # endif
00266
00267 # endif
00268
00269 #endif
00270
00271
00272
00273
00274
00275 #if !defined(PANTHEIOS_NO_NAMESPACE)
00276 }
00277
00278 namespace stlsoft
00279 {
00280
00281
00282
00283
00284
00285
00286
00287 # ifdef PANTHEIOS_USE_WIDE_STRINGS
00288 using ::pantheios::shims::c_str_data_w;
00289 using ::pantheios::shims::c_str_len_w;
00290 using ::pantheios::shims::c_str_ptr_w;
00291 # else
00292 using ::pantheios::shims::c_str_data_a;
00293 using ::pantheios::shims::c_str_len_a;
00294 using ::pantheios::shims::c_str_ptr_a;
00295 # endif
00296
00297 using ::pantheios::shims::c_str_data;
00298 using ::pantheios::shims::c_str_len;
00299 using ::pantheios::shims::c_str_ptr;
00300 }
00301
00302 #endif
00303
00304
00305
00306
00307
00308 #ifdef STLSOFT_PPF_pragma_once_SUPPORT
00309 # pragma once
00310 #endif
00311
00312
00313
00314 #endif
00315
00316