26 using element_type = T;
33 _auxiliary(
rhs._auxiliary)
40 _auxiliary(ptr ? ptr->getOrCreateAuxiliary() :
nullptr)
47 _auxiliary(ptr._auxiliary)
54 _auxiliary(ptr.valid() ? ptr->getOrCreateAuxiliary() :
nullptr)
72 _auxiliary = ptr ? ptr->getOrCreateAuxiliary() :
nullptr;
79 _auxiliary =
rhs._auxiliary;
87 _auxiliary =
rhs._auxiliary;
95 _auxiliary =
rhs.valid() ?
rhs->getOrCreateAuxiliary() :
nullptr;
112 bool operator==(
const R*
rhs)
const {
return (
rhs == _ptr); }
115 bool operator!=(
const R*
rhs)
const {
return (
rhs != _ptr); }
117 bool valid()
const noexcept {
return _auxiliary.valid() && _auxiliary->getConnectedObject() !=
nullptr; }
119 explicit operator bool()
const noexcept {
return valid(); }
130 std::scoped_lock<std::mutex>
guard(_auxiliary->getMutex());
131 if (_auxiliary->getConnectedObject() !=
nullptr)
vsg::ref_ptr< T > ref_ptr() const
convert observer_ptr into a ref_ptr so that Object pointed to can be safely accessed.
Definition observer_ptr.h:122