STLdoc
STLdocumentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Public Types | Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
stdext::threads::thread_specific_ptr< _Val_type > Class Template Reference

Public Types

typedef thread_specific_ptr< _Val_type_Myt
 
typedef _Val_type _Myval
 

Public Member Functions

 thread_specific_ptr ()
 
 ~thread_specific_ptr () _NOEXCEPT
 
_Myvalget () const
 
_Myvaloperator* () const
 
_Myvaloperator-> () const
 
_Myvalrelease ()
 
void reset (_Myval *_Arg=0)
 

Private Member Functions

 thread_specific_ptr (const _Myt &)
 
_Mytoperator= (const _Myt &)
 

Static Private Member Functions

static void _Dtor (void *_Ptr)
 

Private Attributes

_Tss_t _Key
 

Member Typedef Documentation

template<class _Val_type >
typedef _Val_type stdext::threads::thread_specific_ptr< _Val_type >::_Myval

Constructor & Destructor Documentation

template<class _Val_type >
stdext::threads::thread_specific_ptr< _Val_type >::thread_specific_ptr ( )
inline
26  { // construct
28  }
int _Validate(int _Res)
Definition: exceptions:45
static void _Dtor(void *_Ptr)
Definition: tss:70
_CRTIMP2_PURE int __cdecl _Tss_create(_Tss_t *, _Tss_dtor_t)
_Tss_t _Key
Definition: tss:68
template<class _Val_type >
stdext::threads::thread_specific_ptr< _Val_type >::~thread_specific_ptr ( )
inline
31  { // destroy
33  }
_Tss_t _Key
Definition: tss:68
_CRTIMP2_PURE int __cdecl _Tss_delete(_Tss_t)
template<class _Val_type >
stdext::threads::thread_specific_ptr< _Val_type >::thread_specific_ptr ( const _Myt )
private

Member Function Documentation

template<class _Val_type >
static void stdext::threads::thread_specific_ptr< _Val_type >::_Dtor ( void _Ptr)
inlinestaticprivate
71  { // delete an object
72  delete (_Myval *)_Ptr;
73  }
_Val_type _Myval
Definition: tss:23
template<class _Val_type >
_Myval* stdext::threads::thread_specific_ptr< _Val_type >::get ( ) const
inline
36  { // return stored pointer
37  return ((_Myval *)_Tss_get(_Key));
38  }
_Val_type _Myval
Definition: tss:23
_CRTIMP2_PURE void *__cdecl _Tss_get(_Tss_t)
_Tss_t _Key
Definition: tss:68
template<class _Val_type >
_Myval& stdext::threads::thread_specific_ptr< _Val_type >::operator* ( ) const
inline
41  { // return reference to pointed-to object
43  "threads::thread::operator* called with null object pointer");
44  return (*(_Myval *)_Tss_get(_Key));
45  }
_Val_type _Myval
Definition: tss:23
_CRTIMP2_PURE void *__cdecl _Tss_get(_Tss_t)
#define _THREAD_ASSERT(expr, msg)
Definition: xthrcommon.h:66
_Tss_t _Key
Definition: tss:68
template<class _Val_type >
_Myval* stdext::threads::thread_specific_ptr< _Val_type >::operator-> ( ) const
inline
48  { // return stored pointer
49  return (_STD addressof(**this));
50  }
_Ty * addressof(_Ty &_Val) _NOEXCEPT
Definition: xstddef:91
template<class _Val_type >
_Myt& stdext::threads::thread_specific_ptr< _Val_type >::operator= ( const _Myt )
private
template<class _Val_type >
_Myval* stdext::threads::thread_specific_ptr< _Val_type >::release ( )
inline
53  { // set stored pointer to null
54  _Myval *_Ptr = (_Myval *)_Tss_get(_Key);
55  _Validate(_Tss_set(_Key, 0));
56  return (_Ptr);
57  }
_Val_type _Myval
Definition: tss:23
_CRTIMP2_PURE void *__cdecl _Tss_get(_Tss_t)
int _Validate(int _Res)
Definition: exceptions:45
_CRTIMP2_PURE int __cdecl _Tss_set(_Tss_t, void *)
_Tss_t _Key
Definition: tss:68
template<class _Val_type >
void stdext::threads::thread_specific_ptr< _Val_type >::reset ( _Myval _Arg = 0)
inline
60  { // delete pointed-to object
61  _Myval *_Ptr = (_Myval *)_Tss_get(_Key);
62  if (_Ptr != _Arg)
63  delete _Ptr;
64  _Validate(_Tss_set(_Key, _Arg));
65  }
_Val_type _Myval
Definition: tss:23
_CRTIMP2_PURE void *__cdecl _Tss_get(_Tss_t)
int _Validate(int _Res)
Definition: exceptions:45
_CRTIMP2_PURE int __cdecl _Tss_set(_Tss_t, void *)
_Tss_t _Key
Definition: tss:68

Member Data Documentation

template<class _Val_type >
_Tss_t stdext::threads::thread_specific_ptr< _Val_type >::_Key
private

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