ReactOS 0.4.15-dev-7842-g558ab78
_Rope_RopeRep< _CharT, _Alloc > Struct Template Reference

#include <_rope.h>

Inheritance diagram for _Rope_RopeRep< _CharT, _Alloc >:
Collaboration diagram for _Rope_RopeRep< _CharT, _Alloc >:

Public Types

enum  { _S_max_rope_depth = __ROPE_MAX_DEPTH }
 
enum  _Tag { _S_leaf , _S_concat , _S_substringfn , _S_function }
 
enum  { _S_alloc_granularity = 8 }
 
typedef _Rope_RopeRep< _CharT, _Alloc_Self
 
typedef _Alloc allocator_type
 
typedef _STLP_TYPENAME _STLP_PRIV _BasicCharType< _CharT >::_Ret _IsBasicCharType
 

Public Member Functions

allocator_type get_allocator () const
 
 _Rope_RopeRep (_Tag __t, unsigned char __d, bool __b, size_t _p_size, allocator_type __a)
 
void _M_free_c_string ()
 
void _M_free_tree ()
 
void _M_unref_nonnil ()
 
void _M_ref_nonnil ()
 
- Public Member Functions inherited from _Refcount_Base
 _Refcount_Base (__stl_atomic_t __n)
 
__stl_atomic_t _M_incr ()
 
__stl_atomic_t _M_decr ()
 

Static Public Member Functions

static size_t _S_rounded_up_size (size_t __n)
 
static void _S_free_string (_CharT *__s, size_t __len, allocator_type __a)
 
static void _S_unref (_Self *__t)
 
static void _S_ref (_Self *__t)
 

Public Attributes

_Tag _M_tag:8
 
bool _M_is_balanced:8
 
unsigned char _M_depth
 
_CharT *_STLP_VOLATILE _M_c_string
 
_STLP_PRIV _STLP_alloc_proxy< size_t, _CharT, allocator_type_M_size
 

Detailed Description

template<class _CharT, class _Alloc>
struct _Rope_RopeRep< _CharT, _Alloc >

Definition at line 327 of file _rope.h.

Member Typedef Documentation

◆ _IsBasicCharType

template<class _CharT , class _Alloc >
typedef _STLP_TYPENAME _STLP_PRIV _BasicCharType<_CharT>::_Ret _Rope_RopeRep< _CharT, _Alloc >::_IsBasicCharType

Definition at line 387 of file _rope.h.

◆ _Self

template<class _CharT , class _Alloc >
typedef _Rope_RopeRep<_CharT, _Alloc> _Rope_RopeRep< _CharT, _Alloc >::_Self

Definition at line 330 of file _rope.h.

◆ allocator_type

template<class _CharT , class _Alloc >
typedef _Alloc _Rope_RopeRep< _CharT, _Alloc >::allocator_type

Definition at line 356 of file _rope.h.

Member Enumeration Documentation

◆ anonymous enum

template<class _CharT , class _Alloc >
anonymous enum
Enumerator
_S_max_rope_depth 

Definition at line 344 of file _rope.h.

#define __ROPE_MAX_DEPTH
Definition: _rope.h:342
@ _S_max_rope_depth
Definition: _rope.h:344

◆ anonymous enum

template<class _CharT , class _Alloc >
anonymous enum
Enumerator
_S_alloc_granularity 

Definition at line 350 of file _rope.h.

@ _S_alloc_granularity
Definition: _rope.h:350

◆ _Tag

template<class _CharT , class _Alloc >
enum _Rope_RopeRep::_Tag
Enumerator
_S_leaf 
_S_concat 
_S_substringfn 
_S_function 

Definition at line 345 of file _rope.h.

Constructor & Destructor Documentation

◆ _Rope_RopeRep()

template<class _CharT , class _Alloc >
_Rope_RopeRep< _CharT, _Alloc >::_Rope_RopeRep ( _Tag  __t,
unsigned char  __d,
bool  __b,
size_t  _p_size,
allocator_type  __a 
)
inline

Definition at line 378 of file _rope.h.

379 :
381 _M_tag(__t), _M_is_balanced(__b), _M_depth(__d), _M_c_string(0), _M_size(__a, _p_size) {
382#if defined (_STLP_CHECK_RUNTIME_COMPATIBILITY)
383 _STLP_CHECK_RUNTIME_COMPATIBILITY();
384#endif
385 }
_CharT *_STLP_VOLATILE _M_c_string
Definition: _rope.h:361
_Tag _M_tag
Definition: _rope.h:352
unsigned char _M_depth
Definition: _rope.h:360
bool _M_is_balanced
Definition: _rope.h:353
_STLP_PRIV _STLP_alloc_proxy< size_t, _CharT, allocator_type > _M_size
Definition: _rope.h:362

Member Function Documentation

◆ _M_free_c_string()

template<class _CharT , class _Alloc >
void _Rope_RopeRep< _CharT, _Alloc >::_M_free_c_string

Definition at line 76 of file _rope.c.

76 {
77 _CharT* __cstr = _M_c_string;
78 if (0 != __cstr) {
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);
82 }
83}
_Value _M_data
Definition: _alloc.h:478

Referenced by rope< _CharT, _Alloc >::_S_destr_concat_char_iter(), rope< _CharT, _Alloc >::_S_fetch_ptr(), _Terminate_RopeLeaf(), _Rope_RopeConcatenation< _CharT, _Alloc >::~_Rope_RopeConcatenation(), _Rope_RopeFunction< _CharT, _Alloc >::~_Rope_RopeFunction(), and _Rope_RopeLeaf< _CharT, _Alloc >::~_Rope_RopeLeaf().

