__gnu_cxx::__rc_string_base - Online Linux Manual PageSection : 3
Updated : 19 Jun 2018
Source : libstdc++
NAME__gnu_cxx::__rc_string_base −
SYNOPSIS
Inherits __gnu_cxx::__vstring_utility< _CharT, _Traits, _Alloc >.
Public Typestypedef _Util_Base::_CharT_alloc_type _CharT_alloc_type
typedef __vstring_utility< _CharT, _Traits, _Alloc > _Util_Base
typedef _Alloc allocator_type
typedef _CharT_alloc_type::size_type size_type
typedef _Traits traits_type
typedef _Traits::char_type value_type
Public Member Functionstemplate<typename _InputIterator > __rc_string_base (_InputIterator __beg, _InputIterator __end, const _Alloc &__a)
__rc_string_base (size_type __n, _CharT __c, const _Alloc &__a)
__rc_string_base (__rc_string_base &&__rcs)
__rc_string_base (const __rc_string_base &__rcs)
__rc_string_base (const _Alloc &__a)
void _M_assign (const __rc_string_base &__rcs)
size_type _M_capacity () const
void _M_clear ()
template<> bool _M_compare (const __rc_string_base &__rcs) const
template<> bool _M_compare (const __rc_string_base &__rcs) const
bool _M_compare (const __rc_string_base &) const
_CharT * _M_data () const
void _M_erase (size_type __pos, size_type __n)
const allocator_type & _M_get_allocator () const
allocator_type & _M_get_allocator ()
bool _M_is_shared () const
void _M_leak ()
size_type _M_length () const
size_type _M_max_size () const
void _M_mutate (size_type __pos, size_type __len1, const _CharT *__s, size_type __len2)
void _M_reserve (size_type __res)
void _M_set_leaked ()
void _M_set_length (size_type __n)
void _M_swap (__rc_string_base &__rcs)
template<typename _InIterator > _CharT * _S_construct (_InIterator __beg, _InIterator __end, const _Alloc &__a, std::forward_iterator_tag)
Protected Typestypedef __gnu_cxx::__normal_iterator< const_pointer, __gnu_cxx::__versa_string< _CharT, _Traits, _Alloc, __rc_string_base > > __const_rc_iterator
typedef __gnu_cxx::__normal_iterator< const_pointer, __gnu_cxx::__versa_string< _CharT, _Traits, _Alloc, __sso_string_base > > __const_sso_iterator
typedef __gnu_cxx::__normal_iterator< pointer, __gnu_cxx::__versa_string< _CharT, _Traits, _Alloc, __rc_string_base > > __rc_iterator
typedef __gnu_cxx::__normal_iterator< pointer, __gnu_cxx::__versa_string< _CharT, _Traits, _Alloc, __sso_string_base > > __sso_iterator
typedef _CharT_alloc_type::const_pointer const_pointer
typedef _CharT_alloc_type::difference_type difference_type
typedef _CharT_alloc_type::pointer pointer
Static Protected Member Functionsstatic void _S_assign (_CharT *__d, size_type __n, _CharT __c)
static int _S_compare (size_type __n1, size_type __n2)
static void _S_copy (_CharT *__d, const _CharT *__s, size_type __n)
static void _S_copy_chars (_CharT *__p, const _CharT *__k1, const _CharT *__k2)
static void _S_copy_chars (_CharT *__p, _CharT *__k1, _CharT *__k2)
static void _S_copy_chars (_CharT *__p, __const_rc_iterator __k1, __const_rc_iterator __k2)
static void _S_copy_chars (_CharT *__p, __rc_iterator __k1, __rc_iterator __k2)
static void _S_copy_chars (_CharT *__p, __const_sso_iterator __k1, __const_sso_iterator __k2)
static void _S_copy_chars (_CharT *__p, __sso_iterator __k1, __sso_iterator __k2)
template<typename _Iterator > static void _S_copy_chars (_CharT *__p, _Iterator __k1, _Iterator __k2)
static void _S_move (_CharT *__d, const _CharT *__s, size_type __n)
Detailed Description
template<typename _CharT, typename _Traits, typename _Alloc> class __gnu_cxx::__rc_string_base< _CharT, _Traits, _Alloc >Documentation? What's that? Nathan Myers <ncm@cantrip.org>. A string looks like this: [_Rep]
_M_length
[__rc_string_base<char_type>] _M_capacity
_M_dataplus _M_refcount
_M_p ----------------> unnamed array of char_typeWhere the _M_p points to the first character in the string, and you cast it to a pointer-to-_Rep and subtract 1 to get a pointer to the header. This approach has the enormous advantage that a string object requires only one allocation. All the ugliness is confined within a single pair of inline functions, which each compile to a single 'add' instruction: _Rep::_M_refdata(), and __rc_string_base::_M_rep(); and the allocation function which gets a block of raw bytes and with room enough and constructs a _Rep object at the front. The reason you want _M_data pointing to the character array and not the _Rep is so that the debugger can see the string contents. (Probably we should add a non-inline member to get the _Rep for the debugger to use, so users can check the actual string length.) Note that the _Rep object is a POD so that you can have a static 'empty string' _Rep object already 'constructed' before static constructors have run. The reference-count encoding is chosen so that a 0 indicates one reference, so you never try to destroy the empty-string _Rep object. All but the last paragraph is considered pretty conventional for a C++ string implementation. Definition at line 81 of file rc_string_base.h.
AuthorGenerated automatically by Doxygen for libstdc++ from the source code. 0
Johanes Gumabo
Data Size : 22,788 byte
man-__gnu_cxx::__rc_string_base.3Build : 2024-12-05, 20:55 :
Visitor Screen : x
Visitor Counter ( page / site ) : 4 / 165,463
Visitor ID : :
Visitor IP : 3.141.201.46 :
Visitor Provider : AMAZON-02 :
Provider Position ( lat x lon ) : 39.962500 x -83.006100 : x
Provider Accuracy Radius ( km ) : 1000 :
Provider City : Columbus :
Provider Province : Ohio , : ,
Provider Country : United States :
Provider Continent : North America :
Visitor Recorder : Version :
Visitor Recorder : Library :
Online Linux Manual Page : Version : Online Linux Manual Page - Fedora.40 - march=x86-64 - mtune=generic - 24.12.05
Online Linux Manual Page : Library : lib_c - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Online Linux Manual Page : Library : lib_m - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Data Base : Version : Online Linux Manual Page Database - 24.04.13 - march=x86-64 - mtune=generic - fedora-38
Data Base : Library : lib_c - 23.02.07 - march=x86-64 - mtune=generic - fedora.36
Very long time ago, I have the best tutor, Wenzel Svojanovsky . If someone knows the email address of Wenzel Svojanovsky , please send an email to johanes_gumabo@yahoo.co.id .
If error, please print screen and send to johanes_gumabo@yahoo.co.id
Under development. Support me via PayPal.