57ALWAYS_INLINE WeakPointerTo<T>::
58WeakPointerTo(
const WeakPointerTo<Y> &r) noexcept :
59 WeakPointerToBase<T>(r)
91 assert(!this->was_deleted());
92 return *((
To *)WeakPointerToBase<T>::_void_ptr);
101 assert(!this->was_deleted());
102 return (
To *)WeakPointerToBase<T>::_void_ptr;
112INLINE WeakPointerTo<T>::
113operator T * ()
const {
115 return (To *)WeakPointerToBase<T>::_void_ptr;
131 this->lock_into(ptr);
143 return (To *)WeakPointerToBase<T>::_void_ptr;
153 return (To *)WeakPointerToBase<T>::_void_ptr;
192 this->reassign(std::move(from));
225 this->reassign(std::move(r));
371 assert(!this->was_deleted());
372 return *((
To *)WeakPointerToBase<T>::_void_ptr);
381 assert(!this->was_deleted());
382 return (
To *)WeakPointerToBase<T>::_void_ptr;
393INLINE WeakConstPointerTo<T>::
394operator
const T * ()
const {
396 return (To *)WeakPointerToBase<T>::_void_ptr;
412 this->lock_into(ptr);
424 return (To *)WeakPointerToBase<T>::_void_ptr;
434 return (To *)WeakPointerToBase<T>::_void_ptr;
493 this->reassign(std::move(from));
503 this->reassign(std::move(from));
558 this->reassign(std::move(r));
569 this->reassign(std::move(r));
A ConstPointerTo is similar to a PointerTo, except it keeps a const pointer to the thing.
This is the base class for PointerTo and ConstPointerTo.
This file defines the classes PointerTo and ConstPointerTo (and their abbreviations,...
A WeakConstPointerTo is similar to a WeakPointerTo, except it keeps a const pointer to the thing,...
const To * p() const
Returns an ordinary pointer instead of a WeakConstPointerTo.
ConstPointerTo< T > lock() const
A thread-safe way to access the underlying pointer; will silently return null if the underlying point...
const To * get_orig() const
Returns the original pointer value, even if the object has since been deleted.
This is the base class for PointerTo and ConstPointerTo.
bool was_deleted() const
Returns true if the object we are pointing to has been deleted, false otherwise.
WeakPointerTo is similar to PointerTo, except that it does not actually prevent the referenced pointe...
To * p() const
Returns an ordinary pointer instead of a WeakPointerTo.
PointerTo< T > lock() const
A thread-safe way to access the underlying pointer; will silently return null if the underlying point...
To * get_orig() const
Returns the original pointer value, even if the object has since been deleted.