template<class T, class TLock>
nCine::LockedPtr class

Pointer wrapper that keeps the object locked for the duration of its existence.

Constructors, destructors, conversion operators

LockedPtr(T* ptr, std::unique_lock<TLock>&& lock) explicit noexcept
operator bool() const explicit noexcept
Whether the pointer is assigned.

Public functions

auto get() const -> T* constexpr noexcept
Returns the pointer.
auto operator*() const -> T& constexpr noexcept
Dereferences the pointer.
auto operator->() const -> T* constexpr noexcept
Allows direct calls against the pointer.