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 |
| Lock | 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 33 of file lockable.h.
| eq::base::Lockable< D >::Lockable | ( | ) | [inline, explicit] |
| eq::base::Lockable< D >::Lockable | ( | const D & | value | ) | [inline, explicit] |
Construct and initialize a new data structure.
Definition at line 40 of file lockable.h.
| D* eq::base::Lockable< D >::operator-> | ( | ) | [inline] |
| const D* eq::base::Lockable< D >::operator-> | ( | ) | const [inline] |
| bool eq::base::Lockable< D >::operator== | ( | const D & | rhs | ) | const [inline] |
Definition at line 49 of file lockable.h.
| Lockable& eq::base::Lockable< D >::operator= | ( | const D & | rhs | ) | [inline] |
0.9.1 by
1.6.1