Navigation
API > API/Plugins > API/Plugins/PCG
Description
Returns a sorted key indices array. A custom function can be used to extract the index of the elements of the array, and sort ascending or descending by the values associated with that index. CompareLess method can also be provided, method signature needs to follow DefaultStableCompareLess. We need the decltypes on both function types to allow to provide default values for both callbacks. Check DefaultIndexGetter and DefaultStableCompareLess for their signatures.
| Name | PCGAttributeAccessorHelpers::SortKeyIndicesByAttribute |
| Type | function |
| Header File | /Engine/Plugins/PCG/Source/PCG/Public/Metadata/Accessors/PCGAttributeAccessorHelpers.h |
| Include Path | #include "Metadata/Accessors/PCGAttributeAccessorHelpers.h" |
namespace PCGAttributeAccessorHelpers
{
template<typename GetIndexFunc, typename CompareLessFunc>
TArray < int32 > PCGAttributeAccessorHelpers::SortKeyIndicesByAttribute
(
const IPCGAttributeAccessor & InAccessor,
const IPCGAttributeAccessorKeys & InKeys,
int32 KeyCount,
bool bAscending,
GetIndexFunc CustomGetIndex,
CompareLessFunc CompareLess
)
}