UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
FUObjectAnnotationSparseSearchable< TAnnotation, bAutoRemove > Class Template Reference

#include <UObjectAnnotation.h>

+ Inheritance diagram for FUObjectAnnotationSparseSearchable< TAnnotation, bAutoRemove >:

Public Member Functions

virtual void NotifyUObjectDeleted (const UObjectBase *Object, int32 Index) override
 
virtual void OnUObjectArrayShutdown () override
 
virtual ~FUObjectAnnotationSparseSearchable ()
 
UObjectFind (const TAnnotation &Annotation)
 
void AddAnnotation (const UObjectBase *Object, const TAnnotation &Annotation)
 
void AddAnnotation (const UObjectBase *Object, TAnnotation &&Annotation)
 
void RemoveAnnotation (const UObjectBase *Object)
 
void RemoveAllAnnotations ()
 
virtual SIZE_T GetAllocatedSize () const override
 
- Public Member Functions inherited from FUObjectAnnotationSparse< TAnnotation, bAutoRemove >
 FUObjectAnnotationSparse ()
 
virtual ~FUObjectAnnotationSparse ()
 
void AddAnnotation (const UObjectBase *Object, TAnnotation &&Annotation)
 
void AddAnnotation (const UObjectBase *Object, const TAnnotation &Annotation)
 
TAnnotation GetAndRemoveAnnotation (const UObjectBase *Object)
 
void RemoveAnnotation (const UObjectBase *Object)
 
void RemoveAllAnnotations ()
 
TAnnotation GetAnnotation (const UObjectBase *Object)
 
const TMap< const UObjectBase *, TAnnotation > & GetAnnotationMap () const
 
void Reserve (int32 ExpectedNumElements)
 
- Public Member Functions inherited from FUObjectArray::FUObjectDeleteListener
virtual ~FUObjectDeleteListener ()
 
virtual void NotifyUObjectDeleted (const class UObjectBase *Object, int32 Index)=0
 

Additional Inherited Members

- Protected Attributes inherited from FUObjectAnnotationSparse< TAnnotation, bAutoRemove >
FTransactionallySafeRWLock AnnotationMapCritical
 
FTransactionallySafeRWLock AnnotationCacheCritical
 
TMap< const UObjectBase *, TAnnotationAnnotationMap
 
const UObjectBaseAnnotationCacheKey = nullptr
 
TAnnotation AnnotationCacheValue
 
bool bRegistered = false
 

Detailed Description

template<typename TAnnotation, bool bAutoRemove>
class FUObjectAnnotationSparseSearchable< TAnnotation, bAutoRemove >

FUObjectAnnotationSparseSearchable is a helper class that is used to store sparse, slow, temporary, editor only, external or other low priority information about UObjects...and also provides the ability to find a object based on the unique annotation.

All of the restrictions mentioned for FUObjectAnnotationSparse apply

Parameters
TAnnotationtype of the annotation
bAutoRemoveif true, annotation will automatically be removed, otherwise in non-final builds it will verify that the annotation was removed by other means prior to destruction.

Constructor & Destructor Documentation

◆ ~FUObjectAnnotationSparseSearchable()

Destructor, removes all annotations, which removes the annotation as a uobject destruction listener

Member Function Documentation

◆ AddAnnotation() [1/2]

template<typename TAnnotation , bool bAutoRemove>
void FUObjectAnnotationSparseSearchable< TAnnotation, bAutoRemove >::AddAnnotation ( const UObjectBase Object,
const TAnnotation Annotation 
)
inline

Add an annotation to the annotation list. If the Annotation is the default, then the annotation is removed.

Parameters
ObjectObject to annotate.
AnnotationAnnotation to associate with Object.

◆ AddAnnotation() [2/2]

template<typename TAnnotation , bool bAutoRemove>
void FUObjectAnnotationSparseSearchable< TAnnotation, bAutoRemove >::AddAnnotation ( const UObjectBase Object,
TAnnotation &&  Annotation 
)
inline

◆ Find()

template<typename TAnnotation , bool bAutoRemove>
UObject * FUObjectAnnotationSparseSearchable< TAnnotation, bAutoRemove >::Find ( const TAnnotation Annotation)
inline

Find the UObject associated with a given annotation

Parameters
AnnotationAnnotation to find
Returns
Object associated with this annotation or NULL if none found

◆ GetAllocatedSize()

template<typename TAnnotation , bool bAutoRemove>
virtual SIZE_T FUObjectAnnotationSparseSearchable< TAnnotation, bAutoRemove >::GetAllocatedSize ( ) const
inlineoverridevirtual

Returns the size of heap memory allocated internally by this listener

Reimplemented from FUObjectAnnotationSparse< TAnnotation, bAutoRemove >.

◆ NotifyUObjectDeleted()

template<typename TAnnotation , bool bAutoRemove>
virtual void FUObjectAnnotationSparseSearchable< TAnnotation, bAutoRemove >::NotifyUObjectDeleted ( const UObjectBase Object,
int32  Index 
)
inlineoverridevirtual

Interface for FUObjectAllocator::FUObjectDeleteListener

Parameters
Objectobject that has been destroyed
Indexindex of object that is being deleted

Reimplemented from FUObjectAnnotationSparse< TAnnotation, bAutoRemove >.

◆ OnUObjectArrayShutdown()

template<typename TAnnotation , bool bAutoRemove>
virtual void FUObjectAnnotationSparseSearchable< TAnnotation, bAutoRemove >::OnUObjectArrayShutdown ( )
inlineoverridevirtual

Called when UObject Array is being shut down, this is where all listeners should be removed from it

Reimplemented from FUObjectAnnotationSparse< TAnnotation, bAutoRemove >.

◆ RemoveAllAnnotations()

template<typename TAnnotation , bool bAutoRemove>
void FUObjectAnnotationSparseSearchable< TAnnotation, bAutoRemove >::RemoveAllAnnotations ( )
inline

Removes all annotation from the annotation list.

◆ RemoveAnnotation()

template<typename TAnnotation , bool bAutoRemove>
void FUObjectAnnotationSparseSearchable< TAnnotation, bAutoRemove >::RemoveAnnotation ( const UObjectBase Object)
inline

Removes an annotation from the annotation list.

Parameters
ObjectObject to de-annotate.

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