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 > _Myty
 
typedef _Alloc::template rebind< _Myty >::other _Myalty
 

Public Member Functions

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

Private Member Functions

virtual void _Destroy ()
 
virtual void _Delete_this ()
 

Private Attributes

aligned_storage< sizeof(_Ty), alignment_of< _Ty >::value >::type _Storage
 
_Myalty _Myal
 

Additional Inherited Members

- Protected Member Functions inherited from _Ref_count_base
 _Ref_count_base ()
 

Member Typedef Documentation

template<class _Ty , class _Alloc >
typedef _Alloc::template rebind<_Myty>::other _Ref_count_obj_alloc< _Ty, _Alloc >::_Myalty
template<class _Ty , class _Alloc >
typedef _Ref_count_obj_alloc<_Ty, _Alloc> _Ref_count_obj_alloc< _Ty, _Alloc >::_Myty

Constructor & Destructor Documentation

template<class _Ty , class _Alloc >
template<class... _Types>
_Ref_count_obj_alloc< _Ty, _Alloc >::_Ref_count_obj_alloc ( _Myalty  _Al,
_Types &&...  _Args 
)
inline
968  : _Ref_count_base(), _Myal(_Al)
969  { // construct from argument list, allocator
970  ::new ((void *)&_Storage) _Ty(_STD forward<_Types>(_Args)...);
971  }
aligned_storage< sizeof(_Ty), alignment_of< _Ty >::value >::type _Storage
Definition: memory:993
_Ref_count_base()
Definition: memory:59
_Myalty _Myal
Definition: memory:994

Member Function Documentation

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

Implements _Ref_count_base.

986  { // destroy self
987  _Myalty _Al = _Myal;
988  _Al.destroy(this);
989  _Al.deallocate(this, 1);
990  }
_Alloc::template rebind< _Myty >::other _Myalty
Definition: memory:964
_Myalty _Myal
Definition: memory:994
template<class _Ty , class _Alloc >
virtual void _Ref_count_obj_alloc< _Ty, _Alloc >::_Destroy ( )
inlineprivatevirtual

Implements _Ref_count_base.

981  { // destroy managed resource
982  _Getptr()->~_Ty();
983  }
_Ty * _Getptr() const
Definition: memory:974
template<class _Ty , class _Alloc >
_Ty* _Ref_count_obj_alloc< _Ty, _Alloc >::_Getptr ( ) const
inline
975  { // get pointer
976  return ((_Ty *)&_Storage);
977  }
aligned_storage< sizeof(_Ty), alignment_of< _Ty >::value >::type _Storage
Definition: memory:993

Member Data Documentation

template<class _Ty , class _Alloc >
_Myalty _Ref_count_obj_alloc< _Ty, _Alloc >::_Myal
private
template<class _Ty , class _Alloc >
aligned_storage<sizeof (_Ty), alignment_of<_Ty>::value>::type _Ref_count_obj_alloc< _Ty, _Alloc >::_Storage
private

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