Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

__rope_RopeBase Struct Template Reference

#include <stl_rope.h>

Inheritance diagram for __rope_RopeBase:

Inheritance graph
[legend]
Collaboration diagram for __rope_RopeBase:

Collaboration graph
[legend]
List of all members.

Public Types

typedef rope< charT, Alloc > my_rope
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
enum  { max_rope_depth = 45 }
enum  {
  leaf, concat, substringfn,
  function
}
enum  { alloc_granularity = 8 }

Public Methods

void init_refcount_lock ()
void incr_refcount ()
size_t decr_refcount ()
void free_c_string ()
void free_tree ()
void unref_nonnil ()
void ref_nonnil ()

Static Public Methods

void free_string (charT *, size_t len)
void unref (__rope_RopeBase *t)
void ref (__rope_RopeBase *t)
void free_if_unref (__rope_RopeBase *t)
size_t rounded_up_size (size_t n)

Public Attributes

enum __rope_RopeBase:: { ... }  tag
bool is_balanced:8
unsigned char depth
size_t size
__GC_CONST charT * c_string
size_t refcount

template<class charT, class Alloc>
struct __rope_RopeBase< charT, Alloc >


Member Typedef Documentation

template<class charT, class Alloc>
typedef simple_alloc<__rope_RopeConcatenation<charT,Alloc>, Alloc> __rope_RopeBase::CAlloc
 

Definition at line 242 of file stl_rope.h.

template<class charT, class Alloc>
typedef simple_alloc<charT, Alloc> __rope_RopeBase::DataAlloc
 

Definition at line 241 of file stl_rope.h.

template<class charT, class Alloc>
typedef simple_alloc<__rope_RopeFunction<charT,Alloc>, Alloc> __rope_RopeBase::FAlloc
 

Definition at line 244 of file stl_rope.h.

template<class charT, class Alloc>
typedef simple_alloc<__rope_RopeLeaf<charT,Alloc>, Alloc> __rope_RopeBase::LAlloc
 

Definition at line 243 of file stl_rope.h.

template<class charT, class Alloc>
typedef rope<charT,Alloc> __rope_RopeBase::my_rope
 

Definition at line 240 of file stl_rope.h.

template<class charT, class Alloc>
typedef simple_alloc<__rope_RopeSubstring<charT,Alloc>, Alloc> __rope_RopeBase::SAlloc
 

Definition at line 245 of file stl_rope.h.


Member Enumeration Documentation

template<class charT, class Alloc>
anonymous enum
 

Enumeration values:
max_rope_depth 

Definition at line 247 of file stl_rope.h.

00247 { max_rope_depth = 45 };

template<class charT, class Alloc>
anonymous enum
 

Enumeration values:
leaf 
concat 
substringfn 
function 

Definition at line 248 of file stl_rope.h.

template<class charT, class Alloc>
anonymous enum
 

Enumeration values:
alloc_granularity 

Definition at line 391 of file stl_rope.h.

00391 { alloc_granularity = 8 };


Member Function Documentation

template<class charT, class Alloc>
size_t __rope_RopeBase< charT, Alloc >::decr_refcount   [inline]
 

Definition at line 337 of file stl_rope.h.

References refcount.

Referenced by unref_nonnil.

00338             {
00339                 --refcount;
00340                 return refcount;
00341             }

template<class charT, class Alloc>
void __rope_RopeBase< charT, Alloc >::free_c_string  
 

template<class charT, class Alloc>
void __rope_RopeBase< charT, Alloc >::free_if_unref __rope_RopeBase< charT, Alloc > *    t [inline, static]
 

Definition at line 375 of file stl_rope.h.

References free_tree, and refcount.

00376           {
00377               if (0 != t && 0 == t -> refcount) t -> free_tree();
00378           }

template<class charT, class Alloc>
void __rope_RopeBase< charT, Alloc >::free_string charT *   ,
size_t    len
[static]
 

template<class charT, class Alloc>
void __rope_RopeBase< charT, Alloc >::free_tree  
 

Referenced by free_if_unref, and unref_nonnil.

template<class charT, class Alloc>
void __rope_RopeBase< charT, Alloc >::incr_refcount   [inline]
 

Definition at line 333 of file stl_rope.h.

References refcount.

Referenced by ref, and ref_nonnil.

00334             {
00335                 ++refcount;
00336             }

template<class charT, class Alloc>
void __rope_RopeBase< charT, Alloc >::init_refcount_lock   [inline]
 

Definition at line 332 of file stl_rope.h.

Referenced by __rope_RopeSubstring::__rope_RopeSubstring.

00332 {}

template<class charT, class Alloc>
void __rope_RopeBase< charT, Alloc >::ref __rope_RopeBase< charT, Alloc > *    t [inline, static]
 

Definition at line 371 of file stl_rope.h.

References incr_refcount.

00372           {
00373               if (0 != t) t -> incr_refcount();
00374           }

template<class charT, class Alloc>
void __rope_RopeBase< charT, Alloc >::ref_nonnil   [inline]
 

Definition at line 361 of file stl_rope.h.

References incr_refcount.

Referenced by __rope_RopeSubstring::__rope_RopeSubstring.

00362           {
00363               incr_refcount();
00364           }

template<class charT, class Alloc>
size_t __rope_RopeBase< charT, Alloc >::rounded_up_size size_t    n [inline, static]
 

Definition at line 392 of file stl_rope.h.

References __is_basic_char_type, and alloc_granularity.

00392                                             {
00393         size_t size_with_eos;
00394              
00395         if (__is_basic_char_type((charT *)0)) {
00396             size_with_eos = n + 1;
00397         } else {
00398             size_with_eos = n;
00399         }
00400 #       ifdef __GC
00401            return size_with_eos;
00402 #       else
00403            // Allow slop for in-place expansion.
00404            return (size_with_eos + alloc_granularity-1)
00405                         &~ (alloc_granularity-1);
00406 #       endif
00407     }

template<class charT, class Alloc>
void __rope_RopeBase< charT, Alloc >::unref __rope_RopeBase< charT, Alloc > *    t [inline, static]
 

Definition at line 365 of file stl_rope.h.

References unref_nonnil.

Referenced by __rope_self_destruct_ptr::~__rope_self_destruct_ptr.

00366           {
00367               if (0 != t) {
00368                   t -> unref_nonnil();
00369               }
00370           }

template<class charT, class Alloc>
void __rope_RopeBase< charT, Alloc >::unref_nonnil   [inline]
 

Definition at line 357 of file stl_rope.h.

References decr_refcount, and free_tree.

Referenced by unref.

00358           {
00359               if (0 == decr_refcount()) free_tree();
00360           }


Member Data Documentation

template<class charT, class Alloc>
__GC_CONST charT* __rope_RopeBase::c_string
 

Definition at line 252 of file stl_rope.h.

Referenced by __rope_RopeSubstring::__rope_RopeSubstring.

template<class charT, class Alloc>
unsigned char __rope_RopeBase::depth
 

Definition at line 250 of file stl_rope.h.

Referenced by __rope_RopeSubstring::__rope_RopeSubstring.

template<class charT, class Alloc>
bool __rope_RopeBase::is_balanced
 

Definition at line 249 of file stl_rope.h.

template<class charT, class Alloc>
size_t __rope_RopeBase::refcount
 

Definition at line 263 of file stl_rope.h.

Referenced by __rope_RopeSubstring::__rope_RopeSubstring, decr_refcount, free_if_unref, and incr_refcount.

template<class charT, class Alloc>
size_t __rope_RopeBase::size
 

Definition at line 251 of file stl_rope.h.

Referenced by __rope_RopeSubstring::__rope_RopeSubstring, and __rope_RopeSubstring::operator().

enum { ... } __rope_RopeBase::tag
 

Referenced by __rope_RopeSubstring::__rope_RopeSubstring, and __rope_RopeSubstring::operator().


The documentation for this struct was generated from the following file:
logo OpenMask

Documentation generated on Thu May 2 15:03:19 2002

Generated with doxygen 1.2.12 by Dimitri van Heesch ,   1997-2001