Documentation de SFML 2.6.1
Attention: cette page se réfère à une ancienne version de SFML. Cliquez ici pour passer à la dernière version.Loading...
Searching...
No Matches
Defines variables with thread-local storage. More...
#include <SFML/System/ThreadLocal.hpp>
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. | |
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.
sf::ThreadLocal::ThreadLocal | ( | void * | value = NULL | ) |
Default constructor.
value | Optional value to initialize the variable |
sf::ThreadLocal::~ThreadLocal | ( | ) |
Destructor.
void * sf::ThreadLocal::getValue | ( | ) | const |
Retrieve the thread-specific value of the variable.
void sf::ThreadLocal::setValue | ( | void * | value | ) |
Set the thread-specific value of the variable.
value | Value of the variable for the current thread |