6#include <Common/assertion.h>
16template<
typename ItemInterface,
typename Index = std::
size_t,
typename Generation = Index>
27 , m_weakHandle(weakHandle)
43 return !m_pool || m_weakHandle.
isEmpty();
47 const ItemInterface*
viewItem()
const;
62 inline operator bool ()
const
81template<
typename ItemInterface,
typename Index,
typename Generation>
84 PH_ASSERT(!isEmpty());
85 return m_pool->accessItem(m_weakHandle);
88template<
typename ItemInterface,
typename Index,
typename Generation>
91 PH_ASSERT(!isEmpty());
92 return m_pool->viewItem(m_weakHandle);
Definition TItemPoolInterface.h:10
Handle with strong reference semantics. Default constructor creates empty handle.
Definition TStrongHandle.h:18
PH_DEFINE_INLINE_RULE_OF_5_MEMBERS(TStrongHandle)
bool operator==(const TStrongHandle &rhs) const =default
TStrongHandle(const WeakHandleType &weakHandle, PoolType *const pool)
Definition TStrongHandle.h:25
bool isEmpty() const
Definition TStrongHandle.h:41
const ItemInterface * viewItem() const
Definition TStrongHandle.h:89
ItemInterface * accessItem()
Definition TStrongHandle.h:82
const WeakHandleType & getWeak() const
Definition TStrongHandle.h:33
ItemInterface * operator->()
Definition TStrongHandle.h:49
Handle with weak reference semantics. Default constructor creates empty handle.
Definition TWeakHandle.h:23
bool isEmpty() const
Definition TWeakHandle.h:62
Definition ph_editor.h:10