STLdoc
STLdocumentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Classes | Public Types | Public Member Functions | Public Attributes | List of all members
_String_val< _Val_types > Class Template Reference
Inheritance diagram for _String_val< _Val_types >:
_Container_base0

Classes

union  _Bxty
 

Public Types

enum  
 
enum  
 
typedef _String_val< _Val_types > _Myt
 
typedef _Val_types::value_type value_type
 
typedef _Val_types::size_type size_type
 
typedef _Val_types::difference_type difference_type
 
typedef _Val_types::pointer pointer
 
typedef _Val_types::const_pointer const_pointer
 
typedef _Val_types::reference reference
 
typedef _Val_types::const_reference const_reference
 
typedef _String_iterator< _Mytiterator
 
typedef _String_const_iterator< _Mytconst_iterator
 

Public Member Functions

 _String_val ()
 
value_type_Myptr ()
 
const value_type_Myptr () const
 
bool _Large_string_engaged () const
 
- Public Member Functions inherited from _Container_base0
void _Orphan_all ()
 
void _Swap_all (_Container_base0 &)
 

Public Attributes

union _String_val::_Bxty _Bx
 
size_type _Mysize
 
size_type _Myres
 

Member Typedef Documentation

template<class _Val_types >
typedef _String_val<_Val_types> _String_val< _Val_types >::_Myt
template<class _Val_types >
typedef _String_const_iterator<_Myt> _String_val< _Val_types >::const_iterator
template<class _Val_types >
typedef _Val_types::const_pointer _String_val< _Val_types >::const_pointer
template<class _Val_types >
typedef _Val_types::const_reference _String_val< _Val_types >::const_reference
template<class _Val_types >
typedef _Val_types::difference_type _String_val< _Val_types >::difference_type
template<class _Val_types >
typedef _String_iterator<_Myt> _String_val< _Val_types >::iterator
template<class _Val_types >
typedef _Val_types::pointer _String_val< _Val_types >::pointer
template<class _Val_types >
typedef _Val_types::reference _String_val< _Val_types >::reference
template<class _Val_types >
typedef _Val_types::size_type _String_val< _Val_types >::size_type
template<class _Val_types >
typedef _Val_types::value_type _String_val< _Val_types >::value_type

Member Enumeration Documentation

template<class _Val_types >
anonymous enum
1601  { // length of internal buffer, [1, 16]
1602  _BUF_SIZE = 16 / sizeof (value_type) < 1 ? 1
1603  : 16 / sizeof (value_type)};
_Val_types::value_type value_type
Definition: xstring:1582
template<class _Val_types >
anonymous enum
1605  { // roundup mask for allocated buffers, [0, 15]
1606  _ALLOC_MASK = sizeof (value_type) <= 1 ? 15
1607  : sizeof (value_type) <= 2 ? 7
1608  : sizeof (value_type) <= 4 ? 3
1609  : sizeof (value_type) <= 8 ? 1 : 0
1610  };
_Val_types::value_type value_type
Definition: xstring:1582

Constructor & Destructor Documentation

template<class _Val_types >
_String_val< _Val_types >::_String_val ( )
inline
1594  : _Bx(),
1595  _Mysize(0),
1596  _Myres(0)
1597  { // initialize values
1598  }
size_type _Mysize
Definition: xstring:1646
union _String_val::_Bxty _Bx
size_type _Myres
Definition: xstring:1647

Member Function Documentation

template<class _Val_types >
bool _String_val< _Val_types >::_Large_string_engaged ( ) const
inline
1627  { // returns whether the large string mode (allocated memory) is engaged
1628  return (this->_BUF_SIZE <= _Myres);
1629  }
size_type _Myres
Definition: xstring:1647
template<class _Val_types >
value_type* _String_val< _Val_types >::_Myptr ( )
inline
1613  { // determine current pointer to buffer for mutable string
1614  return (_Large_string_engaged()
1615  ? _Unfancy(_Bx._Ptr)
1616  : _Bx._Buf);
1617  }
pointer _Ptr
Definition: xstring:1642
union _String_val::_Bxty _Bx
auto _Unfancy(_Ptrty _Ptr)
Definition: xstddef:635
bool _Large_string_engaged() const
Definition: xstring:1626
value_type _Buf[_BUF_SIZE]
Definition: xstring:1641
template<class _Val_types >
const value_type* _String_val< _Val_types >::_Myptr ( ) const
inline
1620  { // determine current pointer to buffer for immutable string
1621  return (_Large_string_engaged()
1622  ? _Unfancy(_Bx._Ptr)
1623  : _Bx._Buf);
1624  }
pointer _Ptr
Definition: xstring:1642
union _String_val::_Bxty _Bx
auto _Unfancy(_Ptrty _Ptr)
Definition: xstddef:635
bool _Large_string_engaged() const
Definition: xstring:1626
value_type _Buf[_BUF_SIZE]
Definition: xstring:1641

Member Data Documentation

template<class _Val_types >
union _String_val::_Bxty _String_val< _Val_types >::_Bx
template<class _Val_types >
size_type _String_val< _Val_types >::_Myres
template<class _Val_types >
size_type _String_val< _Val_types >::_Mysize

The documentation for this class was generated from the following file: