34 std::shared_ptr<std::mutex> _mutex;
39 const ActiveObjectPtr * _ptr;
40 std::unique_lock<std::mutex> _lock;
43 Deref(
const ActiveObjectPtr * p) :
49 const T_ & operator-> ()
const
58 ActiveObjectPtr(
const T_ & t) :
60 _mutex(std::make_shared<std::mutex>())
64 ActiveObjectPtr(
const ActiveObjectPtr & other) =
default;
66 ~ActiveObjectPtr() =
default;
69 operator= (
const ActiveObjectPtr & other)
74 _mutex = other._mutex;
79 Deref operator-> ()
const
84 const T_ & value()
const
86 return Deref(
this).operator->();