sf::ThreadLocal Class Reference

Defines variables with thread-local storage. More...

#include <ThreadLocal.hpp>

Inheritance diagram for sf::ThreadLocal:
sf::NonCopyable sf::ThreadLocalPtr< T >

List of all members.

Public Member Functions

 ThreadLocal (void *value=NULL)
 Default constructor.
 ~ThreadLocal ()
 Destructor.
void SetValue (void *value)
 Set the thread-specific value of the variable.
void * GetValue () const
 Retrieve the thread-specific value of the variable.

Detailed Description

Defines variables with thread-local storage.

This class manipulates void* parameters and thus is not appropriate for strongly-typed variables.

You should rather use the sf::ThreadLocalPtr template class.

Definition at line 47 of file ThreadLocal.hpp.


Constructor & Destructor Documentation

sf::ThreadLocal::ThreadLocal ( void *  value = NULL  ) 

Default constructor.

Parameters:
value Optional value to initalize the variable

Definition at line 45 of file ThreadLocal.cpp.

sf::ThreadLocal::~ThreadLocal (  ) 

Destructor.

Definition at line 53 of file ThreadLocal.cpp.


Member Function Documentation

void * sf::ThreadLocal::GetValue (  )  const

Retrieve the thread-specific value of the variable.

Returns:
Value of the variable for the current thread

Definition at line 67 of file ThreadLocal.cpp.

void sf::ThreadLocal::SetValue ( void *  value  ) 

Set the thread-specific value of the variable.

Parameters:
value Value of the variable for the current thread

Definition at line 60 of file ThreadLocal.cpp.


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