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_EXCEPTION
00048 #define PANTHEIOS_INCL_PANTHEIOS_INSERTERS_HPP_EXCEPTION
00049
00050
00051
00052
00053
00054 #ifndef PANTHEIOS_DOCUMENTATION_SKIP_SECTION
00055 # define PANTHEIOS_VER_PANTHEIOS_INSERTERS_HPP_EXCEPTION_MAJOR 1
00056 # define PANTHEIOS_VER_PANTHEIOS_INSERTERS_HPP_EXCEPTION_MINOR 0
00057 # define PANTHEIOS_VER_PANTHEIOS_INSERTERS_HPP_EXCEPTION_REVISION 1
00058 # define PANTHEIOS_VER_PANTHEIOS_INSERTERS_HPP_EXCEPTION_EDIT 2
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 #include <exception>
00074
00075
00076
00077
00078
00079 #if !defined(PANTHEIOS_NO_NAMESPACE)
00080 namespace pantheios
00081 {
00082 #endif
00083
00084
00085
00086
00087
00088 #ifndef PANTHEIOS_DOCUMENTATION_SKIP_SECTION
00089
00090 # if !defined(PANTHEIOS_NO_NAMESPACE)
00091 namespace inserters
00092 {
00093 # endif
00094
00095 class exception_inserter
00096 {
00097 public:
00098 typedef exception_inserter class_type;
00099
00100 public:
00101 explicit exception_inserter(std::exception const& x);
00102 private:
00103 #if !defined(STLSOFT_COMPILER_IS_GCC)
00104
00105 #endif
00106 class_type& operator =(class_type const&);
00107
00108 public:
00109 pan_char_t const* c_str() const;
00110 pan_char_t const* data() const;
00111 size_t length() const;
00112
00113 private:
00114 void construct_() const;
00115 void construct_();
00116
00117 private:
00118 pan_char_t* m_value;
00119 size_t m_len;
00120 std::exception const& m_x;
00121 };
00122
00123 # if !defined(PANTHEIOS_NO_NAMESPACE)
00124 }
00125 # endif
00126
00127 #endif
00128
00129
00130
00131
00132
00137 #ifdef PANTHEIOS_USE_WIDE_STRINGS
00138
00139 inline
00140 # if !defined(PANTHEIOS_NO_NAMESPACE)
00141 inserters::
00142 # endif
00143 exception_inserter exception(
00144 std::exception const& x
00145 )
00146 {
00147 return
00148 # if !defined(PANTHEIOS_NO_NAMESPACE)
00149 inserters::
00150 # endif
00151 exception_inserter(x);
00152 }
00153
00154 #else
00155
00156 inline std::exception const& exception(
00157 std::exception const& x
00158 )
00159 {
00160 return x;
00161 }
00162
00163 #endif
00164
00165
00166
00167
00168
00169 #ifndef PANTHEIOS_DOCUMENTATION_SKIP_SECTION
00170
00171 # ifdef PANTHEIOS_USE_WIDE_STRINGS
00172
00173 # if !defined(PANTHEIOS_NO_NAMESPACE)
00174 namespace shims
00175 {
00176 using inserters::exception_inserter;
00177 # endif
00178
00180 inline wchar_t const* c_str_data_w(exception_inserter const& i)
00181 {
00182 return i.data();
00183 }
00185 inline pan_char_t const* c_str_data(exception_inserter const& i)
00186 {
00187 return i.data();
00188 }
00189
00191 inline size_t c_str_len_w(exception_inserter const& i)
00192 {
00193 return i.length();
00194 }
00196 inline size_t c_str_len(exception_inserter const& i)
00197 {
00198 return i.length();
00199 }
00200
00202 inline wchar_t const* c_str_ptr_w(exception_inserter const& i)
00203 {
00204 return i.c_str();
00205 }
00207 inline pan_char_t const* c_str_ptr(exception_inserter const& i)
00208 {
00209 return i.c_str();
00210 }
00211
00212 # if !defined(PANTHEIOS_NO_NAMESPACE)
00213 }
00214
00215 # if defined(STLSOFT_COMPILER_IS_GCC)
00216
00217
00218
00219
00220
00221 using ::pantheios::shims::c_str_data_w;
00222 using ::pantheios::shims::c_str_len_w;
00223 using ::pantheios::shims::c_str_ptr_w;
00224 using ::pantheios::shims::c_str_data;
00225 using ::pantheios::shims::c_str_len;
00226 using ::pantheios::shims::c_str_ptr;
00227 # endif
00228
00229 # endif
00230
00231 # endif
00232
00233 #endif
00234
00235
00236
00237
00238
00239 #if !defined(PANTHEIOS_NO_NAMESPACE)
00240 }
00241
00242 # ifdef PANTHEIOS_USE_WIDE_STRINGS
00243
00244 namespace stlsoft
00245 {
00246
00247
00248
00249
00250
00251
00252
00253 using ::pantheios::shims::c_str_data_w;
00254 using ::pantheios::shims::c_str_len_w;
00255 using ::pantheios::shims::c_str_ptr_w;
00256 using ::pantheios::shims::c_str_data;
00257 using ::pantheios::shims::c_str_len;
00258 using ::pantheios::shims::c_str_ptr;
00259 }
00260
00261 # endif
00262
00263 #endif
00264
00265
00266
00267
00268
00269 #ifdef STLSOFT_PPF_pragma_once_SUPPORT
00270 # pragma once
00271 #endif
00272
00273
00274
00275 #endif
00276
00277