27#ifndef _STLP_ROPEIMPL_H
28#define _STLP_ROPEIMPL_H
30#ifndef _STLP_INTERNAL_ROPE_H
34#ifndef _STLP_INTERNAL_CSTDIO
38#if !defined (_STLP_USE_NO_IOSTREAMS)
39# ifndef _STLP_INTERNAL_OSTREAM_H
43# ifndef _STLP_INTERNAL_ISTREAM
52#if defined ( _STLP_NESTED_TYPE_PARAM_BUG )
53# define __allocator__ _Alloc
55# define __allocator__ allocator_type
58template<
class _CharT,
class _Alloc>
63template<
class _CharT,
class _Alloc>
75template<
class _CharT,
class _Alloc>
77 _CharT* __cstr = _M_c_string;
79 size_t _p_size = _M_size._M_data + 1;
80 _STLP_STD::_Destroy_Range(__cstr, __cstr + _p_size);
81 _M_size.deallocate(__cstr, _p_size);
89template <
class _CharT,
class _Alloc>
97 case _RopeRep::_S_leaf:
103 case _RopeRep::_S_function:
104 case _RopeRep::_S_substringfn:
106 size_t __len = _S_iterator_buf_len;
107 size_t __buf_start_pos = __leaf_pos;
112 if (__buf_start_pos + __len <= __pos) {
113 __buf_start_pos = __pos - __len/4;
114 if (__buf_start_pos + __len > __leaf_end) {
115 __buf_start_pos = __leaf_end - __len;
118 if (__buf_start_pos + __len > __leaf_end) {
119 __len = __leaf_end - __buf_start_pos;
121 (*__fn)(__buf_start_pos - __leaf_pos, __len, __x.
_M_tmp_buf._M_data);
135template <
class _CharT,
class _Alloc>
138 const _RopeRep* __path[_RopeRep::_S_max_rope_depth+1];
140 int __curr_depth = -1;
141 size_t __curr_start_pos = 0;
143 unsigned char __dirns = 0;
163 _STLP_ASSERT(__curr_depth <= _RopeRep::_S_max_rope_depth)
164 __path[__curr_depth] = __curr_rope;
165 switch(__curr_rope->
_M_tag) {
166 case _RopeRep::_S_leaf:
167 case _RopeRep::_S_function:
168 case _RopeRep::_S_substringfn:
171 case _RopeRep::_S_concat:
178 if (__pos >= __curr_start_pos + __left_len) {
180 __curr_rope =
__c->_M_right;
181 __curr_start_pos += __left_len;
183 __curr_rope = __left;
193 int __j = __curr_depth + 1 - _S_path_cache_len;
195 if (__j < 0) __j = 0;
196 while (__j <= __curr_depth) {
207template <
class _CharT,
class _Alloc>
225 while (--__current_index >= 0) {
228 __current_node = __x.
_M_path_end._M_data[__current_index];
232 __node_start_pos -=
__c->_M_left->_M_size._M_data;
235 if (__current_index < 0) {
240 __current_node = __x.
_M_path_end._M_data[__current_index];
245 __node_start_pos +=
__c->_M_left->_M_size._M_data;
246 __current_node =
__c->_M_right;
247 __x.
_M_path_end._M_data[++__current_index] = __current_node;
249 while (_RopeRep::_S_concat == __current_node->
_M_tag) {
251 if (_S_path_cache_len == __current_index) {
253 for (__i = 0; __i < _S_path_cache_len-1; ++__i) {
259 __x.
_M_path_end._M_data[__current_index] = __current_node;
269template <
class _CharT,
class _Alloc>
271 _M_current_pos +=
__n;
272 if (0 != _M_buf_ptr) {
273 size_t __chars_left = _M_buf_end - _M_buf_ptr;
274 if (__chars_left >
__n) {
276 }
else if (__chars_left ==
__n) {
278 _S_setcache_for_incr(*
this);
285template <
class _CharT,
class _Alloc>
287 if (0 != _M_buf_ptr) {
288 size_t __chars_left = _M_buf_ptr - _M_buf_start;
289 if (__chars_left >=
__n) {
295 _M_current_pos -=
__n;
298template <
class _CharT,
class _Alloc>
300 if (_M_root_rope->_M_tree_ptr._M_data != this->_M_root) {
302 _RopeRep::_S_unref(this->_M_root);
303 this->_M_root = _M_root_rope->_M_tree_ptr._M_data;
304 _RopeRep::_S_ref(this->_M_root);
305 this->_M_buf_ptr = 0;
315template <
class _CharT,
class _Alloc>
322 _STLP_STD::_Destroy(__l);
324 _RopeLeaf).deallocate(__l, 1);
331 _STLP_STD::_Destroy(
__c);
333 _RopeConcatenation).deallocate(
__c, 1);
340 _STLP_STD::_Destroy(__f);
342 _RopeFunction).deallocate(__f, 1);
348 _RopeSubstring* __rss =
__STATIC_CAST(_RopeSubstring*,
this);
349 _STLP_STD::_Destroy(__rss);
351 _RopeSubstring).deallocate(__rss, 1);
357# if defined ( _STLP_NESTED_TYPE_PARAM_BUG )
358# define __RopeLeaf__ _Rope_RopeLeaf<_CharT,_Alloc>
359# define __RopeRep__ _Rope_RopeRep<_CharT,_Alloc>
360# define _RopeLeaf _Rope_RopeLeaf<_CharT,_Alloc>
361# define _RopeRep _Rope_RopeRep<_CharT,_Alloc>
362# define size_type size_t
364# define __RopeLeaf__ _STLP_TYPENAME_ON_RETURN_TYPE rope<_CharT,_Alloc>::_RopeLeaf
365# define __RopeRep__ _STLP_TYPENAME_ON_RETURN_TYPE rope<_CharT,_Alloc>::_RopeRep
368template <
class _CharT,
class _Alloc>
375template <
class _CharT,
class _Alloc>
378 _RopeLeaf* __r,
const _CharT* __iter,
size_t __len) {
380 _CharT* __new_data = __r->
_M_size.
allocate(_S_rounded_up_size(__old_len + __len));
387 __result = _S_new_RopeLeaf(__new_data, __old_len + __len, __r->
get_allocator());
389 _STLP_UNWIND(_RopeRep::_S_free_string(__new_data, __old_len + __len,
394template <
class _CharT,
class _Alloc>
401template <
class _CharT,
class _Alloc>
411template <
class _CharT,
class _Alloc>
417 return _S_leaf_concat_char_iter(__r, __iter, __len);
421 if (_S_rounded_up_size(__old_len) == _S_rounded_up_size(__old_len + __len)) {
432 _RopeLeaf* __result = _S_leaf_concat_char_iter(__r, __iter, __len);
441template <
class _CharT,
class _Alloc>
445 _S_new_RopeConcatenation(__left, __right, __left->
get_allocator());
446 size_t __depth = __result->
_M_depth;
450 __depth > _RopeRep::_S_max_rope_depth)) {
454 __balanced = _S_balance(__result);
472template <
class _CharT,
class _Alloc>
475 const _CharT*__s,
size_t __slen) {
482 return _S_RopeLeaf_from_unowned_char_ptr(__s, __slen, __r->
get_allocator());
483 if (_RopeRep::_S_leaf == __r->
_M_tag &&
485 __result = _S_leaf_concat_char_iter((
_RopeLeaf*)__r, __s, __slen);
489 if (_RopeRep::_S_concat == __r->
_M_tag &&
497 __result = _S_tree_concat(__left, __nright);
505 _S_RopeLeaf_from_unowned_char_ptr(__s, __slen, __r->
get_allocator());
508 __result = _S_tree_concat(__r, __nright);
515template <
class _CharT,
class _Alloc>
518 _RopeRep* __r,
const _CharT* __s,
size_t __slen) {
521 return _S_RopeLeaf_from_unowned_char_ptr(__s, __slen,
528 return _S_concat_char_iter(__r, __s, __slen);
534 if (__orig_size + __slen <= _S_copy_max && _RopeRep::_S_leaf == __r->_M_tag) {
535 return _S_destr_leaf_concat_char_iter((
_RopeLeaf*)__r, __s, __slen);
537 if (_RopeRep::_S_concat == __r->
_M_tag) {
539 if (_RopeRep::_S_leaf == __right->
_M_tag &&
541 _RopeRep* __new_right = _S_destr_leaf_concat_char_iter(__right, __s, __slen);
542 if (__right == __new_right) {
565 _S_RopeLeaf_from_unowned_char_ptr(__s, __slen, __r->
get_allocator());
568 __result = _S_tree_concat(__r, __right);
575template <
class _CharT,
class _Alloc>
586 if (_RopeRep::_S_leaf == __right->
_M_tag) {
587 if (_RopeRep::_S_leaf == __left->
_M_tag) {
593 }
else if (_RopeRep::_S_concat == __left->
_M_tag &&
599 _RopeRep* __rest = _S_leaf_concat_char_iter(__leftright,
604 return _S_tree_concat(__leftleft, __rest);
613 return _S_tree_concat(__left, __right);
619template <
class _CharT,
class _Alloc>
622 size_t __start,
size_t __endp1) {
623 if (0 == __base)
return 0;
626 const size_t __lazy_threshold = 128;
628 if (__endp1 >= __len) {
636 __adj_endp1 = __endp1;
639 case _RopeRep::_S_concat:
647 if (__adj_endp1 <= __left_len) {
648 return _S_substring(__left, __start, __endp1);
649 }
else if (__start >= __left_len) {
650 return _S_substring(__right, __start - __left_len,
651 __adj_endp1 - __left_len);
656 __result = _S_concat_rep(__left_result, __right_result);
661 case _RopeRep::_S_leaf:
666 if (__start >= __adj_endp1)
return 0;
667 __result_len = __adj_endp1 - __start;
668 if (__result_len > __lazy_threshold)
goto lazy;
669 const _CharT* __section = __l->
_M_data + __start;
671 __result = _S_RopeLeaf_from_unowned_char_ptr(__section, __result_len,
675 case _RopeRep::_S_substringfn:
680 if (__start >= __adj_endp1)
return 0;
681 __result_len = __adj_endp1 - __start;
682 if (__result_len > __lazy_threshold) {
685 __adj_endp1 - __start,
690 case _RopeRep::_S_function:
693 if (__start >= __adj_endp1)
return 0;
694 size_t __result_len = __adj_endp1 - __start;
696 if (__result_len > __lazy_threshold)
goto lazy;
697 _CharT* __section = __base->
_M_size.
allocate(_S_rounded_up_size(__result_len));
699 (*(__f->
_M_fn))(__start, __result_len, __section);
704 return _S_new_RopeLeaf(__section, __result_len,
713 return _S_new_RopeSubstring(__base, __start, __adj_endp1 - __start,
718template<
class _CharT>
734template<
class _CharT>
745 for (__i = 0; __i <
__n; ++__i) {
754#if !defined (_STLP_USE_NO_IOSTREAMS)
755template<
class _CharT,
class _Traits>
774template<
class _CharT,
class _Traits>
776 (
const _CharT* __leaf,
size_t __n) {
779 for (__i = 0; __i <
__n; ++__i) _M_o.put(__leaf[__i]);
784template <
class _CharT,
class _Alloc,
class _CharConsumer>
787 size_t __begin,
size_t __end) {
793 if (0 == __r)
return true;
795 case _RopeRep::_S_concat:
797 _RopeConcatenation* __conc =
__STATIC_CAST(_RopeConcatenation*, __r);
798 _RopeRep* __left = __conc->_M_left;
799 size_t __left_len = __left->_M_size._M_data;
800 if (__begin < __left_len) {
801 size_t __left_end = (
min) (__left_len, __end);
805 if (__end > __left_len) {
806 _RopeRep* __right = __conc->_M_right;
807 size_t __right_start = (
max)(__left_len, __begin);
809 __right_start - __left_len,
810 __end - __left_len)) {
816 case _RopeRep::_S_leaf:
819 return __c(__l->_M_data + __begin, __end - __begin);
821 case _RopeRep::_S_function:
822 case _RopeRep::_S_substringfn:
825 size_t __len = __end - __begin;
829 (*(__f->_M_fn))(__begin, __len, __buffer);
830 __result =
__c(__buffer, __len);
843#if !defined (_STLP_USE_NO_IOSTREAMS)
844template<
class _CharT,
class _Traits>
846 char __f = __o.
fill();
850template<
class _CharT,
class _Traits,
class _Alloc>
854 const bool __left = (__o.
flags() & ios::left) != 0;
855 size_t __rope_len = __r.
size();
860 streamsize __pad_len = __need_pad ? __w - __rope_len : 0;
862 if (!__left && __pad_len > 0) {
866 if (__left && __pad_len > 0) {
872template<
class _CharT,
class _Traits,
class _Alloc>
876 size_t __rope_len = __r.
size();
879 __o.
width(__w /__rope_len);
888template<
class _CharT,
class _Traits,
class _Alloc>
892 return _S_io_get(__o, __r, _Char_Is_Integral());
896template <
class _CharT,
class _Alloc>
898 size_t __start,
size_t __len,
902 return(__buffer + __len);
905template <
class _CharT,
class _Alloc>
910#ifndef _STLP_OLD_ROPE_SEMANTICS
911 if (__result_pos ==
size()) __result_pos =
npos;
916template <
class _CharT,
class _Alloc>
919 if (0 == __r)
return __buffer;
921 case _RopeRep::_S_concat:
926 _CharT* __rest = _S_flatten(__left, __buffer);
927 return _S_flatten(__right, __rest);
929 case _RopeRep::_S_leaf:
934 case _RopeRep::_S_function:
935 case _RopeRep::_S_substringfn:
952template <
class _CharT,
class _Alloc>
954 for (
int __i = 0; __i < __indent; ++__i)
putchar(
' ');
958 if (_RopeRep::_S_concat == __r->_M_tag) {
960 _RopeRep* __left =
__c->_M_left;
961 _RopeRep* __right =
__c->_M_right;
962 printf(
"Concatenation %p (rc = %ld, depth = %d, len = %ld, %s balanced)\n",
963 __r, __r->_M_ref_count, __r->_M_depth, __r->_M_size._M_data,
964 __r->_M_is_balanced?
"" :
"not");
965 _S_dump(__left, __indent + 2);
966 _S_dump(__right, __indent + 2);
972 switch (__r->_M_tag) {
973 case _RopeRep::_S_leaf:
976 case _RopeRep::_S_function:
979 case _RopeRep::_S_substringfn:
980 __kind =
"Function representing substring";
983 __kind =
"(corrupted kind field!)";
985 printf(
"%s %p (rc = %ld, depth = %d, len = %ld) ",
986 __kind, __r, __r->_M_ref_count, __r->_M_depth, __r->_M_size._M_data);
987 if (
sizeof(_CharT) == 1) {
988 const int __max_len = 40;
989 _Self_destruct_ptr __prefix(_S_substring(__r, 0, __max_len));
990 _CharT __buffer[__max_len + 1];
991 bool __too_big = __r->_M_size._M_data > __prefix->_M_size._M_data;
993 _S_flatten(__prefix, __buffer);
995 printf(
"%s%s\n", (
char*)__buffer, __too_big?
"...\n" :
"\n");
1003# define __ROPE_TABLE_BODY = { \
10041, 2, 3, 5, 8, 13, 21, \
100534, 55, 89, 144, 233, 377, \
1006610, 987, 1597, 2584, 4181, \
10076765ul, 10946ul, 17711ul, 28657ul, 46368ul, \
100875025ul, 121393ul, 196418ul, 317811ul, \
1009514229ul, 832040ul, 1346269ul, 2178309ul, \
10103524578ul, 5702887ul, 9227465ul, 14930352ul, \
101124157817ul, 39088169ul, 63245986ul, 102334155ul, \
1012165580141ul, 267914296ul, 433494437ul, \
1013701408733ul, 1134903170ul, 1836311903ul, \
1016template <
class _CharT,
class _Alloc>
1019# undef __ROPE_DEPTH_SIZE
1020# undef __ROPE_MAX_DEPTH
1021# undef __ROPE_TABLE_BODY
1025template <
class _CharT,
class _Alloc>
1027 _RopeRep* __forest[_RopeRep::_S_max_rope_depth + 1] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
1028 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
1039 _S_add_to_forest(__r, __forest);
1040 for (__i = 0; __i <= _RopeRep::_S_max_rope_depth; ++__i)
1041 if (0 != __forest[__i]) {
1043 __result = _S_concat_rep(__forest[__i], __result);
1045# ifdef _STLP_USE_EXCEPTIONS
1050 _STLP_UNWIND(
for(__i = 0; __i <= _RopeRep::_S_max_rope_depth; ++__i)
1051 _S_unref(__forest[__i]))
1052 if (__result->
_M_depth > _RopeRep::_S_max_rope_depth) {
1059template <
class _CharT,
class _Alloc>
1063 if (__r -> _M_is_balanced) {
1064 _S_add_leaf_to_forest(__r, __forest);
1071 _S_add_to_forest(
__c->_M_left, __forest);
1072 _S_add_to_forest(
__c->_M_right, __forest);
1077template <
class _CharT,
class _Alloc>
1086 for (__i = 0; __s >= _S_min_len[__i+1]; ++__i) {
1087 if (0 != __forest[__i]) {
1089 __too_tiny = _S_concat_and_set_balanced(__forest[__i], __too_tiny);
1096 __insertee = _S_concat_and_set_balanced(__too_tiny, __r);
1103 if (0 != __forest[__i]) {
1105 __insertee = _S_concat_and_set_balanced(__forest[__i], __insertee);
1112 if (__i == _RopeRep::_S_max_rope_depth ||
1114 __forest[__i] = __insertee;
1121template <
class _CharT,
class _Alloc>
1128 if (0 != __cstr)
return __cstr[__i];
1131 case _RopeRep::_S_concat:
1137 if (__i >= __left_len) {
1139 __r =
__c->_M_right;
1145 case _RopeRep::_S_leaf:
1150 case _RopeRep::_S_function:
1151 case _RopeRep::_S_substringfn:
1156 (*(__f->
_M_fn))(__i, 1, &__result);
1161#if defined(_STLP_NEED_UNREACHABLE_RETURN)
1168template <
class _CharT,
class _Alloc>
1172 _RopeRep* __clrstack[_RopeRep::_S_max_rope_depth];
1182 case _RopeRep::_S_concat:
1188 if (
__c->_M_c_string != 0) __clrstack[__csptr++] =
__c;
1189 if (__i >= __left_len) {
1191 __r =
__c->_M_right;
1197 case _RopeRep::_S_leaf:
1201 __clrstack[__csptr++] = __l;
1202 while (__csptr > 0) {
1204 _RopeRep* __d = __clrstack[__csptr];
1210 case _RopeRep::_S_function:
1211 case _RopeRep::_S_substringfn:
1215#if defined(_STLP_NEED_UNREACHABLE_RETURN)
1225template <
class _CharT,
class _Alloc>
1232 if (0 == __right)
return 0 != __left;
1233 if (0 == __left)
return -1;
1236 if (_RopeRep::_S_leaf == __left->
_M_tag) {
1238 if (_RopeRep::_S_leaf == __right->
_M_tag) {
1253 if (_RopeRep::_S_leaf == __right->
_M_tag) {
1267template <
class _CharT,
class _Alloc>
1270 _RopeRep* __old = _M_root->_M_tree_ptr._M_data;
1273 _CharT* __ptr = _My_rope::_S_fetch_ptr(__old, _M_pos);
1279 _My_rope::_S_substring(__old, 0, _M_pos));
1281 _My_rope::_S_substring(__old, _M_pos+1, __old->
_M_size.
_M_data));
1283 _My_rope::_S_destr_concat_char_iter(__left, &
__c, 1));
1287 _My_rope::_S_concat_rep(__result_left, __right);
1289 _RopeRep::_S_unref(__old);
1290 _M_root->_M_tree_ptr._M_data = __result;
1294template <
class _CharT,
class _Alloc>
1300template<
class _CharT,
class _Alloc>
1304#if !defined (_STLP_STATIC_CONST_INIT_BUG) && !defined (_STLP_NO_STATIC_CONST_DEFINITION)
1305template <
class _CharT,
class _Alloc>
1309template<
class _CharT,
class _Alloc>
1311 if (0 == _M_tree_ptr._M_data) {
1314 return _S_empty_c_str;
1316 _CharT* __old_c_string = _M_tree_ptr._M_data->_M_c_string;
1317 if (0 != __old_c_string)
return __old_c_string;
1318 size_t __s =
size();
1320 _S_flatten(_M_tree_ptr._M_data, __result);
1324 if (0 != __old_c_string) {
1328 _STLP_STD::_Destroy_Range(__old_c_string, __old_c_string + __s + 1);
1334template<
class _CharT,
class _Alloc>
1336 if (0 == _M_tree_ptr._M_data) {
1338 return _S_empty_c_str;
1340 _CharT* __old_c_string = _M_tree_ptr._M_data->_M_c_string;
1341 if (_RopeRep::_S_leaf == _M_tree_ptr._M_data->_M_tag && 0 != __old_c_string) {
1342 return __old_c_string;
1344 size_t __s =
size();
1345 _CharT* __result = _M_tree_ptr.allocate(_S_rounded_up_size(__s));
1346 _S_flatten(_M_tree_ptr._M_data, __result);
1348 _M_tree_ptr._M_data->_M_unref_nonnil();
1349 _M_tree_ptr._M_data = _S_new_RopeLeaf(__result, __s, _M_tree_ptr);
1355#if (!defined (_STLP_MSVC) || (_STLP_MSVC >= 1310)) && !defined (__DMC__)
1357template<
class _CharT,
class _Alloc>
_STLP_MOVE_TO_STD_NAMESPACE void rotate(_ForwardIter __first, _ForwardIter __middle, _ForwardIter __last)
_STLP_INLINE_LOOP _InputIter __last
_STLP_MOVE_TO_PRIV_NAMESPACE int __lexicographical_compare_3way(_InputIter1 __first1, _InputIter1 __last1, _InputIter2 __first2, _InputIter2 __last2)
#define _STLP_MPWFIX_CATCH
#define _STLP_DEFAULT_CONSTRUCTED(_TTp)
#define _STLP_ASSERT(expr)
_STLP_THROW_FUNCT_SPEC _STLP_CALL __stl_throw_out_of_range(const char *__msg)
_STLP_THROW_FUNCT_SPEC _STLP_CALL __stl_throw_range_error(const char *__msg)
bool _S_apply_to_pieces(_CharConsumer &__c, _Rope_RopeRep< _CharT, _Alloc > *__r, size_t __begin, size_t __end)
void _Terminate_RopeLeaf(_Rope_RopeLeaf< _CharT, _Alloc > *__r, size_t __size, const __true_type &)
basic_ostream< _CharT, _Traits > & _S_io_get(basic_ostream< _CharT, _Traits > &__o, const rope< _CharT, _Alloc > &__r, const __true_type &)
#define __ROPE_TABLE_BODY
basic_ostream< _CharT, _Traits > & operator<<(basic_ostream< _CharT, _Traits > &__o, const rope< _CharT, _Alloc > &__r)
void _Rope_fill(basic_ostream< _CharT, _Traits > &__o, streamsize __n)
void _Rope_rotate(_Rope_iterator< _CharT, _Alloc > __first, _Rope_iterator< _CharT, _Alloc > __middle, _Rope_iterator< _CharT, _Alloc > __last)
void _S_construct_null(_CharT *__p)
#define _STLP_CREATE_ALLOCATOR(__atype, __a, _Tp)
#define __ROPE_DEPTH_SIZE
void *_STLP_CALL _Atomic_swap_ptr(void *_STLP_VOLATILE *__p, void *__q)
_STLP_MOVE_TO_PRIV_NAMESPACE _STLP_INLINE_LOOP pair< _InputIter, _ForwardIter > __ucopy_n(_InputIter __first, _Size __count, _ForwardIter __result, const input_iterator_tag &)
_Self & operator=(_CharT __c)
_Rope_char_ptr_proxy< _CharT, _Alloc > operator&() const
_Rope_find_char_char_consumer(_CharT __p)
~_Rope_find_char_char_consumer()
bool operator()(const _CharT *__leaf, size_t __n)
_Rope_flatten_char_consumer(_CharT *__buffer)
bool operator()(const _CharT *__leaf, size_t __n)
~_Rope_flatten_char_consumer()
basic_ostream< _CharT, _Traits > _Insert_ostream
~_Rope_insert_char_consumer()
bool operator()(const _CharT *__leaf, size_t __n)
_Rope_insert_char_consumer(_Insert_ostream &__writer)
_Self & operator=(_Self const &)
_Rope_insert_char_consumer< _CharT, _Traits > _Self
struct _Rope_iterator_base::@1852 _M_tmp_buf
static void _S_setcache(_Rope_iterator_base< _CharT, _Alloc > &__x)
static void _S_setbuf(_Rope_iterator_base< _CharT, _Alloc > &__x)
unsigned char _M_path_directions
struct _Rope_iterator_base::@1851 _M_path_end
static void _S_setcache_for_incr(_Rope_iterator_base< _CharT, _Alloc > &__x)
rope< _CharT, _Alloc > & container()
_Tp * allocate(size_type __n, size_type &__allocated_n)
_Self & put(char_type __c)
void apply_to_pieces(size_t __begin, size_t __end, _CharConsumer &__c) const
static _RopeLeaf * _S_destr_leaf_concat_char_iter(_RopeLeaf *__r, const _CharT *__iter, size_t __slen)
void _STLP_FUNCTION_THROWS _M_throw_out_of_range() const
size_type find(const _Self &__s, size_type __pos=0) const
static _RopeRep * _S_substring(_RopeRep *__base, size_t __start, size_t __endp1)
static int _S_compare(const _RopeRep *__x, const _RopeRep *__y)
const _CharT * c_str() const
static _CharT * _S_fetch_ptr(_RopeRep *__r, size_type __pos)
static _RopeRep * _S_tree_concat(_RopeRep *__left, _RopeRep *__right)
_Self substr(size_t __start, size_t __len=1) const
static _RopeRep * _S_concat_rep(_RopeRep *__left, _RopeRep *__right)
static _CharT _S_fetch(_RopeRep *__r, size_type __pos)
const _CharT * replace_with_c_str()
static _RopeRep * _S_destr_concat_char_iter(_RopeRep *__r, const _CharT *__iter, size_t __slen)
static _RopeRep * _S_concat_char_iter(_RopeRep *__r, const _CharT *__iter, size_t __slen)
static _RopeRep * _S_balance(_RopeRep *__r)
static _CharT * _S_flatten(_RopeRep *__r, _CharT *__buffer)
static void _S_add_leaf_to_forest(_RopeRep *__r, _RopeRep **__forest)
_RopeRep::_IsBasicCharType _IsBasicCharType
static _RopeLeaf * _S_leaf_concat_char_iter(_RopeLeaf *__r, const _CharT *__iter, size_t __slen)
static void _S_add_to_forest(_RopeRep *__r, _RopeRep **__forest)
#define _STLP_UNWIND(action)
#define _STLP_RET_AFTER_THROW(data)
#define __REINTERPRET_CAST(__x, __y)
#define __STATIC_CAST(__x, __y)
#define _STLP_BEGIN_NAMESPACE
#define _STLP_END_NAMESPACE
char_producer< _CharT > * _M_fn
_CharT *_STLP_VOLATILE _M_c_string
static void _S_ref(_Self *__t)
allocator_type get_allocator() const
_STLP_PRIV _STLP_alloc_proxy< size_t, _CharT, allocator_type > _M_size