STLdoc
STLdocumentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Public Types | Public Member Functions | Protected Member Functions | Private Attributes | Friends | List of all members
enable_shared_from_this< _Ty > Class Template Reference

Public Types

typedef _Ty _EStype
 

Public Member Functions

shared_ptr< _Ty > shared_from_this ()
 
shared_ptr< const _Ty > shared_from_this () const
 

Protected Member Functions

constexpr enable_shared_from_this () _NOEXCEPT
 
 enable_shared_from_this (const enable_shared_from_this &) _NOEXCEPT
 
enable_shared_from_thisoperator= (const enable_shared_from_this &) _NOEXCEPT
 
 ~enable_shared_from_this () _NOEXCEPT
 

Private Attributes

weak_ptr< _Ty > _Wptr
 

Friends

template<class _Ty1 , class _Ty2 >
void _Do_enable (_Ty1 *, enable_shared_from_this< _Ty2 > *, _Ref_count_base *)
 

Member Typedef Documentation

template<class _Ty>
typedef _Ty enable_shared_from_this< _Ty >::_EStype

Constructor & Destructor Documentation

template<class _Ty>
constexpr enable_shared_from_this< _Ty >::enable_shared_from_this ( )
inlineprotected
1549  { // construct (do nothing)
1550  }
template<class _Ty>
enable_shared_from_this< _Ty >::enable_shared_from_this ( const enable_shared_from_this< _Ty > &  )
inlineprotected
1553  { // construct (do nothing)
1554  }
template<class _Ty>
enable_shared_from_this< _Ty >::~enable_shared_from_this ( )
inlineprotected
1563  { // destroy (do nothing)
1564  }

Member Function Documentation

template<class _Ty>
enable_shared_from_this& enable_shared_from_this< _Ty >::operator= ( const enable_shared_from_this< _Ty > &  )
inlineprotected
1558  { // assign (do nothing)
1559  return (*this);
1560  }
template<class _Ty>
shared_ptr<_Ty> enable_shared_from_this< _Ty >::shared_from_this ( )
inline
1538  { // return shared_ptr
1539  return (shared_ptr<_Ty>(_Wptr));
1540  }
weak_ptr< _Ty > _Wptr
Definition: memory:1574
Definition: memory:665
template<class _Ty>
shared_ptr<const _Ty> enable_shared_from_this< _Ty >::shared_from_this ( ) const
inline
1543  { // return shared_ptr
1544  return (shared_ptr<const _Ty>(_Wptr));
1545  }
weak_ptr< _Ty > _Wptr
Definition: memory:1574
Definition: memory:665

Friends And Related Function Documentation

template<class _Ty>
template<class _Ty1 , class _Ty2 >
void _Do_enable ( _Ty1 *  _Ptr,
enable_shared_from_this< _Ty2 > *  _Es,
_Ref_count_base _Refptr 
)
friend
1583  { // reset internal weak pointer
1584  _Es->_Wptr._Resetw(_Ptr, _Refptr);
1585  }
weak_ptr< _Ty > _Wptr
Definition: memory:1574

Member Data Documentation

template<class _Ty>
weak_ptr<_Ty> enable_shared_from_this< _Ty >::_Wptr
private

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