◆ _M_free_tree()

template<class _CharT , class _Alloc >
void _Rope_RopeRep< _CharT, _Alloc >::_M_free_tree

Definition at line 316 of file _rope.c.

316 {
317 switch (_M_tag) {
318 case _S_leaf:
319 {
320 typedef _Rope_RopeLeaf<_CharT, _Alloc> _RopeLeaf;
321 _RopeLeaf* __l = __STATIC_CAST(_RopeLeaf*, this);
322 _STLP_STD::_Destroy(__l); // ->_Rope_RopeLeaf<_CharT,_Alloc>::~_Rope_RopeLeaf();
324 _RopeLeaf).deallocate(__l, 1);
325 break;
326 }
327 case _S_concat:
328 {
329 typedef _Rope_RopeConcatenation<_CharT, _Alloc> _RopeConcatenation;
330 _RopeConcatenation* __c = __STATIC_CAST(_RopeConcatenation*, this);
331 _STLP_STD::_Destroy(__c);
333 _RopeConcatenation).deallocate(__c, 1);
334 break;
335 }
336 case _S_function:
337 {
338 typedef _Rope_RopeFunction<_CharT, _Alloc> _RopeFunction;
339 _RopeFunction* __f = __STATIC_CAST(_RopeFunction*, this);
340 _STLP_STD::_Destroy(__f);
342 _RopeFunction).deallocate(__f, 1);
343 break;
344 }
345 case _S_substringfn:
346 {
347 typedef _Rope_RopeSubstring<_CharT, _Alloc> _RopeSubstring;
348 _RopeSubstring* __rss = __STATIC_CAST(_RopeSubstring*, this);
349 _STLP_STD::_Destroy(__rss);
351 _RopeSubstring).deallocate(__rss, 1);
352 break;
353 }
354 }
355}
#define _STLP_CREATE_ALLOCATOR(__atype, __a, _Tp)
Definition: _rope.h:81
#define __STATIC_CAST(__x, __y)
Definition: features.h:585
#define __c
Definition: schilyio.h:209
_Alloc allocator_type
Definition: _rope.h:356

Referenced by _Rope_RopeRep< _CharT, _Alloc >::_M_unref_nonnil().

◆ _M_ref_nonnil()

◆ _M_unref_nonnil()

◆ _S_free_string()

template<class _CharT , class _Alloc >
static void _Rope_RopeRep< _CharT, _Alloc >::_S_free_string ( _CharT *  __s,
size_t  __len,
allocator_type  __a 
)
inlinestatic

Definition at line 411 of file _rope.h.

412 {
413 _STLP_STD::_Destroy_Range(__s, __s + __len);
414 // This has to be a static member, so this gets a bit messy
415# ifndef _STLP_DONT_SUPPORT_REBIND_MEMBER_TEMPLATE
416 __a.deallocate(__s, _S_rounded_up_size(__len)); //*ty 03/24/2001 - restored not to use __stl_alloc_rebind() since it is not defined under _STLP_MEMBER_TEMPLATE_CLASSES
417# else
418 __stl_alloc_rebind (__a, (_CharT*)0).deallocate(__s, _S_rounded_up_size(__len));
419# endif
420 }
allocator< _Tp2 > &_STLP_CALL __stl_alloc_rebind(allocator< _Tp1 > &__a, const _Tp2 *)
Definition: _alloc.h:462
static size_t _S_rounded_up_size(size_t __n)
Definition: _rope.h:407

Referenced by rope< _CharT, _Alloc >::_S_RopeLeaf_from_unowned_char_ptr(), rope< _CharT, _Alloc >::rope(), and _Rope_RopeLeaf< _CharT, _Alloc >::~_Rope_RopeLeaf().

◆ _S_ref()

template<class _CharT , class _Alloc >
static void _Rope_RopeRep< _CharT, _Alloc >::_S_ref ( _Self __t)
inlinestatic

Definition at line 442 of file _rope.h.

442 {
443 if (0 != __t) __t->_M_incr();
444 }

Referenced by _Rope_iterator< _CharT, _Alloc >::_Rope_iterator(), rope< _CharT, _Alloc >::_S_ref(), and _Rope_iterator< _CharT, _Alloc >::operator=().

◆ _S_rounded_up_size()

template<class _CharT , class _Alloc >
static size_t _Rope_RopeRep< _CharT, _Alloc >::_S_rounded_up_size ( size_t  __n)
inlinestatic

Definition at line 407 of file _rope.h.

409 { return (__n + _S_alloc_granularity) & ~(_S_alloc_granularity - 1); }
return __n
Definition: _algo.h:75

Referenced by _Rope_RopeRep< _CharT, _Alloc >::_S_free_string(), and rope< _CharT, _Alloc >::_S_rounded_up_size().

◆ _S_unref()

template<class _CharT , class _Alloc >
static void _Rope_RopeRep< _CharT, _Alloc >::_S_unref ( _Self __t)
inlinestatic

◆ get_allocator()

Member Data Documentation

◆ _M_c_string

◆ _M_depth

◆ _M_is_balanced

template<class _CharT , class _Alloc >
bool _Rope_RopeRep< _CharT, _Alloc >::_M_is_balanced

Definition at line 353 of file _rope.h.

Referenced by rope< _CharT, _Alloc >::_S_concat_and_set_balanced().

◆ _M_size

◆ _M_tag


The documentation for this struct was generated from the following files: