Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members

FX::FXAutoThreadStorageKey Class Reference

Automatically generated thread-local storage key. More...

#include <FXAutoThreadStorageKey.h>

Public Member Functions

 FXAutoThreadStorageKey ()
 Acquire a unique thread-local storage key.
 
 operator FXThreadStorageKey () const
 Return the thread-local storage key.
 
void set (FXptr ptr) const
 Set thread local storage associated with this key.
 
FXptr get () const
 Get thread local storage associated with this key.
 
 ~FXAutoThreadStorageKey ()
 Release thread-local storage key.
 

Detailed Description

Automatically generated thread-local storage key.

This class manages a thread-local storage key, generating a new one when constructed, and deleting the storage key when destroyed; FXAutoThreadStorageKey is typically used to declare global variables to be used as thread-local storage keys. These keys can be used just like FXThreadStorageKey itself by virtue of the conversion operator. Note that no assignment or copy-constructors have been defined; thus each instance of this class represents a unique thread-local storage key.


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

Copyright © 1997-2022 Jeroen van der Zijp