![]() |
UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
|
#include <EventLoopManagedStorage.h>
Inheritance diagram for UE::EventLoop::TManagedStorage< ElementType, Traits >:Classes | |
| class | TBaseRangeForIterator |
| struct | TManagedStorageInternalHandle |
Public Types | |
| using | FExternalHandle = typename Traits::FExternalHandle |
| using | FInternalHandle = TManagedStorageInternalHandle< FExternalHandle > |
| using | FInternalHandleArryType = TArray< FInternalHandle, typename Traits::InternalHandleArryAllocatorType > |
| using | TRangedForIterator = TBaseRangeForIterator< false > |
| using | TRangedForConstIterator = TBaseRangeForIterator< true > |
Public Member Functions | |
| TManagedStorage () | |
| ~TManagedStorage () | |
| bool | IsManagerThread () const |
| void | Init () |
| uint32 | Update (FInternalHandleArryType *OutAddedHandles=nullptr, FInternalHandleArryType *OutRemovedHandles=nullptr) |
| FExternalHandle | Add (ElementType &&Data) |
| void | Remove (const FExternalHandle Handle, FManagedStorageOnRemoveComplete &&OnRemoveComplete=FManagedStorageOnRemoveComplete()) |
| void | Remove (const FInternalHandle Handle) |
| int32 | Num () const |
| bool | IsEmpty () const |
| ElementType * | Find (FExternalHandle Handle) |
| const ElementType * | Find (FExternalHandle Handle) const |
| ElementType * | Find (FInternalHandle Handle) |
| const ElementType * | Find (FInternalHandle Handle) const |
| TRangedForIterator | begin () |
| TRangedForConstIterator | begin () const |
| TRangedForIterator | end () |
| TRangedForConstIterator | end () const |
Additional Inherited Members | |
Protected Member Functions inherited from FNoncopyable | |
| FNoncopyable () | |
| ~FNoncopyable () | |
Managed storage class which allows resource creation and removal from any thread. The owning thread may access the storage without thread safety concerns.
| using UE::EventLoop::TManagedStorage< ElementType, Traits >::FExternalHandle = typename Traits::FExternalHandle |
| using UE::EventLoop::TManagedStorage< ElementType, Traits >::FInternalHandle = TManagedStorageInternalHandle<FExternalHandle> |
| using UE::EventLoop::TManagedStorage< ElementType, Traits >::FInternalHandleArryType = TArray<FInternalHandle, typename Traits::InternalHandleArryAllocatorType> |
| using UE::EventLoop::TManagedStorage< ElementType, Traits >::TRangedForConstIterator = TBaseRangeForIterator<true> |
| using UE::EventLoop::TManagedStorage< ElementType, Traits >::TRangedForIterator = TBaseRangeForIterator<false> |
|
inline |
|
inline |
|
inline |
Requests to add a resource.
Thread safe.
| Data | The data to be added and managed. |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Initialize storage.
NOT thread safe.
|
inline |
|
inline |
External access for checking whether the current thread is the manager thread.
|
inline |
|
inline |
Requests to remove a resource.
Thread safe.
| Handle | The handle for the resource to be removed. |
| OnComplete | A callback to be signaled once the resource has been destroyed. |
|
inline |
Removes a resource directly using its internal handle.
NOT thread safe.
| Handle | The handle for the resource to be removed. |
|
inline |
Process all pending storage modifications.
NOT thread safe.
| OutAddedHandles | Handles which were added since the last call to Update. Element may not be present in the internal storage if element was also removed since the last call to update. |
| OutRemovedHandles | Handles which were removed since the last update. |