STLdoc
STLdocumentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Public Types | Public Member Functions | Private Member Functions | Private Attributes | List of all members
_Ref_count_obj_alloc< _Ty, _Alloc > Class Template Reference
Inheritance diagram for _Ref_count_obj_alloc< _Ty, _Alloc >:
_Ref_count_base

Public Types

typedef _Ref_count_obj_alloc< _Ty, _Alloc > _Myt
 
typedef _Wrap_alloc< _Alloc > _Myalty0
 
typedef _Myalty0::template rebind< _Myt >::other _Myalty
 
typedef aligned_union< 1, _Ty >::type _Mystoragety
 

Public Member Functions

template<class... _Types>
 _Ref_count_obj_alloc (const _Alloc &_Al_arg, _Types &&..._Args)
 
_Ty * _Getptr () const
 
- Public Member Functions inherited from _Ref_count_base
virtual ~_Ref_count_base () _NOEXCEPT
 
bool _Incref_nz ()
 
void _Incref ()
 
void _Incwref ()
 
void _Decref ()
 
void _Decwref ()
 
long _Use_count () const _NOEXCEPT
 
bool _Expired () const _NOEXCEPT
 
virtual void_Get_deleter (const type_info &) const _NOEXCEPT
 

Private Member Functions

virtual void _Destroy () _NOEXCEPT
 
virtual void _Delete_this () _NOEXCEPT
 

Private Attributes

_Compressed_pair< _Myalty, _Mystoragety_Mypair
 

Additional Inherited Members

- Protected Member Functions inherited from _Ref_count_base
 _Ref_count_base ()
 

Member Typedef Documentation

template<class _Ty , class _Alloc >
typedef _Myalty0::template rebind<_Myt>::other _Ref_count_obj_alloc< _Ty, _Alloc >::_Myalty
template<class _Ty , class _Alloc >
typedef _Wrap_alloc<_Alloc> _Ref_count_obj_alloc< _Ty, _Alloc >::_Myalty0
template<class _Ty , class _Alloc >
typedef aligned_union<1, _Ty>::type _Ref_count_obj_alloc< _Ty, _Alloc >::_Mystoragety
template<class _Ty , class _Alloc >
typedef _Ref_count_obj_alloc<_Ty, _Alloc> _Ref_count_obj_alloc< _Ty, _Alloc >::_Myt

Constructor & Destructor Documentation

template<class _Ty , class _Alloc >
template<class... _Types>
_Ref_count_obj_alloc< _Ty, _Alloc >::_Ref_count_obj_alloc ( const _Alloc &  _Al_arg,
_Types &&...  _Args 
)
inline
1352  { // construct from argument list, allocator
1353  ::new ((void *)_Getptr()) _Ty(_STD forward<_Types>(_Args)...);
1354  }
_Ref_count_base()
Definition: memory:484
_Ty * _Getptr() const
Definition: memory:1357
_Compressed_pair< _Myalty, _Mystoragety > _Mypair
Definition: memory:1375
constexpr _Ty && forward(typename remove_reference< _Ty >::type &_Arg) _NOEXCEPT
Definition: type_traits:1332
Definition: xutility:282

Member Function Documentation

template<class _Ty , class _Alloc >
virtual void _Ref_count_obj_alloc< _Ty, _Alloc >::_Delete_this ( )
inlineprivatevirtual

Implements _Ref_count_base.

1369  { // destroy self
1370  _Myalty _Al = _Mypair._Get_first();
1371  _Al.destroy(this);
1372  _Al.deallocate(_Al.address(*this), 1);
1373  }
_Ty1 & _Get_first() _NOEXCEPT
Definition: xutility:316
_Compressed_pair< _Myalty, _Mystoragety > _Mypair
Definition: memory:1375
_Myalty0::template rebind< _Myt >::other _Myalty
Definition: memory:1346
template<class _Ty , class _Alloc >
virtual void _Ref_count_obj_alloc< _Ty, _Alloc >::_Destroy ( )
inlineprivatevirtual

Implements _Ref_count_base.

1364  { // destroy managed resource
1365  _Getptr()->~_Ty();
1366  }
_Ty * _Getptr() const
Definition: memory:1357
template<class _Ty , class _Alloc >
_Ty* _Ref_count_obj_alloc< _Ty, _Alloc >::_Getptr ( ) const
inline
1358  { // get pointer
1359  return ((_Ty *)&_Mypair._Get_second());
1360  }
_Ty2 & _Get_second() _NOEXCEPT
Definition: xutility:336
_Compressed_pair< _Myalty, _Mystoragety > _Mypair
Definition: memory:1375

Member Data Documentation

template<class _Ty , class _Alloc >
_Compressed_pair<_Myalty, _Mystoragety> _Ref_count_obj_alloc< _Ty, _Alloc >::_Mypair
private

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