Lunchbox
1.9.1
|
A convenience structure to hold data together with a lock for access. More...
#include <lockable.h>
Public Member Functions | |
Lockable () | |
Construct a new lockable data structure. More... | |
Lockable (const D &value) | |
Construct and initialize a new data structure. More... | |
template<class P1 > | |
Lockable (const P1 &p1) | |
Construct and initialize a new data structure. More... | |
D * | operator-> () |
Access the held data. More... | |
const D * | operator-> () const |
Access the held data. More... | |
D & | operator* () |
Access the held data. More... | |
const D & | operator* () const |
Access the held data. More... | |
bool | operator== (const D &rhs) const |
Lockable & | operator= (const D &rhs) |
Assign another value to the data. More... | |
Public Attributes | |
D | data |
L | lock |
A convenience structure to hold data together with a lock for access.
Locking the data still has to be done manually, e.g, using a ScopedMutex.
Definition at line 32 of file lockable.h.
|
inline |
|
inlineexplicit |
|
inline |
Construct and initialize a new data structure.
Definition at line 42 of file lockable.h.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Definition at line 57 of file lockable.h.