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
00049 #ifndef PANTHEIOS_INCL_PANTHEIOS_INSERTERS_HPP_B64
00050 #define PANTHEIOS_INCL_PANTHEIOS_INSERTERS_HPP_B64
00051
00052
00053
00054
00055
00056 #ifndef PANTHEIOS_DOCUMENTATION_SKIP_SECTION
00057 # define PANTHEIOS_VER_PANTHEIOS_INSERTERS_HPP_B64_MAJOR 1
00058 # define PANTHEIOS_VER_PANTHEIOS_INSERTERS_HPP_B64_MINOR 4
00059 # define PANTHEIOS_VER_PANTHEIOS_INSERTERS_HPP_B64_REVISION 3
00060 # define PANTHEIOS_VER_PANTHEIOS_INSERTERS_HPP_B64_EDIT 23
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
00075
00076 #ifdef PANTHEIOS_NO_NAMESPACE
00077
00078
00079
00080
00081
00082
00083
00084
00085
00086
00087
00088
00089 # ifdef B64_INCL_B64_H_B64
00090 # error Cannot include b64/b64.h before pantheios/inserters/b64.hpp
00091 # endif
00092
00093 # define B64_CUSTOM_NAMESPACE b64_api
00094
00095 #endif
00096
00097 #include <b64/b64.h>
00098
00099
00100
00101
00102
00103 #ifdef PANTHEIOS_NO_NAMESPACE
00104
00105 # if !defined(B64_VER) || \
00106 B64_VER < 0x010301ff
00107 # error Version 1.3.1 (or later) of b64 is required
00108 # endif
00109
00110 #else
00111
00112
00113
00114
00115
00116
00117 namespace b64_api = ::b64;
00118
00119 #endif
00120
00121
00122
00123 #ifndef STLSOFT_INCL_STLSOFT_SHIMS_ACCESS_STRING_H_FWD
00124 # include <stlsoft/shims/access/string/fwd.h>
00125 #endif
00126
00127
00128 #ifndef PANTHEIOS_INCL_H_STDIO
00129 # define PANTHEIOS_INCL_H_STDIO
00130 # include <stdio.h>
00131 #endif
00132
00133
00134
00135
00136
00137 #if !defined(PANTHEIOS_NO_NAMESPACE)
00138 namespace pantheios
00139 {
00140
00141 #endif
00142
00143
00144
00145
00146
00203 class b64
00204 {
00207 public:
00208 typedef b64 class_type;
00209 typedef b64_api::B64_RC B64_RC;
00211
00214 public:
00215 b64( void const* pv
00216 , size_t cb);
00217
00218 b64( void const* pv
00219 , size_t cb
00220 , unsigned flags);
00221
00222 b64( void const* pv
00223 , size_t cb
00224 , unsigned flags
00225 , int lineLen
00226 , B64_RC* rc = NULL);
00227
00228 ~b64() stlsoft_throw_0();
00230
00233 public:
00235 pan_char_t const* data() const;
00237 pan_char_t const* c_str() const;
00239 size_t length() const;
00241
00244 private:
00245 void construct_() const;
00246 void construct_();
00248
00251 private:
00252 pan_char_t const* m_value;
00253 size_t m_len;
00254 void const* m_pv;
00255 size_t m_cb;
00256 unsigned m_flags;
00257 int m_lineLen;
00258 B64_RC* m_rc;
00260
00263 private:
00264 #if !defined(STLSOFT_COMPILER_IS_GCC)
00265 b64(class_type const&);
00266 #endif
00267 class_type& operator =(class_type const&);
00269 };
00270
00271
00272
00273
00274
00275 #ifndef PANTHEIOS_DOCUMENTATION_SKIP_SECTION
00276
00277 # if !defined(PANTHEIOS_NO_NAMESPACE)
00278 namespace shims
00279 {
00280 # endif
00281
00283 # ifdef PANTHEIOS_USE_WIDE_STRINGS
00284 inline wchar_t const* c_str_data_w(b64 const& i)
00285 {
00286 return i.data();
00287 }
00288 # else
00289 inline char const* c_str_data_a(b64 const& i)
00290 {
00291 return i.data();
00292 }
00293 # endif
00294
00295 inline pan_char_t const* c_str_data(b64 const& i)
00296 {
00297 return i.data();
00298 }
00299
00301 # ifdef PANTHEIOS_USE_WIDE_STRINGS
00302 inline size_t c_str_len_w(b64 const& i)
00303 # else
00304 inline size_t c_str_len_a(b64 const& i)
00305 # endif
00306 {
00307 return i.length();
00308 }
00310 inline size_t c_str_len(b64 const& i)
00311 {
00312 return i.length();
00313 }
00314
00316 # ifdef PANTHEIOS_USE_WIDE_STRINGS
00317 inline wchar_t const* c_str_ptr_w(b64 const& i)
00318 {
00319 return i.c_str();
00320 }
00321 # else
00322 inline char const* c_str_ptr_a(b64 const& i)
00323 {
00324 return i.c_str();
00325 }
00326 # endif
00327
00328 inline pan_char_t const* c_str_ptr(b64 const& i)
00329 {
00330 return i.c_str();
00331 }
00332
00333 # if !defined(PANTHEIOS_NO_NAMESPACE)
00334 }
00335
00336 # if defined(STLSOFT_COMPILER_IS_GCC)
00337
00338
00339
00340
00341
00342 # ifdef PANTHEIOS_USE_WIDE_STRINGS
00343 using ::pantheios::shims::c_str_data_w;
00344 using ::pantheios::shims::c_str_len_w;
00345 using ::pantheios::shims::c_str_ptr_w;
00346 # else
00347 using ::pantheios::shims::c_str_data_a;
00348 using ::pantheios::shims::c_str_len_a;
00349 using ::pantheios::shims::c_str_ptr_a;
00350 # endif
00351 using ::pantheios::shims::c_str_data;
00352 using ::pantheios::shims::c_str_len;
00353 using ::pantheios::shims::c_str_ptr;
00354 # endif
00355
00356 # endif
00357
00358 #endif
00359
00360
00361
00362
00363
00364 #if !defined(PANTHEIOS_NO_NAMESPACE)
00365 }
00366
00367 namespace stlsoft
00368 {
00369
00370
00371
00372
00373
00374
00375
00376 # ifdef PANTHEIOS_USE_WIDE_STRINGS
00377 using ::pantheios::shims::c_str_data_w;
00378 using ::pantheios::shims::c_str_len_w;
00379 using ::pantheios::shims::c_str_ptr_w;
00380 # else
00381 using ::pantheios::shims::c_str_data_a;
00382 using ::pantheios::shims::c_str_len_a;
00383 using ::pantheios::shims::c_str_ptr_a;
00384 # endif
00385 using ::pantheios::shims::c_str_data;
00386 using ::pantheios::shims::c_str_len;
00387 using ::pantheios::shims::c_str_ptr;
00388 }
00389
00390 #endif
00391
00392
00393
00394
00395
00396 #ifdef STLSOFT_PPF_pragma_once_SUPPORT
00397 # pragma once
00398 #endif
00399
00400
00401
00402 #endif
00403
00404