Mixin class that can be used to add the Protectee concept used by ScopedAccess<Protectee(, void)> to an existing class.
More...
template<typename T>
class mira::ProtecteeMixin< T >
Mixin class that can be used to add the Protectee concept used by ScopedAccess<Protectee(, void)> to an existing class.
A typical use case would be a class with a member that should be accessed by concurrent threads.
class MyClass
{
public:
typedef ProtecteeMixin<std::string> ProtectedString;
ScopedAccess<ProtectedString> getString() {
return ScopedAccess<ProtectedString>(&mMyProtectedMember);
}
private:
ProtectedString mMyProtectedMember;
};