UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
UE::Editor::DataStorage::FRowHandleArray Class Reference

#include <TypedElementRowHandleArray.h>

Public Types

using EFlags = FRowHandleArrayView::EFlags
 

Public Member Functions

 FRowHandleArray ()=default
 
TYPEDELEMENTFRAMEWORK_API FRowHandleArray (FRowHandleArrayView InRows)
 
TYPEDELEMENTFRAMEWORK_API int32 Num () const
 
TYPEDELEMENTFRAMEWORK_API void Reserve (int32 Count)
 
TYPEDELEMENTFRAMEWORK_API void Shrink ()
 
TYPEDELEMENTFRAMEWORK_API void Add (RowHandle Row, EFlags Guarantee=EFlags::None)
 
TYPEDELEMENTFRAMEWORK_API void Append (TConstArrayView< RowHandle > AdditionalRows, EFlags Guarantee=EFlags::None)
 
TYPEDELEMENTFRAMEWORK_API void Append (FRowHandleArrayView AdditionalRows)
 
TYPEDELEMENTFRAMEWORK_API void Remove (RowHandle Row)
 
TYPEDELEMENTFRAMEWORK_API void Remove (TConstArrayView< RowHandle > RowsToRemove)
 
TYPEDELEMENTFRAMEWORK_API void Remove (FRowHandleArrayView RowsToRemove)
 
TYPEDELEMENTFRAMEWORK_API bool Contains (RowHandle Row) const
 
TYPEDELEMENTFRAMEWORK_API void Reset (int32 NewSize=0)
 
TYPEDELEMENTFRAMEWORK_API void Empty (int32 Slack=0)
 
TYPEDELEMENTFRAMEWORK_API void Sort ()
 
TYPEDELEMENTFRAMEWORK_API void Sort (TArrayView< RowHandle > ScratchBuffer)
 
TYPEDELEMENTFRAMEWORK_API void MakeUnique ()
 
TYPEDELEMENTFRAMEWORK_API void ReduceToDuplicates ()
 
TYPEDELEMENTFRAMEWORK_API void SortedMerge (FRowHandleArrayView AddedRows)
 
TYPEDELEMENTFRAMEWORK_API void SortedMerge (const FRowHandleArray &AddedRows)
 
TYPEDELEMENTFRAMEWORK_API void SortedMerge (FRowHandleArray &&AddedRows)
 
TYPEDELEMENTFRAMEWORK_API void InvertOrder ()
 
TYPEDELEMENTFRAMEWORK_API FRowHandleArrayView GetRows () const
 
TYPEDELEMENTFRAMEWORK_API TArrayView< RowHandleGetMutableRows (EFlags Guarantee=EFlags::None)
 
TYPEDELEMENTFRAMEWORK_API bool IsSorted () const
 
TYPEDELEMENTFRAMEWORK_API bool IsUnique () const
 
TYPEDELEMENTFRAMEWORK_API bool IsEmpty () const
 
TYPEDELEMENTFRAMEWORK_API bool IsSame (const FRowHandleArray &Other) const
 

Detailed Description

Array dedicated to handling row handles. This provides various unique and optimized functionality that makes working with a large number row handles easier and more efficient.

Member Typedef Documentation

◆ EFlags

Constructor & Destructor Documentation

◆ FRowHandleArray() [1/2]

UE::Editor::DataStorage::FRowHandleArray::FRowHandleArray ( )
default

◆ FRowHandleArray() [2/2]

UE::Editor::DataStorage::FRowHandleArray::FRowHandleArray ( FRowHandleArrayView  InRows)
explicit

Member Function Documentation

◆ Add()

void UE::Editor::DataStorage::FRowHandleArray::Add ( RowHandle  Row,
EFlags  Guarantee = EFlags::None 
)

Appends the provided row handle at the end of the array. This may result in the array becoming unsorted and/or no longer unique. If Guarantee is set to IsUnique the user takes responsibility to guaranteed that the new row is not already present. If array is sorted, the IsUnique hint is ignored and the array will determine if the values are unique. The IsSorted guarantee is always ignored. If the arrays was already not unique setting the Guarantee flags has no effect.

◆ Append() [1/2]

void UE::Editor::DataStorage::FRowHandleArray::Append ( FRowHandleArrayView  AdditionalRows)

Append the provided list of rows to the end of the array. If the current array and the additional rows are both sorted then this function will try to append the additional rows and maintain the sorted status and if applicable the uniqueness state, otherwise the array will be marked as unsorted and no longer unique.

◆ Append() [2/2]

void UE::Editor::DataStorage::FRowHandleArray::Append ( TConstArrayView< RowHandle AdditionalRows,
EFlags  Guarantee = EFlags::None 
)

Append the provided list of rows to the end of the array. If Guarantee is set to IsSorted and/or IsUnique the user guarantees that the provided row handle array view is sorted by row handle and/or only contains unique values. In this case this function will try to append the additional rows and maintain the sorted status and if applicable the uniqueness state, otherwise the array will be marked as unsorted and no longer unique.

◆ Contains()

bool UE::Editor::DataStorage::FRowHandleArray::Contains ( RowHandle  Row) const

Checks if the provided row is stored in this array. If the array is sorted a faster binary search is used, otherwise a linear search is required.

◆ Empty()

void UE::Editor::DataStorage::FRowHandleArray::Empty ( int32  Slack = 0)

