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
00048 #ifndef ACESTL_INCL_ACESTL_SHIMS_ACCESS_STRING_HPP_STRING_BASE
00049 #define ACESTL_INCL_ACESTL_SHIMS_ACCESS_STRING_HPP_STRING_BASE
00050
00051 #ifndef STLSOFT_DOCUMENTATION_SKIP_SECTION
00052 # define ACESTL_VER_ACESTL_SHIMS_ACCESS_STRING_HPP_STRING_BASE_MAJOR 2
00053 # define ACESTL_VER_ACESTL_SHIMS_ACCESS_STRING_HPP_STRING_BASE_MINOR 0
00054 # define ACESTL_VER_ACESTL_SHIMS_ACCESS_STRING_HPP_STRING_BASE_REVISION 2
00055 # define ACESTL_VER_ACESTL_SHIMS_ACCESS_STRING_HPP_STRING_BASE_EDIT 31
00056 #endif
00057
00058
00059
00060
00061
00062 #ifndef ACESTL_INCL_ACESTL_HPP_ACESTL
00063 # include <acestl/acestl.hpp>
00064 #endif
00065 #ifndef STLSOFT_INCL_STLSOFT_SHIMS_ACCESS_HPP_STRING
00066 # include <stlsoft/shims/access/string.hpp>
00067 #endif
00068
00069 #ifndef STLSOFT_INCL_ACE_H_STRING_BASE
00070 # define STLSOFT_INCL_ACE_H_STRING_BASE
00071 # include <ace/String_Base.h>
00072 #endif
00073
00074 #ifdef STLSOFT_UNITTEST
00075 # include <string.h>
00076 #endif
00077
00078
00079
00080
00081
00082 #ifndef _ACESTL_NO_NAMESPACE
00083 # if defined(_STLSOFT_NO_NAMESPACE) || \
00084 defined(STLSOFT_DOCUMENTATION_SKIP_SECTION)
00085
00086 namespace acestl
00087 {
00088 # else
00089
00090
00091 namespace stlsoft
00092 {
00093
00094 namespace acestl_project
00095 {
00096
00097 # endif
00098 #endif
00099
00100
00101
00102
00103
00104
00105
00106 #ifndef STLSOFT_DOCUMENTATION_SKIP_SECTION
00107
00108 inline as_char_a_t const* c_str_data_a(ACE_String_Base<as_char_a_t> const& s)
00109 {
00110 return s.c_str();
00111 }
00112 inline as_char_w_t const* c_str_data_w(ACE_String_Base<as_char_w_t> const& s)
00113 {
00114 return s.c_str();
00115 }
00116
00117 #endif
00118
00124 template <ss_typename_param_k C>
00125 inline C const* c_str_data(ACE_String_Base<C> const& s)
00126 {
00127 return s.c_str();
00128 }
00129
00130
00131
00132 #ifndef STLSOFT_DOCUMENTATION_SKIP_SECTION
00133
00134 inline as_size_t c_str_len_a(ACE_String_Base<as_char_a_t> const& s)
00135 {
00136 return s.length();
00137 }
00138 inline as_size_t c_str_len_w(ACE_String_Base<as_char_w_t> const& s)
00139 {
00140 return s.length();
00141 }
00142
00143 #endif
00144
00150 template <ss_typename_param_k C>
00151 inline as_size_t c_str_len(ACE_String_Base<C> const& s)
00152 {
00153 return s.length();
00154 }
00155
00156
00157
00158 #ifndef STLSOFT_DOCUMENTATION_SKIP_SECTION
00159
00160 inline as_char_a_t const* c_str_ptr_a(ACE_String_Base<as_char_a_t> const& s)
00161 {
00162 return s.c_str();
00163 }
00164 inline as_char_w_t const* c_str_ptr_w(ACE_String_Base<as_char_w_t> const& s)
00165 {
00166 return s.c_str();
00167 }
00168
00169 #endif
00170
00176 template <ss_typename_param_k C>
00177 inline C const* c_str_ptr(ACE_String_Base<C> const& s)
00178 {
00179 return s.c_str();
00180 }
00181
00182
00183
00184 #ifndef STLSOFT_DOCUMENTATION_SKIP_SECTION
00185
00186 inline as_char_a_t const* c_str_ptr_null_a(ACE_String_Base<as_char_a_t> const& s)
00187 {
00188 return (0 != s.length()) ? s.c_str() : NULL;
00189 }
00190 inline as_char_w_t const* c_str_ptr_null_w(ACE_String_Base<as_char_w_t> const& s)
00191 {
00192 return (0 != s.length()) ? s.c_str() : NULL;
00193 }
00194
00195 #endif
00196
00202 template <ss_typename_param_k C>
00203 inline C const* c_str_ptr_null(ACE_String_Base<C> const& s)
00204 {
00205 return (0 != s.length()) ? s.c_str() : NULL;
00206 }
00207
00208
00209
00215 template< ss_typename_param_k S
00216 , ss_typename_param_k C
00217 >
00218 inline S& operator <<(S& s, ACE_String_Base<C> const& str)
00219 {
00220 s.write(str.fast_rep(), str.length());
00221
00222 return s;
00223 }
00224
00225
00226
00227 #ifndef _ACESTL_NO_NAMESPACE
00228 # if defined(_STLSOFT_NO_NAMESPACE) || \
00229 defined(STLSOFT_DOCUMENTATION_SKIP_SECTION)
00230 }
00231 # else
00232 }
00233 }
00234 # endif
00235
00241 template< ss_typename_param_k S
00242 , ss_typename_param_k C
00243 >
00244 inline S& operator <<(S& s, ACE_String_Base<C> const& str)
00245 {
00246 s.write(str.fast_rep(), str.length());
00247
00248 return s;
00249 }
00250
00251 namespace stlsoft
00252 {
00253
00254 using ::acestl::c_str_data;
00255 using ::acestl::c_str_data_a;
00256 using ::acestl::c_str_data_w;
00257
00258 using ::acestl::c_str_len;
00259 using ::acestl::c_str_len_a;
00260 using ::acestl::c_str_len_w;
00261
00262 using ::acestl::c_str_ptr;
00263 using ::acestl::c_str_ptr_a;
00264 using ::acestl::c_str_ptr_w;
00265
00266 using ::acestl::c_str_ptr_null;
00267 using ::acestl::c_str_ptr_null_a;
00268 using ::acestl::c_str_ptr_null_w;
00269
00270 }
00271
00272 #endif
00273
00275
00276
00277 #ifdef STLSOFT_UNITTEST
00278
00279 # ifndef _ACESTL_NO_NAMESPACE
00280 # if defined(_STLSOFT_NO_NAMESPACE)
00281
00282 namespace acestl
00283 {
00284 # else
00285
00286
00287 namespace stlsoft
00288 {
00289
00290 namespace acestl_project
00291 {
00292
00293 # endif
00294 # endif
00295
00296 # include "./unittest/string_base_unittest_.h"
00297
00298 # ifndef _ACESTL_NO_NAMESPACE
00299 # if defined(_STLSOFT_NO_NAMESPACE)
00300 }
00301 # else
00302 }
00303 }
00304 # endif
00305 # endif
00306
00307 #endif
00308
00309
00310
00311 #endif
00312
00313