MIRA
|
Specialization for Mutex=void, i.e. More...
#include <thread/ScopedAccess.h>
Public Member Functions | |
ScopedAccess (Protectee *p, bool lockedAlready=false) | |
This is used to create an access object to a protected object, which is passed as pointer. More... | |
~ScopedAccess () | |
ScopedAccess (ScopedAccess &&other) noexcept | |
ScopedAccess & | operator= (ScopedAccess &&other) noexcept |
Protectee * | operator-> () |
const Protectee * | operator-> () const |
Protectee & | operator* () |
const Protectee & | operator* () const |
Protected Attributes | |
Protectee * | mObject |
Specialization for Mutex=void, i.e.
there is no separate mutex object.
The Protectee must meet the following concept: concept Protectee { // locks the object from concurrent access (blocks, if there is an access already). void lock();
// unlocks the object void unlock(); }
Internally, this behavior usually is implemented using a mutex in the Protectee. For most use cases it would be sufficient to use the ProtecteeMixin class.
|
inline |
This is used to create an access object to a protected object, which is passed as pointer.
The second parameter specifies if the object is already locked. If not (the default), it is locked immediately. Note that in both cases the object will be unlocked in ScopedAccess's destructor and should NOT be unlocked outside to prevent double unlock!
|
inline |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
protectedinherited |