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

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

Member Function Documentation

template<class _Ty>
enable_shared_from_this& enable_shared_from_this< _Ty >::operator= ( const enable_shared_from_this< _Ty > &  )
inlineprotected
1146  { // assign (do nothing)
1147  return (*this);
1148  }
template<class _Ty>
shared_ptr<_Ty> enable_shared_from_this< _Ty >::shared_from_this ( )
inline
1126  { // return shared_ptr
1127  return (shared_ptr<_Ty>(_Wptr));
1128  }
weak_ptr< _Ty > _Wptr
Definition: memory:1162
Definition: memory:245
template<class _Ty>
shared_ptr<const _Ty> enable_shared_from_this< _Ty >::shared_from_this ( ) const
inline
1131  { // return shared_ptr
1132  return (shared_ptr<const _Ty>(_Wptr));
1133  }
weak_ptr< _Ty > _Wptr
Definition: memory:1162
Definition: memory:245

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

Member Data Documentation

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

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