UTypedElementRegistry

Registry of element types and their associated interfaces, along with the elements that represent their instances.

Choose your operating system:

Windows

macOS

Linux

Inheritance Hierarchy

UObjectBase

UObjectBaseUtility

UObject

UTypedElementRegistry

References

Module

TypedElementFramework

Header

/Engine/Source/Runtime/TypedElementFramework/Public/Elements/Framework/TypedElementRegistry.h

Include

#include "Elements/Framework/TypedElementRegistry.h"

Syntax

class UTypedElementRegistry : public UObject

Remarks

Registry of element types and their associated interfaces, along with the elements that represent their instances.

Constructors

Name Description

Public function

UTypedElementRegistry()

Functions

Name Description

Public function Static

void

 

AddReferencedObjects

(
    UObject* InThis,
    FReferenceCollector& Collector
)

Public function

FTypedElemen...

 

CreateElement

(
    const FName InElementTypeName,
    const FTypedHandleElementId InEleme...
)

Create an element that doesn't require any additional payload data.

Public function

TTypedElemen...

 

CreateElement

(
    const FName InElementTypeName
)

Create an element that has additional payload data.

Public function

FTypedElemen...

 

CreateElementList

(
    TArrayView< const TTypedElementOwne...
)

Create an empty list of elements associated with this registry, populated from the given owners that are valid.

Public function

FTypedElemen...

 

CreateElementList

(
    const TArray< TTypedElementOwner< E...
)

Create an empty list of elements associated with this registry, populated from the given owners that are valid.

Public function

FTypedElemen...

 

CreateElementList

(
    TArrayView< const FTypedElementHand...
)

Create an empty list of elements associated with this registry, populated from the given handles that are valid.

Public function

FTypedElemen...

 

CreateElementList

(
    TArrayView< const FTypedElementId >...
)

Create an empty list of elements associated with this registry, populated from the given minimal IDs that are valid.

Public function

FTypedElemen...

 

CreateElementList()

Create an empty list of elements associated with this registry.

Public function

void

 

DestroyElement

(
    TTypedElementOwner< ElementDataType...
)

Destroy an element.

Public function

void

 

DestroyElement

(
    FTypedElementOwner& InOutElementOw...
)

Destroy an element.

Public function Const

TTypedElemen...

 

GetElement

(
    const FTypedElementHandle& InEleme...
)

Get an element that implements the given interface from its handle.

Public function Const

TTypedElemen...

 

GetElement

(
    const FTypedElementId& InElementId
)

Get an element that implements the given interface from its minimal ID.

Public function Const

FTypedElemen...

 

GetElement

(
    const FTypedElementId& InElementId,
    const TSubclassOf< UInterface >& I...
)

Get an element that implements the given interface from its minimal ID.

Public function Const

FTypedElemen...

 

GetElement

(
    const FTypedElementHandle& InEleme...,
    const TSubclassOf< UInterface >& I...
)

Get an element that implements the given interface from its handle.

Public function Const

FTypedElemen...

 

GetElementHandle

(
    const FTypedElementId& InElementId
)

Get an element handle from its minimal ID.

Public function Const

UObject *...

 

GetElementInterface

(
    const FTypedElementHandle& InEleme...,
    const TSubclassOf< UInterface > InB...
)

Get the element interface supported by the given handle, or null if there is no support for this interface.

Public function Const

BaseInterfac...

 

GetElementInterface

(
    const FTypedElementHandle& InEleme...
)

Get the element interface supported by the given handle, or null if there is no support for this interface.

Public function Const

BaseInterfac...

 

GetElementInterface

(
    const FTypedHandleTypeId InElementT...
)

Get the element interface supported by the given type, or null if there is no support for this interface.

Public function Static

UTypedElemen...

 

GetInstance()

Get the singleton instance of the registry used in most cases.

Public function Const

FTypedHandle...

 

GetRegisteredElementTypeId

(
    const FName InElementTypeName
)

Get the element type ID for the associated element type name, if any.

Public function Const

FName

 

GetRegisteredElementTypeName

(
    const FTypedHandleTypeId InElementT...
)

Get the element type name for the associated element type ID, if any.

Public function

FOnElementRe...

 

OnElementReplaced()

Public function

FOnElementUp...

 

OnElementUpdated()

Public function

FSimpleMulti...

 

OnProcessingDeferredElementsToDestroy()

Event fired prior to processing any elements that were previously marked for deferred destruction.

Public function Const

void

 

Private_GetElementImpl

(
    const FTypedElementHandle& InEleme...,
    const TSubclassOf< UInterface >& I...,
    FTypedElement& OutElement
)

Public function Static

void

 

Private_InitializeInstance()

Initialize the singleton instance of the registry used in most cases.

Public function

void

 

Private_OnElementListCreated

(
    FTypedElementList* InElementLi...
)

Public function

void

 

Private_OnElementListDestroyed

(
    FTypedElementList* InElementLi...
)

Public function Static

void

 

Private_ShutdownInstance()

Shutdown the singleton instance of the registry used in most cases.

Public function

void

 

ProcessDeferredElementsToDestroy()

Process any elements that were previously marked for deferred destruction.

Public function

void

 

RegisterElementInterface

(
    const FName InElementTypeName,
    UObject* InElementInterface,
    const bool InAllowOverride
)

Register that an element interface is supported for the given type, which must have previously been registered via RegisterElementType.

Public function

void

 

RegisterElementType

(
    const FName InElementTypeName
)

Register an element type that has additional payload data.

Public function

void

 

RegisterElementType

(
    const FName InElementTypeName
)

Register an element type that doesn't require any additional payload data.

Public function Const

FString

 

RegistredElementTypesAndInterfacesToString()

Extract a string that contains name of the type elements registered.

Public function

void

 

ReleaseElementId

(
    FTypedElementId& InOutElementId
)

Release an element ID that was previously acquired from an existing handle.

Overridden from UObject

Name Description

Public function Virtual

void

 

FinishDestroy()

Called to finish destroying the object.

Classes

Name

Description

Public struct

FDisableElementDestructionOnGC

Struct to disable auto-GC reference collection within a scope

Typedefs

Name

Description

FOnElementReplaced

FOnElementReplaced_Payload

Event fired when references to one element should be replaced with a reference to a different element.

FOnElementUpdated

Event fired when an element has been internally updated and data cached from it should be refreshed.