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
1136  { // construct (do nothing)
1137  }
template<class _Ty>
enable_shared_from_this< _Ty >::enable_shared_from_this ( const enable_shared_from_this< _Ty > &  )
inlineprotected
1140  { // construct (do nothing)
1141  }
template<class _Ty>
enable_shared_from_this< _Ty >::~enable_shared_from_this ( )
inlineprotected
1150  { // destroy (do nothing)
1151  }

Member Function Documentation

template<class _Ty>
enable_shared_from_this& enable_shared_from_this< _Ty >::operator= ( const enable_shared_from_this< _Ty > &  )
inlineprotected
1145  { // assign (do nothing)
1146  return (*this);
1147  }
template<class _Ty>
shared_ptr<_Ty> enable_shared_from_this< _Ty >::shared_from_this ( )
inline
1125  { // return shared_ptr
1126  return (shared_ptr<_Ty>(_Wptr));
1127  }
weak_ptr< _Ty > _Wptr
Definition: memory:1161
Definition: memory:242
template<class _Ty>
shared_ptr<const _Ty> enable_shared_from_this< _Ty >::shared_from_this ( ) const
inline
1130  { // return shared_ptr
1131  return (shared_ptr<const _Ty>(_Wptr));
1132  }
weak_ptr< _Ty > _Wptr
Definition: memory:1161
Definition: memory:242

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
1170  { // reset internal weak pointer
1171  _Es->_Wptr._Resetw(_Ptr, _Refptr);
1172  }
weak_ptr< _Ty > _Wptr
Definition: memory:1161

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: