|
libbio
|
#include <SafelyAccess.h>
Public Member Functions | |
| SafelyAccess () | |
| SafelyAccess (Pointer< CLASS > toAccess) | |
| ~SafelyAccess () | |
| Pointer< CLASS > | operator-> () |
| Pointer< const CLASS > | operator-> () const |
| Pointer< CLASS > | operator* () |
| Pointer< const CLASS > | operator* () const |
SafelyAccess<> is a simple RAII wrapper around a ThreadSafe object.
If you don't supply the object to wrap, we assume it's a bio::Singleton with an Instance() method.
To access the members of a SafelyAccess<>ed class, please use the -> operator and only dereference if you absolutely must.
As always when dealing with threads, be careful about where you create and destroy these. Don't keep them around too long and don't deadlock ;)
| CLASS | a child of bio::ThreadSafe. |
|
inline |
Constructor for Singletons.
Constructor for all other ThreadSafe objects.
| toAccess |
|
inline |
Release RAII lock.
Access the locked object.
|
inline |
Access the locked object.
Access the locked object.
|
inline |
Access the locked object.