Equalizer 1.0
|
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. | |
Lockable (const D &value) | |
Construct and initialize a new data structure. | |
D * | operator-> () |
Access the held data. | |
const D * | operator-> () const |
Access the held data. | |
bool | operator== (const D &rhs) const |
Lockable & | operator= (const D &rhs) |
Assign another value to the data. | |
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 34 of file lockable.h.
co::base::Lockable< D, L >::Lockable | ( | ) | [inline, explicit] |
co::base::Lockable< D, L >::Lockable | ( | const D & | value | ) | [inline, explicit] |
Construct and initialize a new data structure.
Definition at line 41 of file lockable.h.
D* co::base::Lockable< D, L >::operator-> | ( | ) | [inline] |
const D* co::base::Lockable< D, L >::operator-> | ( | ) | const [inline] |
Lockable& co::base::Lockable< D, L >::operator= | ( | const D & | rhs | ) | [inline] |
bool co::base::Lockable< D, L >::operator== | ( | const D & | rhs | ) | const [inline] |
Definition at line 50 of file lockable.h.