FSortHelper

Templated helper to alleviate performance problems with sorting based on complex predicates.

Windows
MacOS
Linux

References

Module

SceneOutliner

Header

/Engine/Source/Editor/SceneOutliner/Public/SortHelper.h

Include

#include "SortHelper.h"

Syntax

template<typename PrimaryKeyType, typename SecondaryKeyType>
struct FSortHelper

Remarks

Templated helper to alleviate performance problems with sorting based on complex predicates. Example Usage: FSortHelper<FString>().Primary([](const [ITreeItem](API\Editor\SceneOutliner\ITreeItem)& Item){ return Item->GetString(); }).SortItems(Array);

Or: FSortHelper<FString, FString>() .Primary(FGetPrimaryStringVisitor()) .Secondary(FGetSecondaryStringVisitor()) .SortItems(Array);

Constructors

Name Description

Public function

FSortHelper()

Functions

Name Description

Public function

FSortHelper ...

 

Primary

(
    FPrimaryFunction&& Function,
    EColumnSortMode::Type SortMode
)

Sort primarily by the specified function and mode.

Public function

FSortHelper ...

 

Primary

(
    const TTreeItemGetter< PrimaryKeyTy...,
    EColumnSortMode::Type SortMode
)

Sort primarily using the specified 'getter' visitor and mode

Public function

FSortHelper ...

 

Secondary

(
    FSecondaryFunction&& Function,
    EColumnSortMode::Type SortMode
)

Sort secondarily by the specified function and mode.

Public function

FSortHelper ...

 

Secondary

(
    const TTreeItemGetter< SecondaryKey...,
    EColumnSortMode::Type SortMode
)

Sort secondarily using the specified 'getter' visitor and mode

Public function

void

 

Sort

(
    TArray< FTreeItemPtr >& Array
)

Sort the specified array using the current sort settings

Typedefs

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss