The C++ framework for developing highly scalable, high performance servers on Windows platforms.

CThreadLocalStorage Class Reference

Collaboration diagram for CThreadLocalStorage:

List of all members.

Public Types

typedef DWORD TLSIndex

Public Member Functions

 CThreadLocalStorage ()
 Allocates and becomes the owner of a thread local storage slot. Throws an exception if there are no more TLS slots available.
 CThreadLocalStorage (TLSIndex tlsIndex)
 Connects to an existing TLS slot.
 CThreadLocalStorage (const CThreadLocalStorage &rhs)
 ~CThreadLocalStorage ()
 If this object owns the TLS slot then it releases it.
CThreadLocalStorageoperator= (const CThreadLocalStorage &rhs)
TLSIndex GetIndex () const
 Returns the object's TLS index.
void ClearValue () const
 Clears the value of the TLS slot (sets it to zero).
void SetValue (void *pValue) const
 Sets the value of the TLS slot.
void SetValue (DWORD value) const
 Sets a DWORD value in the TLS stot without casting at the call site.
void * GetValue () const
 Returns the stored value of the TLS slot.
DWORD GetValueAsDWORD () const
 Returns the stored value of the TLS slot as a DWORD without casting at the call site.


Member Typedef Documentation

typedef DWORD TLSIndex


Constructor & Destructor Documentation

Allocates and becomes the owner of a thread local storage slot. Throws an exception if there are no more TLS slots available.

CThreadLocalStorage ( TLSIndex  tlsIndex  )  [explicit]

Connects to an existing TLS slot.

If this object owns the TLS slot then it releases it.


Member Function Documentation

CThreadLocalStorage& operator= ( const CThreadLocalStorage rhs  ) 

DWORD GetIndex (  )  const

Returns the object's TLS index.

void ClearValue (  )  const

Clears the value of the TLS slot (sets it to zero).

void SetValue ( void *  pValue  )  const

Sets the value of the TLS slot.

void SetValue ( DWORD  value  )  const

Sets a DWORD value in the TLS stot without casting at the call site.

void * GetValue (  )  const

Returns the stored value of the TLS slot.

DWORD GetValueAsDWORD (  )  const

Returns the stored value of the TLS slot as a DWORD without casting at the call site.


Generated on Sun Sep 12 19:09:07 2021 for The Server Framework - v7.4 by doxygen 1.5.3