![]() |
PIP 5.6.1
Platform-Independent Primitives
|
Thread-safe variable template class. More...
#include <piprotectedvariable.h>
Classes | |
| class | Pointer |
| Pointer-like wrapper returned by getRef() while the protected value remains locked. More... | |
Public Member Functions | |
| PIProtectedVariable (T v=T()) | |
Constructs PIProtectedVariable and initialize variable by value v. | |
| void | set (T v) |
| Replaces the protected value with v. | |
| Pointer | getRef () |
| Locks the value and returns wrapper-based access to it. | |
| T | get () const |
| Returns a copy of the protected value. | |
| PIProtectedVariable< T > & | operator= (T v) |
| Replaces the protected value with v. | |
Thread-safe variable template class.