22#ifndef _STLP_STRING_BASE_H
23#define _STLP_STRING_BASE_H
40template <
class _Tp,
class _Alloc>
53#if defined (_STLP_USE_SHORT_STRING_OPTIM)
55 _Tp* _M_end_of_storage;
56 _Tp _M_static_buf[_DEFAULT_SIZE];
62#if defined (_STLP_USE_SHORT_STRING_OPTIM)
63 bool _M_using_static_buf()
const
68 {
return _M_using_static_buf() ? _M_buffers._M_static_buf +
_DEFAULT_SIZE : _M_buffers._M_end_of_storage; }
70 {
return _M_using_static_buf() ? _M_buffers._M_static_buf +
_DEFAULT_SIZE : _M_buffers._M_end_of_storage; }
95#if defined (_STLP_USE_SHORT_STRING_OPTIM)
107 return (
min)(__alloc_max_size, __string_max_size) - 1;
111#if defined (_STLP_USE_SHORT_STRING_OPTIM)
119#if defined (_STLP_USE_SHORT_STRING_OPTIM)
127#if defined (_STLP_USE_SHORT_STRING_OPTIM)
129 if (
src._M_using_static_buf()) {
130 _M_buffers =
src._M_buffers;
131 _M_finish = _M_buffers._M_static_buf + (
src._M_finish -
src._M_start_of_storage._M_data);
137 _M_buffers._M_end_of_storage =
src._M_buffers._M_end_of_storage;
138 src._M_start_of_storage._M_data = 0;
143#if !defined (_STLP_NO_MOVE_SEMANTIC)
145# if defined (_STLP_USE_SHORT_STRING_OPTIM)
147 _M_move_src(
src.get());
158 void _M_reset(_Tp *__start, _Tp *__finish, _Tp *__end_of_storage) {
159#if defined (_STLP_USE_SHORT_STRING_OPTIM)
160 _M_buffers._M_end_of_storage = __end_of_storage;
169#if defined (_STLP_USE_SHORT_STRING_OPTIM)
170 if (_M_using_static_buf()) {
171 if (__s._M_using_static_buf()) {
172 _STLP_STD::swap(_M_buffers, __s._M_buffers);
185 else if (__s._M_using_static_buf()) {
188 _Tp *__tmp_end_data = _M_buffers._M_end_of_storage;
189 _M_buffers = __s._M_buffers;
193 _M_finish = _M_buffers._M_static_buf + (__s.
_M_finish - __s._M_buffers._M_static_buf);
214#if defined (_STLP_USE_TEMPLATE_EXPORT)
216# if defined (_STLP_HAS_WCHAR_T)
#define _STLP_FORCE_ALLOCATORS(a, y)
_AllocProxy _M_start_of_storage
_STLP_alloc_proxy< _Tp *, _Tp, allocator_type > _AllocProxy
_String_base< _Tp, _Alloc > _Self
_Tp const * _M_Finish() const
void _STLP_FUNCTION_THROWS _M_throw_out_of_range() const
_String_base(__move_source< _Self > src)
void _M_reset(_Tp *__start, _Tp *__finish, _Tp *__end_of_storage)
_String_base(const allocator_type &__a)
void _M_allocate_block(size_t __n=_DEFAULT_SIZE)
_String_base(const allocator_type &__a, size_t __n)
void _STLP_FUNCTION_THROWS _M_throw_length_error() const
_Tp const * _M_Start() const
size_type _M_rest() const
size_type _M_capacity() const
_Tp const * _M_End() const
void _M_deallocate_block()
#define _STLP_FUNCTION_THROWS
#define _STLP_MOVE_TO_STD_NAMESPACE
#define _STLP_EXPORT_TEMPLATE_CLASS
#define _STLP_BEGIN_NAMESPACE
#define _STLP_END_NAMESPACE
#define _STLP_MOVE_TO_PRIV_NAMESPACE