48 #ifndef _MIRA_SCOPEDACCESS_H_ 49 #define _MIRA_SCOPEDACCESS_H_ 52 #include <boost/noncopyable.hpp> 53 #include <boost/thread/mutex.hpp> 61 template <
typename Protectee>
73 std::swap(
mObject,other.mObject);
78 std::swap(
mObject,other.mObject);
118 template <
typename Protectee,
typename Mutex =
void>
149 std::swap(
mMutex, other.mMutex);
155 std::swap(
mMutex, other.mMutex);
180 template <
typename Protectee>
232 template <
typename T>
~ScopedAccess()
Definition: ScopedAccess.h:200
ScopedAccess(Protectee *p, Mutex *m, bool lockedAlready=false)
This is used to create an access object to a protected object, which is passed as pointer...
Definition: ScopedAccess.h:134
void unlock()
Definition: ScopedAccess.h:241
Mixin class that can be used to add the Protectee concept used by ScopedAccess<Protectee(, void)> to an existing class.
Definition: ScopedAccess.h:233
specialize cv::DataType for our ImgPixel and inherit from cv::DataType<Vec>
Definition: IOService.h:67
Protectee * operator->()
Definition: ScopedAccess.h:84
ScopedAccess & operator=(ScopedAccess &&other) noexcept
Definition: ScopedAccess.h:207
Protectee & operator*()
Definition: ScopedAccess.h:92
const Protectee * operator->() const
Definition: ScopedAccess.h:88
Grants thread-safe access to an object (the Protectee) that should be protected from concurrent acces...
Definition: ScopedAccess.h:119
ScopedAccessBase(ScopedAccessBase &&other) noexcept
Definition: ScopedAccess.h:71
ScopedAccess(ScopedAccess &&other) noexcept
Definition: ScopedAccess.h:147
ScopedAccessBase & operator=(ScopedAccessBase &&other) noexcept
Definition: ScopedAccess.h:76
Mutex * mMutex
Definition: ScopedAccess.h:160
ScopedAccessBase(Protectee *p)
Definition: ScopedAccess.h:67
ScopedAccess & operator=(ScopedAccess &&other) noexcept
Definition: ScopedAccess.h:152
void lock()
Definition: ScopedAccess.h:237
const Protectee & operator*() const
Definition: ScopedAccess.h:96
ScopedAccess(Protectee *p, bool lockedAlready=false)
This is used to create an access object to a protected object, which is passed as pointer...
Definition: ScopedAccess.h:195
~ScopedAccess()
Definition: ScopedAccess.h:141
base class for ScopedAccess with external or Protectee-internal mutex
Definition: ScopedAccess.h:62
ScopedAccess(ScopedAccess &&other) noexcept
Definition: ScopedAccess.h:206
Protectee * mObject
Definition: ScopedAccess.h:101