![]() |
UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
|
#include <TypedElementRowHandleArray.h>
Public Types | |
| using | EFlags = FRowHandleArrayView::EFlags |
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.
|
default |
|
explicit |
| 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.
| 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.
| 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.
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.
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.
| 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.
| FRowHandleArrayView UE::Editor::DataStorage::FRowHandleArray::GetRows | ( | ) | const |
Constructs a view of the array to provide access to its rows.
| 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.
| bool UE::Editor::DataStorage::FRowHandleArray::IsEmpty | ( | ) | const |
Whether or not there are any values in the view.
| bool UE::Editor::DataStorage::FRowHandleArray::IsSame | ( | const FRowHandleArray & | Other | ) | const |
Whether or not the two arrays contain the same values.
| bool UE::Editor::DataStorage::FRowHandleArray::IsSorted | ( | ) | const |
Whether or not the contained rows are numerically ordered from smallest to largest.
| bool UE::Editor::DataStorage::FRowHandleArray::IsUnique | ( | ) | const |
Whether or all rows in the view only appear once.
| 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.
| int32 UE::Editor::DataStorage::FRowHandleArray::Num | ( | ) | const |
Returns the number of rows stored.
| 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.
| 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.
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.
| 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 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.
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.
| void UE::Editor::DataStorage::FRowHandleArray::Shrink | ( | ) |
Reduces the amount of memory used by the array to exactly fit the current number or elements.
| void UE::Editor::DataStorage::FRowHandleArray::Sort | ( | ) |
Sorts the row handles in numerical order from lowest to highest.
| 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.
| 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.
| void UE::Editor::DataStorage::FRowHandleArray::SortedMerge | ( | FRowHandleArray && | AddedRows | ) |
Merges the provided array into the array while remaining sorted.
| 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.