Removes all row handles and releases all allocated memory. If the provided slack size is not zero then memory is reserved for at least the provided number of rows.

◆ GetMutableRows()

TArrayView< RowHandle > UE::Editor::DataStorage::FRowHandleArray::GetMutableRows ( EFlags  Guarantee = EFlags::None)

Returns a mutable view of the array of rows. This will invalidate sorted and uniqueness status of the array. If Guarantee is set to IsSorted and/or IsUnique the user takes responsibility to guaranteed that the rows remain sorted in numeric order and/or all values remain unique after the new rows are modified. If the arrays was already not sorted and/or not unique setting the Guarantee flags has no effect.

◆ GetRows()

FRowHandleArrayView UE::Editor::DataStorage::FRowHandleArray::GetRows ( ) const

Constructs a view of the array to provide access to its rows.

◆ InvertOrder()

void UE::Editor::DataStorage::FRowHandleArray::InvertOrder ( )

Reverses the order in which the rows are stored, making the first element the last and vice versa. If the array was marked as sorted it will no longer be considered sorted. Another call to InvertOrder will not restore the sorted state.

◆ IsEmpty()

bool UE::Editor::DataStorage::FRowHandleArray::IsEmpty ( ) const

Whether or not there are any values in the view.

◆ IsSame()

bool UE::Editor::DataStorage::FRowHandleArray::IsSame ( const FRowHandleArray Other) const

Whether or not the two arrays contain the same values.

◆ IsSorted()

bool UE::Editor::DataStorage::FRowHandleArray::IsSorted ( ) const

Whether or not the contained rows are numerically ordered from smallest to largest.

◆ IsUnique()

bool UE::Editor::DataStorage::FRowHandleArray::IsUnique ( ) const

Whether or all rows in the view only appear once.

◆ MakeUnique()

void UE::Editor::DataStorage::FRowHandleArray::MakeUnique ( )

Goes through the array and removes any duplicate entries. If the array isn't sorted it will be sorted first.

◆ Num()

int32 UE::Editor::DataStorage::FRowHandleArray::Num ( ) const

Returns the number of rows stored.

◆ ReduceToDuplicates()

void UE::Editor::DataStorage::FRowHandleArray::ReduceToDuplicates ( )

Goes through the array and only keeps a single instance of any value that appears twice or more. If the array isn't sorted it will be sorted first. After this function completes the array only contains unique values.

◆ Remove() [1/3]

void UE::Editor::DataStorage::FRowHandleArray::Remove ( FRowHandleArrayView  RowsToRemove)

Removes the provided list of rows. If the array is sorted, a binary search will be used to find the row, but requires moving all subsequent rows down. If the array is not sorted a linear search is required but the last row will be moved into the removed location for quicker removals. If both the array and list of rows to remove are sorted than an optimized version can run that quickly finds the first row to remove and then removes the other rows as it's moving the remainder down.

◆ Remove() [2/3]

void UE::Editor::DataStorage::FRowHandleArray::Remove ( RowHandle  Row)

Removes the provided row. If the array is sorted, a binary search will be used to find the row, but requires moving all subsequent rows down. If the array is not sorted a linear search is required but the last row will be moved into the removed location for quicker removal.

◆ Remove() [3/3]

void UE::Editor::DataStorage::FRowHandleArray::Remove ( TConstArrayView< RowHandle RowsToRemove)

Removes the provided list of rows. If the array is sorted, a binary search will be used to find the row, but requires moving all subsequent rows down. If the array is not sorted a linear search is required but the last row will be moved into the removed location for quicker removals.

◆ Reserve()

void UE::Editor::DataStorage::FRowHandleArray::Reserve ( int32  Count)

Reserve space for additional row handles. This allocates memory but doesn't add new row handles. If the requested count is less than the current count then nothing happens.

◆ Reset()

void UE::Editor::DataStorage::FRowHandleArray::Reset ( int32  NewSize = 0)

Removes all row handles, but keeps the allocated memory around. If the provided size is larger than the number of rows that fit in the container then extra memory will be allocated so there's enough space for the new number of rows.

◆ Shrink()

void UE::Editor::DataStorage::FRowHandleArray::Shrink ( )

Reduces the amount of memory used by the array to exactly fit the current number or elements.

◆ Sort() [1/2]

void UE::Editor::DataStorage::FRowHandleArray::Sort ( )

Sorts the row handles in numerical order from lowest to highest.

◆ Sort() [2/2]

void UE::Editor::DataStorage::FRowHandleArray::Sort ( TArrayView< RowHandle ScratchBuffer)

Sorts the row handles in numerical order from lowest to highest. This version is faster as it doesn't need to allocate a temporary intermediate array. ScratchBuffer has to be at least as large as the number of rows in the array.

◆ SortedMerge() [1/3]

void UE::Editor::DataStorage::FRowHandleArray::SortedMerge ( const FRowHandleArray AddedRows)

Merges the provided array into the array while remaining sorted. The provided array is expected to be sorted.

◆ SortedMerge() [2/3]

void UE::Editor::DataStorage::FRowHandleArray::SortedMerge ( FRowHandleArray &&  AddedRows)

Merges the provided array into the array while remaining sorted.

◆ SortedMerge() [3/3]

void UE::Editor::DataStorage::FRowHandleArray::SortedMerge ( FRowHandleArrayView  AddedRows)

Merges the provided array into the array while remaining sorted. The provided array is expected to be sorted.


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