UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
TTypedElementOwnerStore< ElementDataType, KeyDataType > Struct Template Reference

#include <TypedElementOwnerStore.h>

Public Member Functions

 TTypedElementOwnerStore ()=default
 
 ~TTypedElementOwnerStore ()
 
TTypedElementOwnerScopedAccess< ElementDataType > RegisterElementOwner (const KeyDataType &InKey, TTypedElementOwner< ElementDataType > &&InElementOwner)
 
TTypedElementOwner< ElementDataType > UnregisterElementOwner (const KeyDataType &InKey)
 
void UnregisterElementOwners (TFunctionRef< bool(const TTypedElementOwner< ElementDataType > &)> InShouldUnregisterElement, TFunctionRef< void(TTypedElementOwner< ElementDataType > &&)> InOnUnregisterElement)
 
TTypedElementOwnerScopedAccess< ElementDataType > FindOrRegisterElementOwner (const KeyDataType &InKey, TFunctionRef< TTypedElementOwner< ElementDataType >()> InCreateElement)
 
TTypedElementOwnerScopedAccess< ElementDataType > FindElementOwner (const KeyDataType &InKey) const
 
TTypedElementOwnerScopedMutableAccess< ElementDataType > FindMutableElementOwner (const KeyDataType &InKey)
 
bool ContainsElementOwner (const KeyDataType &InKey) const
 

Detailed Description

template<typename ElementDataType, typename KeyDataType = const void*>
struct TTypedElementOwnerStore< ElementDataType, KeyDataType >

A store of element owners tied to their corresponding owner instance. This can be used to track element owners for an instance without having to add new data to the type itself.

Constructor & Destructor Documentation

◆ TTypedElementOwnerStore()

template<typename ElementDataType , typename KeyDataType = const void*>
TTypedElementOwnerStore< ElementDataType, KeyDataType >::TTypedElementOwnerStore ( )
default

◆ ~TTypedElementOwnerStore()

template<typename ElementDataType , typename KeyDataType = const void*>
TTypedElementOwnerStore< ElementDataType, KeyDataType >::~TTypedElementOwnerStore ( )
inline

Member Function Documentation

◆ ContainsElementOwner()

template<typename ElementDataType , typename KeyDataType = const void*>
bool TTypedElementOwnerStore< ElementDataType, KeyDataType >::ContainsElementOwner ( const KeyDataType InKey) const
inline

Test to see whether the store has an entry for the given element owner.

◆ FindElementOwner()

template<typename ElementDataType , typename KeyDataType = const void*>
TTypedElementOwnerScopedAccess< ElementDataType > TTypedElementOwnerStore< ElementDataType, KeyDataType >::FindElementOwner ( const KeyDataType InKey) const
inline

Provide const access to the given element owner.

Note
This will lock the store for writes until the scoped access struct is no longer being used. The returned struct may be unset if the key was not registered.

◆ FindMutableElementOwner()

template<typename ElementDataType , typename KeyDataType = const void*>
TTypedElementOwnerScopedMutableAccess< ElementDataType > TTypedElementOwnerStore< ElementDataType, KeyDataType >::FindMutableElementOwner ( const KeyDataType InKey)
inline

Provide mutable access to the given element owner.

Note
This will lock the store for writes until the scoped access struct is no longer being used. The returned struct may be unset if the key was not registered.

◆ FindOrRegisterElementOwner()

template<typename ElementDataType , typename KeyDataType = const void*>
TTypedElementOwnerScopedAccess< ElementDataType > TTypedElementOwnerStore< ElementDataType, KeyDataType >::FindOrRegisterElementOwner ( const KeyDataType InKey,
TFunctionRef< TTypedElementOwner< ElementDataType >()>  InCreateElement 
)
inline

Find the given element owner, or call the register callback to attempt to create one if none is found.

Note
This must be paired with a call to UnregisterElementOwner if a new element owner is created.

◆ RegisterElementOwner()

template<typename ElementDataType , typename KeyDataType = const void*>
TTypedElementOwnerScopedAccess< ElementDataType > TTypedElementOwnerStore< ElementDataType, KeyDataType >::RegisterElementOwner ( const KeyDataType InKey,
TTypedElementOwner< ElementDataType > &&  InElementOwner 
)
inline

Register the given element owner, transferring ownership of the owner instance to this store.

Note
This will lock the store for writes until the scoped access struct is no longer being used.
This must be paired with a call to UnregisterElementOwner.

◆ UnregisterElementOwner()

template<typename ElementDataType , typename KeyDataType = const void*>
TTypedElementOwner< ElementDataType > TTypedElementOwnerStore< ElementDataType, KeyDataType >::UnregisterElementOwner ( const KeyDataType InKey)
inline

Unregister the given element owner, transferring ownership of the owner instance back to the caller.

Note
The returned owner may be unset if the key was not registered.

◆ UnregisterElementOwners()

template<typename ElementDataType , typename KeyDataType = const void*>
void TTypedElementOwnerStore< ElementDataType, KeyDataType >::UnregisterElementOwners ( TFunctionRef< bool(const TTypedElementOwner< ElementDataType > &)>  InShouldUnregisterElement,
TFunctionRef< void(TTypedElementOwner< ElementDataType > &&)>  InOnUnregisterElement 
)
inline

Unregister any given element owners that match the given predicate, transferring ownership of the owner instance to the given callback.


The documentation for this struct was generated from the following file: