#include <stl_rope.h>
Collaboration diagram for rope:

Public Types | |
| typedef charT | value_type |
| typedef ptrdiff_t | difference_type |
| typedef size_t | size_type |
| typedef charT | const_reference |
| typedef const charT * | const_pointer |
| typedef __rope_iterator< charT, Alloc > | iterator |
| typedef __rope_const_iterator< charT, Alloc > | const_iterator |
| typedef __rope_charT_ref_proxy< charT, Alloc > | reference |
| typedef __rope_charT_ptr_proxy< charT, Alloc > | pointer |
| typedef reverse_iterator< const_iterator, value_type, const_reference, difference_type > | const_reverse_iterator |
| typedef reverse_iterator< iterator, value_type, reference, difference_type > | reverse_iterator |
Public Methods | |
| void | apply_to_pieces (size_t begin, size_t end, __rope_char_consumer< charT > &c) const |
| bool | empty () const |
| int | compare (const rope &y) const |
| rope (const charT *s) | |
| rope (const charT *s, size_t len) | |
| rope (const charT *s, charT *e) | |
| rope (const const_iterator &s, const const_iterator &e) | |
| rope (const iterator &s, const iterator &e) | |
| rope (charT c) | |
| rope (size_t n, charT c) | |
| rope (const charT *i, const charT *j) | |
| rope () | |
| rope (char_producer< charT > *fn, size_t len, bool delete_fn) | |
| rope (const rope &x) | |
| ~rope () | |
| rope & | operator= (const rope &x) |
| void | push_back (charT x) |
| void | pop_back () |
| charT | back () const |
| void | push_front (charT x) |
| void | pop_front () |
| charT | front () const |
| void | balance () |
| void | copy (charT *buffer) const |
| size_type | copy (size_type pos, size_type n, charT *buffer) const |
| void | dump () |
| const charT * | c_str () const |
| const charT * | replace_with_c_str () |
| void | delete_c_str () |
| charT | operator[] (size_type pos) const |
| charT | at (size_type pos) const |
| const_iterator | begin () const |
| const_iterator | const_begin () const |
| const_iterator | end () const |
| const_iterator | const_end () const |
| size_type | size () const |
| size_type | length () const |
| size_type | max_size () const |
| const_reverse_iterator | rbegin () const |
| const_reverse_iterator | const_rbegin () const |
| const_reverse_iterator | rend () const |
| const_reverse_iterator | const_rend () const |
| rope & | append (const charT *iter, size_t n) |
| rope & | append (const charT *c_string) |
| rope & | append (const charT *s, const charT *e) |
| rope & | append (const_iterator s, const_iterator e) |
| rope & | append (charT c) |
| rope & | append () |
| rope & | append (const rope &y) |
| rope & | append (size_t n, charT c) |
| void | swap (rope &b) |
| void | insert (size_t p, const rope &r) |
| void | insert (size_t p, size_t n, charT c) |
| void | insert (size_t p, const charT *i, size_t n) |
| void | insert (size_t p, const charT *c_string) |
| void | insert (size_t p, charT c) |
| void | insert (size_t p) |
| void | insert (size_t p, const charT *i, const charT *j) |
| void | insert (size_t p, const const_iterator &i, const const_iterator &j) |
| void | insert (size_t p, const iterator &i, const iterator &j) |
| void | replace (size_t p, size_t n, const rope &r) |
| void | replace (size_t p, size_t n, const charT *i, size_t i_len) |
| void | replace (size_t p, size_t n, charT c) |
| void | replace (size_t p, size_t n, const charT *c_string) |
| void | replace (size_t p, size_t n, const charT *i, const charT *j) |
| void | replace (size_t p, size_t n, const const_iterator &i, const const_iterator &j) |
| void | replace (size_t p, size_t n, const iterator &i, const iterator &j) |
| void | replace (size_t p, charT c) |
| void | replace (size_t p, const rope &r) |
| void | replace (size_t p, const charT *i, size_t i_len) |
| void | replace (size_t p, const charT *c_string) |
| void | replace (size_t p, const charT *i, const charT *j) |
| void | replace (size_t p, const const_iterator &i, const const_iterator &j) |
| void | replace (size_t p, const iterator &i, const iterator &j) |
| void | erase (size_t p, size_t n) |
| void | erase (size_t p) |
| iterator | insert (const iterator &p, const rope &r) |
| iterator | insert (const iterator &p, size_t n, charT c) |
| iterator | insert (const iterator &p, charT c) |
| iterator | insert (const iterator &p) |
| iterator | insert (const iterator &p, const charT *c_string) |
| iterator | insert (const iterator &p, const charT *i, size_t n) |
| iterator | insert (const iterator &p, const charT *i, const charT *j) |
| iterator | insert (const iterator &p, const const_iterator &i, const const_iterator &j) |
| iterator | insert (const iterator &p, const iterator &i, const iterator &j) |
| void | replace (const iterator &p, const iterator &q, const rope &r) |
| void | replace (const iterator &p, const iterator &q, charT c) |
| void | replace (const iterator &p, const iterator &q, const charT *c_string) |
| void | replace (const iterator &p, const iterator &q, const charT *i, size_t n) |
| void | replace (const iterator &p, const iterator &q, const charT *i, const charT *j) |
| void | replace (const iterator &p, const iterator &q, const const_iterator &i, const const_iterator &j) |
| void | replace (const iterator &p, const iterator &q, const iterator &i, const iterator &j) |
| void | replace (const iterator &p, const rope &r) |
| void | replace (const iterator &p, charT c) |
| void | replace (const iterator &p, const charT *c_string) |
| void | replace (const iterator &p, const charT *i, size_t n) |
| void | replace (const iterator &p, const charT *i, const charT *j) |
| void | replace (const iterator &p, const_iterator i, const_iterator j) |
| void | replace (const iterator &p, iterator i, iterator j) |
| iterator | erase (const iterator &p, const iterator &q) |
| iterator | erase (const iterator &p) |
| rope | substr (size_t start, size_t len=1) const |
| rope | substr (iterator start, iterator end) const |
| rope | substr (iterator start) const |
| rope | substr (const_iterator start, const_iterator end) const |
| rope< charT, Alloc > | substr (const_iterator start) |
| size_type | find (charT c, size_type pos=0) const |
| size_type | find (charT *s, size_type pos=0) const |
| iterator | mutable_begin () |
| iterator | mutable_end () |
| reverse_iterator | mutable_rbegin () |
| reverse_iterator | mutable_rend () |
| reference | mutable_reference_at (size_type pos) |
| const_iterator | end () |
| const_iterator | begin () |
| const_reverse_iterator | rend () |
| const_reverse_iterator | rbegin () |
Protected Types | |
| typedef __GC_CONST charT * | cstrptr |
| typedef simple_alloc< charT, Alloc > | DataAlloc |
| typedef simple_alloc< __rope_RopeConcatenation< charT, Alloc >, Alloc > | CAlloc |
| typedef simple_alloc< __rope_RopeLeaf< charT, Alloc >, Alloc > | LAlloc |
| typedef simple_alloc< __rope_RopeFunction< charT, Alloc >, Alloc > | FAlloc |
| typedef simple_alloc< __rope_RopeSubstring< charT, Alloc >, Alloc > | SAlloc |
| typedef __rope_RopeBase< charT, Alloc > | RopeBase |
| typedef __rope_RopeConcatenation< charT, Alloc > | RopeConcatenation |
| typedef __rope_RopeLeaf< charT, Alloc > | RopeLeaf |
| typedef __rope_RopeFunction< charT, Alloc > | RopeFunction |
| typedef __rope_RopeSubstring< charT, Alloc > | RopeSubstring |
| typedef __rope_self_destruct_ptr< charT, Alloc > | self_destruct_ptr |
| enum | { copy_max = 23 } |
Protected Methods | |
| rope (RopeBase *t) | |
Static Protected Methods | |
| cstrptr | atomic_swap (cstrptr *p, cstrptr q) |
| bool | is0 (charT c) |
| charT | fetch (RopeBase *r, size_type pos) |
| charT * | fetch_ptr (RopeBase *r, size_type pos) |
| bool | apply_to_pieces (__rope_char_consumer< charT > &c, const RopeBase *r, size_t begin, size_t end) |
| void | unref (RopeBase *t) |
| void | ref (RopeBase *t) |
| RopeBase * | substring (RopeBase *base, size_t start, size_t endp1) |
| RopeBase * | concat_char_iter (RopeBase *r, const charT *iter, size_t slen) |
| RopeBase * | destr_concat_char_iter (RopeBase *r, const charT *iter, size_t slen) |
| RopeBase * | concat (RopeBase *left, RopeBase *right) |
| size_t | rounded_up_size (size_t n) |
| size_t | allocated_capacity (size_t n) |
| charT * | alloc_copy (const charT *s, size_t size) |
| RopeLeaf * | RopeLeaf_from_char_ptr (__GC_CONST charT *s, size_t size) |
| RopeLeaf * | RopeLeaf_from_unowned_char_ptr (const charT *s, size_t size) |
| RopeBase * | tree_concat (RopeBase *left, RopeBase *right) |
| RopeFunction * | RopeFunction_from_fn (char_producer< charT > *fn, size_t size, bool delete_fn) |
| RopeLeaf * | leaf_concat_char_iter (RopeLeaf *r, const charT *iter, size_t slen) |
| RopeLeaf * | destr_leaf_concat_char_iter (RopeLeaf *r, const charT *iter, size_t slen) |
| size_t | char_ptr_len (const charT *s) |
| charT * | flatten (RopeBase *r, charT *buffer) |
| charT * | flatten (RopeBase *r, size_t start, size_t len, charT *buffer) |
| bool | is_balanced (RopeBase *r) |
| bool | is_almost_balanced (RopeBase *r) |
| bool | is_roughly_balanced (RopeBase *r) |
| RopeBase * | concat_and_set_balanced (RopeBase *left, RopeBase *right) |
| RopeBase * | balance (RopeBase *r) |
| void | add_to_forest (RopeBase *r, RopeBase **forest) |
| void | add_leaf_to_forest (RopeBase *r, RopeBase **forest) |
| void | dump (RopeBase *r, int indent=0) |
| int | compare (const RopeBase *x, const RopeBase *y) |
| RopeBase * | replace (RopeBase *old, size_t pos1, size_t pos2, RopeBase *r) |
Protected Attributes | |
| RopeBase * | tree_ptr |
Static Protected Attributes | |
| charT | empty_c_str [1] |
| const unsigned long | min_len [RopeBase::max_rope_depth+1] |
Friends | |
| class | __rope_iterator< charT, Alloc > |
| class | __rope_const_iterator< charT, Alloc > |
| struct | __rope_RopeBase< charT, Alloc > |
| class | __rope_iterator_base< charT, Alloc > |
| class | __rope_charT_ptr_proxy< charT, Alloc > |
| class | __rope_charT_ref_proxy< charT, Alloc > |
| struct | __rope_RopeSubstring< charT, Alloc > |
| struct | rope< charT, Alloc >::concat_fn |
| rope | identity_element (concat_fn) |
| rope< charT, Alloc > | operator+__STL_NULL_TMPL_ARGS (const rope< charT, Alloc > &left, const rope< charT, Alloc > &right) |
| rope< charT, Alloc > | operator+__STL_NULL_TMPL_ARGS (const rope< charT, Alloc > &left, const charT *right) |
| rope< charT, Alloc > | operator+__STL_NULL_TMPL_ARGS (const rope< charT, Alloc > &left, charT right) |
|
|||||
|
Definition at line 965 of file stl_rope.h. |
|
|||||
|
Definition at line 914 of file stl_rope.h. Referenced by begin, const_begin, const_end, and end. |
|
|||||
|
Definition at line 912 of file stl_rope.h. |
|
|||||
|
Definition at line 911 of file stl_rope.h. |
|
|||||
|
Definition at line 1461 of file stl_rope.h. Referenced by const_rbegin, const_rend, rbegin, and rend. |
|
|||||
|
Definition at line 927 of file stl_rope.h. Referenced by atomic_swap. |
|
|||||
|
Definition at line 964 of file stl_rope.h. |
|
|||||
|
Definition at line 909 of file stl_rope.h. |
|
|||||
|
Definition at line 967 of file stl_rope.h. |
|
|||||
|
Definition at line 913 of file stl_rope.h. Referenced by erase, mutable_begin, and mutable_end. |
|
|||||
|
Definition at line 966 of file stl_rope.h. |
|
|||||
|
Definition at line 916 of file stl_rope.h. |
|
|||||
|
Definition at line 915 of file stl_rope.h. Referenced by mutable_reference_at. |
|
|||||
|
Definition at line 1832 of file stl_rope.h. Referenced by mutable_rbegin, and mutable_rend. |
|
|||||
|
Definition at line 974 of file stl_rope.h. |
|
|||||
|
Definition at line 975 of file stl_rope.h. |
|
|||||
|
Definition at line 977 of file stl_rope.h. |
|
|||||
|
Definition at line 976 of file stl_rope.h. |
|
|||||
|
Definition at line 978 of file stl_rope.h. |
|
|||||
|
Definition at line 968 of file stl_rope.h. |
|
|||||
|
Definition at line 1021 of file stl_rope.h. |
|
|||||
|
Definition at line 910 of file stl_rope.h. Referenced by at, copy, find, length, max_size, mutable_reference_at, operator[], and size. |
|
|||||
|
Definition at line 908 of file stl_rope.h. |
|
|||||
|
Definition at line 970 of file stl_rope.h.
00970 { copy_max = 23 };
|
|
||||||||||
|
Definition at line 1148 of file stl_rope.h.
01148 : tree_ptr(t) { } |
|
||||||||||
|
Definition at line 1214 of file stl_rope.h. References __stl_assert, char_ptr_len, and RopeLeaf_from_unowned_char_ptr.
01215 {
01216 size_t len = char_ptr_len(s);
01217
01218 if (0 == len) {
01219 tree_ptr = 0;
01220 } else {
01221 tree_ptr = RopeLeaf_from_unowned_char_ptr(s, len);
01222 # ifndef __GC
01223 __stl_assert(1 == tree_ptr -> refcount);
01224 # endif
01225 }
01226 }
|
|
||||||||||||||||
|
Definition at line 1228 of file stl_rope.h. References RopeLeaf_from_unowned_char_ptr.
01229 {
01230 if (0 == len) {
01231 tree_ptr = 0;
01232 } else {
01233 tree_ptr = RopeLeaf_from_unowned_char_ptr(s, len);
01234 }
01235 }
|
|
||||||||||||||||
|
Definition at line 1237 of file stl_rope.h. References RopeLeaf_from_unowned_char_ptr.
01238 {
01239 size_t len = e - s;
01240
01241 if (0 == len) {
01242 tree_ptr = 0;
01243 } else {
01244 tree_ptr = RopeLeaf_from_unowned_char_ptr(s, len);
01245 }
01246 }
|
|
||||||||||||||||
|
Definition at line 1248 of file stl_rope.h. References __rope_iterator_base::current_pos, __rope_iterator_base::root, and substring.
|
|
||||||||||||||||
|
Definition at line 1253 of file stl_rope.h. References __rope_iterator_base::current_pos, __rope_iterator_base::root, and substring.
|
|
||||||||||
|
Definition at line 1258 of file stl_rope.h. References __STL_TRY, __STL_UNWIND, construct, RopeLeaf_from_char_ptr, and rounded_up_size.
01259 {
01260 charT * buf = DataAlloc::allocate(rounded_up_size(1));
01261
01262 construct(buf, c);
01263 __STL_TRY {
01264 tree_ptr = RopeLeaf_from_char_ptr(buf, 1);
01265 }
01266 __STL_UNWIND(RopeBase::free_string(buf, 1))
01267 }
|
|
||||||||||||||||
|
|
|
||||||||||||||||
|
Definition at line 1274 of file stl_rope.h. References RopeLeaf_from_unowned_char_ptr.
01275 {
01276 if (i == j) {
01277 tree_ptr = 0;
01278 } else {
01279 size_t len = j - i;
01280 tree_ptr = RopeLeaf_from_unowned_char_ptr(i, len);
01281 }
01282 }
|
|
|||||||||
|
Definition at line 1284 of file stl_rope.h.
01285 {
01286 tree_ptr = 0;
01287 }
|
|
||||||||||||||||||||
|
Definition at line 1290 of file stl_rope.h. References RopeFunction_from_fn.
01291 {
01292 tree_ptr = RopeFunction_from_fn(fn, len, delete_fn);
01293 }
|
|
||||||||||
|
Definition at line 1295 of file stl_rope.h.
|
|
|||||||||
|
Definition at line 1301 of file stl_rope.h. References unref.
|
|
||||||||||||||||
|
|
|
||||||||||||||||
|
|
|
||||||||||||||||
|
Definition at line 1072 of file stl_rope.h. References __cond_store_eos, rounded_up_size, size, and uninitialized_copy_n. Referenced by RopeLeaf_from_unowned_char_ptr.
01073 {
01074 charT * result = DataAlloc::allocate(rounded_up_size(size));
01075
01076 uninitialized_copy_n(s, size, result);
01077 __cond_store_eos(result[size]);
01078 return(result);
01079 }
|
|
||||||||||
|
Definition at line 1062 of file stl_rope.h. References __is_basic_char_type, and rounded_up_size.
01062 {
01063 if (__is_basic_char_type((charT *)0)) {
01064 return rounded_up_size(n) - 1;
01065 } else {
01066 return rounded_up_size(n);
01067 }
01068 }
|
|
||||||||||||||||
|
Definition at line 1545 of file stl_rope.h. References append.
01545 {
01546 rope<charT,Alloc> last(n, c);
01547 return append(last);
01548 }
|
|
||||||||||
|
Definition at line 1538 of file stl_rope.h. References concat, tree_ptr, and unref.
|
|
|||||||||
|
Definition at line 1536 of file stl_rope.h. Referenced by append.
01536 { return append(charT()); }
|
|
||||||||||
|
Definition at line 1529 of file stl_rope.h. References destr_concat_char_iter, and unref.
|
|
||||||||||||||||
|
Definition at line 1519 of file stl_rope.h. References __stl_assert, concat, __rope_iterator_base::current_pos, __rope_iterator_base::root, substring, and unref.
01519 {
01520 __stl_assert(s.root == e.root);
01521 self_destruct_ptr appendee(substring(s.root, s.current_pos,
01522 e.current_pos));
01523 RopeBase* result = concat(tree_ptr, (RopeBase *)appendee);
01524 unref(tree_ptr);
01525 tree_ptr = result;
01526 return *this;
01527 }
|
|
||||||||||||||||
|
Definition at line 1511 of file stl_rope.h. References destr_concat_char_iter, and unref.
|
|
||||||||||
|
Definition at line 1505 of file stl_rope.h. References append, and char_ptr_len.
01505 {
01506 size_t len = char_ptr_len(c_string);
01507 append(c_string, len);
01508 return(*this);
01509 }
|
|
||||||||||||||||
|
Definition at line 1498 of file stl_rope.h. References destr_concat_char_iter, and unref. Referenced by operator+, and operator<.
|
|
||||||||||||||||||||
|
Definition at line 1050 of file stl_rope.h. References apply_to_pieces, begin, and end.
01051 {
01052 apply_to_pieces(c, tree_ptr, begin, end);
01053 }
|
|
||||||||||||||||||||||||
|
Referenced by apply_to_pieces. |
|
||||||||||
|
Definition at line 1420 of file stl_rope.h. References size_type.
01420 {
01421 // if (pos >= size()) throw out_of_range;
01422 return (*this)[pos];
01423 }
|
|
||||||||||||||||
|
Definition at line 955 of file stl_rope.h. References cstrptr.
00955 {
00956 cstrptr result = *p;
00957 *p = q;
00958 return result;
00959 }
|
|
|||||||||
|
Definition at line 1329 of file stl_rope.h.
|
|
|||||||||
|
Definition at line 1360 of file stl_rope.h. References unref.
|
|
||||||||||
|
|
|
|||||||||
|
Definition at line 1884 of file stl_rope.h. References const_begin.
01884 { return const_begin(); }
|
|
|||||||||
|
Definition at line 1425 of file stl_rope.h. References const_iterator. Referenced by apply_to_pieces, const_rend, and rend.
01425 {
01426 return(const_iterator(tree_ptr, 0));
01427 }
|
|
|||||||||
|
|
|
||||||||||
|
Referenced by append, find, insert, operator+=, and rope. |
|
||||||||||
|
Definition at line 1210 of file stl_rope.h. References compare, and tree_ptr.
|
|
||||||||||||||||
|
Referenced by compare. |
|
||||||||||||||||
|
Referenced by append, concat_and_set_balanced, insert, operator+=, push_front, and replace. |
|
||||||||||||||||
|
Definition at line 1176 of file stl_rope.h. References concat, and is_balanced.
01178 {
01179 RopeBase * result = concat(left, right);
01180 if (is_balanced(result)) result -> is_balanced = true;
01181 return result;
01182 }
|
|
||||||||||||||||||||
|
Referenced by insert, operator+=, and push_back. |
|
|||||||||
|
Definition at line 1430 of file stl_rope.h. References const_iterator. Referenced by begin, and find.
01430 {
01431 return(const_iterator(tree_ptr, 0));
01432 }
|
|
|||||||||
|
Definition at line 1438 of file stl_rope.h. References const_iterator, and size.
01438 {
01439 return(const_iterator(tree_ptr, size()));
01440 }
|
|
|||||||||
|
Definition at line 1468 of file stl_rope.h. References const_reverse_iterator, and end. Referenced by rbegin.
01468 {
01469 return const_reverse_iterator(end());
01470 }
|
|
|||||||||
|
Definition at line 1476 of file stl_rope.h. References begin, and const_reverse_iterator. Referenced by rend.
01476 {
01477 return const_reverse_iterator(begin());
01478 }
|
|
||||||||||||||||||||
|
Definition at line 1377 of file stl_rope.h. References destroy, flatten, size, and size_type.
|
|
||||||||||
|
Definition at line 1367 of file stl_rope.h. References destroy, flatten, and size.
|
|
|||||||||
|
Definition at line 1403 of file stl_rope.h.
01403 {
01404 if (0 == tree_ptr) return;
01405 if (RopeBase::leaf == tree_ptr -> tag
01406 && ((RopeLeaf *)tree_ptr) -> data == tree_ptr -> c_string) {
01407 // Representation shared
01408 return;
01409 }
01410 # ifndef __GC
01411 tree_ptr -> free_c_string();
01412 # endif
01413 tree_ptr -> c_string = 0;
01414 }
|
|
||||||||||||||||||||
|
Referenced by append. |
|
||||||||||||||||||||
|
|
|
|||||||||
|
Definition at line 1388 of file stl_rope.h.
|
|
||||||||||||||||
|
|
|
|||||||||
|
Definition at line 1205 of file stl_rope.h.
01205 { return 0 == tree_ptr; }
|
|
|||||||||
|
Definition at line 1882 of file stl_rope.h. References const_end.
01882 { return const_end(); }
|
|
|||||||||
|
Definition at line 1434 of file stl_rope.h. References const_iterator, and size. Referenced by apply_to_pieces, const_rbegin, and rbegin.
01434 {
01435 return(const_iterator(tree_ptr, size()));
01436 }
|
|
||||||||||
|
Definition at line 1779 of file stl_rope.h. References erase, __rope_iterator_base::index, and iterator.
|
|
||||||||||||||||
|
Definition at line 1774 of file stl_rope.h. References erase, __rope_iterator_base::index, and iterator.
|
|
||||||||||
|
Definition at line 1709 of file stl_rope.h. References erase.
01709 {
01710 erase(p, p + 1);
01711 }
|
|
||||||||||||||||
|
Definition at line 1702 of file stl_rope.h. References replace, and unref. Referenced by erase.
|
|
||||||||||||||||
|
Referenced by back, front, operator[], and __rope_const_iterator::operator[]. |
|
||||||||||||||||
|
|
|
||||||||||||||||
|
Definition at line 1814 of file stl_rope.h. References char_ptr_len, const_begin, const_end, __rope_iterator_base::index, search, and size_type.
01814 {
01815 const_iterator result = search(const_begin() + pos, const_end(),
01816 s, s + char_ptr_len(s));
01817 return result.index();
01818 }
|
|
||||||||||||||||
|
|
|
||||||||||||||||||||||||
|
|
|
||||||||||||||||
|
Referenced by copy. |
|
|||||||||
|
Definition at line 1355 of file stl_rope.h. References fetch.
|
|
||||||||||||||||||||
|
Definition at line 1731 of file stl_rope.h. References __rope_iterator_base::index, and insert.
01733 { insert(p.index(), i, j); return p; }
|
|
||||||||||||||||||||
|
Definition at line 1728 of file stl_rope.h. References __rope_iterator_base::index, and insert.
01730 { insert(p.index(), i, j); return p; }
|
|
||||||||||||||||||||
|
Definition at line 1726 of file stl_rope.h. References __rope_iterator_base::index, and insert.
01727 { insert(p.index(), i, j); return p; }
|
|
||||||||||||||||||||
|
Definition at line 1724 of file stl_rope.h. References __rope_iterator_base::index, and insert.
01725 { insert(p.index(), i, n); return p; }
|
|
||||||||||||||||
|
Definition at line 1722 of file stl_rope.h. References __rope_iterator_base::index, and insert.
01723 { insert(p.index(), c_string); return p; }
|
|
||||||||||
|
Definition at line 1720 of file stl_rope.h. References __rope_iterator_base::index, and insert.
01721 { insert(p.index()); return p; }
|
|
||||||||||||||||
|
Definition at line 1718 of file stl_rope.h. References __rope_iterator_base::index, and insert.
01719 { insert(p.index(), c); return p; }
|
|
||||||||||||||||||||
|
Definition at line 1716 of file stl_rope.h. References __rope_iterator_base::index, and insert.
01717 { insert(p.index(), n, c); return p; }
|
|
||||||||||||||||
|
Definition at line 1714 of file stl_rope.h. References __rope_iterator_base::index, and insert.
01715 { insert(p.index(), r); return p; }
|
|
||||||||||||||||||||
|
Definition at line 1622 of file stl_rope.h. References insert.
|
|
||||||||||||||||||||
|
Definition at line 1616 of file stl_rope.h. References insert.
|
|
||||||||||||||||||||
|
Definition at line 1611 of file stl_rope.h. References insert.
|
|
||||||||||
|
Definition at line 1606 of file stl_rope.h. References insert.
01606 {
01607 charT c = charT();
01608 insert(p, &c, 1);
01609 }
|
|
||||||||||||||||
|
Definition at line 1602 of file stl_rope.h. References insert.
01602 {
01603 insert(p, &c, 1);
01604 }
|
|
||||||||||||||||
|
Definition at line 1598 of file stl_rope.h. References char_ptr_len, and insert.
01598 {
01599 insert(p, c_string, char_ptr_len(c_string));
01600 }
|
|
||||||||||||||||||||
|
Definition at line 1588 of file stl_rope.h. References concat, concat_char_iter, size, substring, and unref.
01588 {
01589 self_destruct_ptr left(substring(tree_ptr, 0, p));
01590 self_destruct_ptr right(substring(tree_ptr, p, size()));
01591 self_destruct_ptr left_result(concat_char_iter(left, i, n));
01592 RopeBase * result =
01593 concat(left_result, right);
01594 unref(tree_ptr);
01595 tree_ptr = result;
01596 }
|
|
||||||||||||||||||||
|
Definition at line 1583 of file stl_rope.h. References insert.
01583 {
01584 rope<charT,Alloc> r(n,c);
01585 insert(p, r);
01586 }
|
|
||||||||||||||||
|
Definition at line 1576 of file stl_rope.h. References replace, tree_ptr, and unref. Referenced by insert.
|
|
||||||||||
|
Definition at line 969 of file stl_rope.h. References __eos.
00969 { return c == __eos((charT *)0); }
|
|
||||||||||
|
Definition at line 1167 of file stl_rope.h.
|
|
||||||||||
|
Definition at line 1164 of file stl_rope.h. Referenced by concat_and_set_balanced.
|
|
||||||||||
|
Definition at line 1171 of file stl_rope.h.
|
|
||||||||||||||||||||
|
|
|
|||||||||
|
Definition at line 1446 of file stl_rope.h. References size, and size_type.
01446 {
01447 return size();
01448 }
|
|
|||||||||
|
Definition at line 1450 of file stl_rope.h. References min_len, and size_type.
01450 {
01451 return min_len[RopeBase::max_rope_depth-1] - 1;
01452 // Guarantees that the result can be sufficirntly
01453 // balanced. Longer ropes will probably still work,
01454 // but it's harder to make guarantees.
01455 }
|
|
|||||||||
|
Definition at line 1820 of file stl_rope.h. References iterator. Referenced by mutable_rend.
01820 {
01821 return(iterator(this, 0));
01822 }
|
|
|||||||||
|
Definition at line 1824 of file stl_rope.h. References iterator, and size. Referenced by mutable_rbegin.
|
|
|||||||||
|
Definition at line 1835 of file stl_rope.h. References mutable_end, and reverse_iterator.
01835 {
01836 return reverse_iterator(mutable_end());
01837 }
|
|
||||||||||
|
Definition at line 1843 of file stl_rope.h. References reference, and size_type. Referenced by __mutable_reference_at.
01843 {
01844 return reference(this, pos);
01845 }
|
|
|||||||||
|
Definition at line 1839 of file stl_rope.h. References mutable_begin, and reverse_iterator.
01839 {
01840 return reverse_iterator(mutable_begin());
01841 }
|
|
||||||||||
|
Definition at line 1306 of file stl_rope.h. References ref, tree_ptr, and unref.
|
|
||||||||||
|
Definition at line 1416 of file stl_rope.h. References fetch, and size_type.
|
|
|||||||||
|
Definition at line 1322 of file stl_rope.h. References size, substring, and unref.
|
|
|||||||||
|
Definition at line 1348 of file stl_rope.h. References size, substring, and unref.
|
|
||||||||||
|
Definition at line 1315 of file stl_rope.h. References concat_char_iter, and unref.
|
|
||||||||||
|
Definition at line 1334 of file stl_rope.h. References __STL_TRY, __STL_UNWIND, concat, RopeLeaf_from_unowned_char_ptr, and unref.
|
|
|||||||||
|
Definition at line 1888 of file stl_rope.h. References const_rbegin.
01888 { return const_rbegin(); }
|
|
|||||||||
|
Definition at line 1464 of file stl_rope.h. References const_reverse_iterator, and end.
01464 {
01465 return const_reverse_iterator(end());
01466 }
|
|
||||||||||
|
Definition at line 1008 of file stl_rope.h. Referenced by operator=, replace, and rope.
01009 {
01010 RopeBase::ref(t);
01011 }
|
|
|||||||||
|
Definition at line 1886 of file stl_rope.h. References const_rend.
01886 { return const_rend(); }
|
|
|||||||||
|
Definition at line 1472 of file stl_rope.h. References begin, and const_reverse_iterator.
01472 {
01473 return const_reverse_iterator(begin());
01474 }
|
|
||||||||||||||||||||
|
Definition at line 1770 of file stl_rope.h. References __rope_iterator_base::index, and replace.
01771 { replace(p.index(), i, j); }
|
|
||||||||||||||||||||
|
Definition at line 1768 of file stl_rope.h. References __rope_iterator_base::index, and replace.
01769 { replace(p.index(), i, j); }
|
|
||||||||||||||||||||
|
Definition at line 1766 of file stl_rope.h. References __rope_iterator_base::index, and replace.
01767 { replace(p.index(), i, j); }
|
|
||||||||||||||||||||
|
Definition at line 1764 of file stl_rope.h. References __rope_iterator_base::index, and replace.
01765 { replace(p.index(), i, n); }
|
|
||||||||||||||||
|
Definition at line 1762 of file stl_rope.h. References __rope_iterator_base::index, and replace.
01763 { replace(p.index(), c_string); }
|
|
||||||||||||||||
|
Definition at line 1760 of file stl_rope.h. References __rope_iterator_base::index, and replace.
01761 { replace(p.index(), c); }
|
|
||||||||||||||||
|
Definition at line 1758 of file stl_rope.h. References __rope_iterator_base::index, and replace.
01759 { replace(p.index(), r); }
|
|
||||||||||||||||||||||||
|
Definition at line 1753 of file stl_rope.h. References __rope_iterator_base::index, and replace.
01755 { replace(p.index(), q.index() - p.index(), i, j); }
|
|
||||||||||||||||||||||||
|
Definition at line 1750 of file stl_rope.h. References __rope_iterator_base::index, and replace.
01752 { replace(p.index(), q.index() - p.index(), i, j); }
|
|
||||||||||||||||||||||||
|
Definition at line 1747 of file stl_rope.h. References __rope_iterator_base::index, and replace.
01749 { replace(p.index(), q.index() - p.index(), i, j); }
|
|
||||||||||||||||||||||||
|
Definition at line 1744 of file stl_rope.h. References __rope_iterator_base::index, and replace.
01746 { replace(p.index(), q.index() - p.index(), i, n); }
|
|
||||||||||||||||||||
|
Definition at line 1741 of file stl_rope.h. References __rope_iterator_base::index, and replace.
01743 { replace(p.index(), q.index() - p.index(), c_string); }
|
|
||||||||||||||||||||
|
Definition at line 1739 of file stl_rope.h. References __rope_iterator_base::index, and replace.
01740 { replace(p.index(), q.index() - p.index(), c); }
|
|
||||||||||||||||||||
|
Definition at line 1736 of file stl_rope.h. References __rope_iterator_base::index, and replace.
01738 { replace(p.index(), q.index() - p.index(), r); }
|
|
||||||||||||||||||||
|
Definition at line 1696 of file stl_rope.h. References replace.
01697 {
01698 replace(p, 1, i, j);
01699 }
|
|
||||||||||||||||||||
|
Definition at line 1691 of file stl_rope.h. References replace.
01692 {
01693 replace(p, 1, i, j);
01694 }
|
|
||||||||||||||||||||
|
Definition at line 1687 of file stl_rope.h. References replace.
01687 {
01688 replace(p, 1, i, j);
01689 }
|
|
||||||||||||||||
|
Definition at line 1683 of file stl_rope.h. References replace.
01683 {
01684 replace(p, 1, c_string);
01685 }
|
|
||||||||||||||||||||
|
Definition at line 1679 of file stl_rope.h. References replace.
01679 {
01680 replace(p, 1, i, i_len);
01681 }
|
|
||||||||||||||||
|
Definition at line 1675 of file stl_rope.h. References replace.
01675 {
01676 replace(p, 1, r);
01677 }
|
|
||||||||||||||||
|
Definition at line 1670 of file stl_rope.h.
01670 {
01671 iterator i(this, p);
01672 *i = c;
01673 }
|
|
||||||||||||||||||||||||
|
Definition at line 1663 of file stl_rope.h. References replace.
|
|
||||||||||||||||||||||||
|
Definition at line 1657 of file stl_rope.h. References replace.
|
|
||||||||||||||||||||||||
|
Definition at line 1652 of file stl_rope.h. References replace.
|
|
||||||||||||||||||||
|
Definition at line 1647 of file stl_rope.h. References replace.
|
|
||||||||||||||||||||
|
Definition at line 1642 of file stl_rope.h. References replace.
|
|
||||||||||||||||||||||||
|
Definition at line 1637 of file stl_rope.h. References replace.
|
|
||||||||||||||||||||
|
Definition at line 1630 of file stl_rope.h. References replace, tree_ptr, and unref.
|
|
||||||||||||||||||||||||
|
Definition at line 1559 of file stl_rope.h. References concat, ref, size, and substring. Referenced by erase, insert, and replace.
01560 {
01561 if (0 == old) { ref(r); return r; }
01562 self_destruct_ptr left(substring(old, 0, pos1));
01563 self_destruct_ptr right(substring(old, pos2, old -> size));
01564 RopeBase * result;
01565
01566 if (0 == r) {
01567 result = concat(left, right);
01568 } else {
01569 self_destruct_ptr left_result(concat(left, r));
01570 result = concat(left_result, right);
01571 }
01572 return result;
01573 }
|
|
|||||||||
|
|
|
||||||||||||||||||||
|
Referenced by rope. |
|
||||||||||||||||
|
Referenced by rope, and RopeLeaf_from_unowned_char_ptr. |
|
||||||||||||||||
|
Definition at line 1092 of file stl_rope.h. References __STL_TRY, __STL_UNWIND, alloc_copy, RopeLeaf_from_char_ptr, and size. Referenced by push_front, and rope.
01093 {
01094 charT * buf = alloc_copy(s, size);
01095 __STL_TRY {
01096 return RopeLeaf_from_char_ptr(buf, size);
01097 }
01098 __STL_UNWIND(RopeBase::free_string(buf, size))
01099 }
|
|
||||||||||
|
Definition at line 1058 of file stl_rope.h. Referenced by alloc_copy, allocated_capacity, and rope.
01058 {
01059 return RopeBase::rounded_up_size(n);
01060 }
|
|
|||||||||
|
Definition at line 1442 of file stl_rope.h. References size, and size_type. Referenced by alloc_copy, back, const_end, copy, end, insert, is_almost_balanced, is_balanced, is_roughly_balanced, length, mutable_end, pop_back, pop_front, replace, RopeLeaf_from_unowned_char_ptr, and size.
|
|
||||||||||
|
Definition at line 1808 of file stl_rope.h. References __rope_iterator_base::index, and substring.
01808 {
01809 size_t pos = start.index();
01810 return rope<charT,Alloc>(substring(tree_ptr, pos, pos + 1));
01811 }
|
|
||||||||||||||||
|
Definition at line 1801 of file stl_rope.h. References __rope_iterator_base::index, and substring.
01801 {
01802 // This might eventually take advantage of the cache in the
01803 // iterator.
01804 return rope<charT,Alloc>
01805 (substring(tree_ptr, start.index(), end.index()));
01806 }
|
|
||||||||||
|
Definition at line 1795 of file stl_rope.h. References __rope_iterator_base::index, and substring.
01795 {
01796 size_t pos = start.index();
01797 return rope<charT,Alloc>(
01798 substring(tree_ptr, pos, pos + 1));
01799 }
|
|
||||||||||||||||
|
Definition at line 1790 of file stl_rope.h. References __rope_iterator_base::index, and substring.
01790 {
01791 return rope<charT,Alloc>(
01792 substring(tree_ptr, start.index(), end.index()));
01793 }
|
|
||||||||||||||||
|
Definition at line 1785 of file stl_rope.h. References substring.
01785 {
01786 return rope<charT,Alloc>(
01787 substring(tree_ptr, start, start + len));
01788 }
|
|
||||||||||||||||||||
|
Referenced by append, insert, pop_back, pop_front, replace, rope, and substr. |
|
||||||||||
|
Definition at line 1550 of file stl_rope.h. References tree_ptr. Referenced by hash< crope >::operator(), and swap.
|
|
||||||||||||||||
|
|
|
||||||||||
|
Definition at line 1004 of file stl_rope.h. Referenced by append, balance, erase, insert, operator=, pop_back, pop_front, push_back, push_front, replace, and ~rope.
01005 {
01006 RopeBase::unref(t);
01007 }
|
|
|||||
|
Definition at line 922 of file stl_rope.h. |
|
|||||
|
Definition at line 923 of file stl_rope.h. |
|
|||||
|
Definition at line 919 of file stl_rope.h. |
|
|||||
|
Definition at line 918 of file stl_rope.h. |
|
|||||
|
Definition at line 921 of file stl_rope.h. |
|
|||||
|
Definition at line 920 of file stl_rope.h. |
|
|||||
|
Definition at line 924 of file stl_rope.h. |
|
||||||||||
|
Definition at line 1143 of file stl_rope.h.
01143 { return rope<charT,Alloc>(); }
|
|
||||||||||||||||
|
|
|
||||||||||||||||
|
|
|
||||||||||||||||
|
|
|
|||||
|
Definition at line 1133 of file stl_rope.h. |
|
|||||
|
Definition at line 962 of file stl_rope.h. |
|
|||||
|
Definition at line 1162 of file stl_rope.h. Referenced by is_almost_balanced, is_balanced, is_roughly_balanced, and max_size. |
|
|||||
|
Definition at line 981 of file stl_rope.h. Referenced by append, compare, insert, operator+=, operator=, replace, rope, and swap. |
| Documentation generated on Thu May 2 15:03:43 2002 |
Generated with doxygen 1.2.12 by Dimitri van Heesch , 1997-2001 |