FTypedElementList

A list of element handles.

Choose your operating system:

Windows

macOS

Linux

Inheritance Hierarchy

TSharedFromThis

FTypedElementList

References

Module

TypedElementFramework

Header

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

Include

#include "Elements/Framework/TypedElementList.h"

Syntax

class FTypedElementList : public TSharedFromThis< FTypedElementList >

Remarks

A list of element handles. Provides high-level access to groups of elements, including accessing elements that implement specific interfaces.

Constructors

No constructors are accessible with public or protected access.

Destructors

Name Description

Public function

~FTypedElementList()

Functions

Name Description

Public function

bool

 

Add

(
    const TTypedElementOwner< ElementDa...
)

Add the given element owner to this element list, if it isn't already in the list.

Public function

bool

 

Add

(
    FTypedElementHandle&& InElementHan...
)

Add the given element handle to this element list, if it isn't already in the list.

Public function

bool

 

Add

(
    const FTypedElementHandle& InEleme...
)

Add the given element handle to this element list, if it isn't already in the list.

Public function

void

 

Append

(
    TArrayView< const TTypedElementOwne...
)

Append the given element owners to this element list.

Public function

void

 

Append

(
    const TArray< TTypedElementOwner< E...
)

Append the given element owners to this element list.

Public function

void

 

Append

(
    FTypedElementListConstRef InElement...
)

Append another element list to this element list.

Public function

void

 

Append

(
    TArrayView< const FTypedElementHand...
)

Append the given element handles to this element list.

Public function Const

FTypedElemen...

 

Clone()

Clone this list instance. @note Only copies elements; does not copy any bindings!

Public function

bool

 

Contains

(
    const TTypedElementOwner< ElementDa...
)

Does this element list contain an entry for the given element owner?

Public function Const

bool

 

Contains

(
    const FTypedElementHandle& InEleme...
)

Does this element list contain an entry for the given element handle?

Public function Const

bool

 

Contains

(
    const FTypedElementId& InElementId
)

Does this element list contain an entry for the given element ID?

Public function Const

int32

 

CountElements

(
    const TSubclassOf< UInterface >& I...
)

Count the number of elements in this list, optionally filtering to elements that implement the given interface.

Public function Const

int32

 

CountElementsOfType

(
    const FName InElementTypeName
)

Count the number of elements in this list of the given type.

Public function Const

int32

 

CountElementsOfType

(
    const FTypedHandleTypeId InElementT...
)

Count the number of elements in this list of the given type.

Public function

void

 

Empty

(
    const int32 InSlack
)

Remove all entries from this element list, potentially leaving space allocated for the given number of entries.

Public function Const

void

 

ForEachElement

(
    TFunctionRef< bool...
)

Enumerate the elements in this list that implement the given interface.

Public function Const

void

 

ForEachElementHandle

(
    TFunctionRef< bool...,
    const TSubclassOf< UInterface >& I...
)

Enumerate the handle of every element in this list, optionally filtering to elements that implement the given interface.

Public function Const

TTypedElemen...

 

GetBottomElement()

Get the last element implementing the given interface.

Public function Const

TTypedElemen...

 

GetBottomElement

(
    TFunctionRef< bool...
)

Get the last element that implement the given interface and pass the predicate.

Public function Const

const FTyped...

 

GetCounter()

Get the counter for the elements within the list.

Public function Const

TTypedElemen...

 

GetElement

(
    const FTypedElementHandle& InEleme...
)

Get the element from the given handle.

Public function Const

void

 

GetElement

(
    const FTypedElementHandle& InEleme...,
    TTypedElement< BaseInterfaceType > ...
)

Get the element from the given handle.

Public function Const

TTypedElemen...

 

GetElementAt

(
    const int32 InIndex
)

Get the element at the given index. @note Use IsValidIndex to test for validity.

Public function Const

void

 

GetElementAt

(
    const int32 InIndex,
    TTypedElement< BaseInterfaceType > ...
)

Get the element at the given index. @note Use IsValidIndex to test for validity.

Public function Const

FTypedElemen...

 

GetElementHandleAt

(
    const int32 InIndex
)

Get the element handle at the given index. @note Use IsValidIndex to test for validity.

Public function Const

void

 

GetElementHandles

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

Get the handle of every element in this list, optionally filtering to elements that implement the given interface.

Public function Const

TArray< FTyp...

 

GetElementHandles

(
    const TSubclassOf< UInterface >& I...
)

Get the handle of every element in this list, optionally filtering to elements that implement the given interface.

Public function Const

UObject *...

 

GetElementInterface

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

Get the element interface from the given handle.

Public function Const

BaseInterfac...

 

GetElementInterface

(
    const FTypedElementHandle& InEleme...
)

Get the element interface from the given handle.

Public function

FScopedClear...

 

GetScopedClearNewPendingChange()

Get a scoped object that when destroyed it clear a pending change notification without emitting the notification if it happened during its lifecycle.

Public function Const

TTypedElemen...

 

GetTopElement

(
    TFunctionRef< bool...
)

Get the first element that implement the given interface and pass the predicate A function that should return true when the element is desirable

Public function Const

TTypedElemen...

 

GetTopElement()

Get the first element implementing the given interface.

Public function Const

bool

 

HasElements

(
    const TSubclassOf< UInterface >& I...
)

Test whether there are elements in this list, optionally filtering to elements that implement the given interface.

Public function Const

bool

 

HasElementsOfType

(
    const FTypedHandleTypeId InElementT...
)

Test whether there are elements in this list of the given type.

Public function Const

bool

 

HasElementsOfType

(
    const FName InElementTypeName
)

Test whether there are elements in this list of the given type.

Public function Const

bool

 

IsValidIndex

(
    const int32 InIndex
)

Is the given index a valid entry within this element list?

Public function

FTypedElemen...

 

Legacy_GetSync()

Access the interface to allow external systems (such as USelection) to receive immediate sync notifications as an element list is changed.

Public function Const

FTypedElemen...

 

Legacy_GetSyncPtr()

Access the interface to allow external systems (such as USelection) to receive immediate sync notifications as an element list is changed.

Public function

bool

 

NotifyPendingChanges()

Invoke the delegate called whenever this element list has been changed.

Public function Const

int32

 

Num()

Get the number of entries within this element list.

Public function

FOnChanged &

 

OnChanged()

Public function

FOnPreChange...

 

OnPreChange()

Public function Static

FTypedElemen...

 

Private_CreateElementList

(
    UTypedElementRegistry* InRegis...
)

Internal function used by the element registry to create an element list instance.

Public function

bool

 

Remove

(
    const FTypedElementId& InElementId
)

Remove the given element ID from this element list, if it is in the list.

Public function

bool

 

Remove

(
    const FTypedElementHandle& InEleme...
)

Remove the given element handle from this element list, if it is in the list.

Public function

bool

 

Remove

(
    const TTypedElementOwner< ElementDa...
)

Remove the given element owner from this element list, if it is in the list.

Public function

int32

 

RemoveAll

(
    TFunctionRef< bool...
)

Remove any elements that match the given predicate from this element list.

Public function

int32

 

RemoveAll

(
    TFunctionRef< bool...
)

Remove any element handles that match the given predicate from this element list.

Public function

void

 

Reserve

(
    const int32 InSize
)

Pre-allocate enough memory in this element list to store the given number of entries.

Public function

void

 

Reset()

Remove all entries from this element list, preserving existing allocations.

Public function

void

 

Shrink()

Shrink this element list storage to avoid slack.

Operators

Name Description

Public function Const

FTypedElemen...

 

operator[]

(
    const int32 InIndex
)

Get the element handle at the given index. @note Use IsValidIndex to test for validity.

Classes

Name

Description

Public class

FOnChanged

Access the delegate that is invoked whenever this element list has been changed.

Public class

FOnPreChange

Access the delegate that is invoked whenever this element list is potentially about to change.

Public struct

FScopedClearNewPendingChange

A utility struct that help to cancel any new pending notification that happened in a scope.

Enums

Name

Description

Private enum

EChangeType