// Copyright Epic Games, Inc. All Rights Reserved. #pragma once #include "CoreMinimal.h" // Insights #include "Insights/Table/ViewModels/TableCellValueSorter.h" #include "Insights/Table/ViewModels/TableColumn.h" #include "Insights/Table/ViewModels/TreeNodeGrouping.h" #include "Insights/ViewModels/TimerNode.h" //////////////////////////////////////////////////////////////////////////////////////////////////// // Sorters //////////////////////////////////////////////////////////////////////////////////////////////////// class FTimerNodeSortingByTimerType: public Insights::FTableCellValueSorter { public: FTimerNodeSortingByTimerType(TSharedRef InColumnRef); virtual void Sort(TArray& NodesToSort, Insights::ESortMode SortMode) const override; }; //////////////////////////////////////////////////////////////////////////////////////////////////// class FTimerNodeSortingByInstanceCount: public Insights::FTableCellValueSorter { public: FTimerNodeSortingByInstanceCount(TSharedRef InColumnRef); virtual void Sort(TArray& NodesToSort, Insights::ESortMode SortMode) const override; }; //////////////////////////////////////////////////////////////////////////////////////////////////// class FTimerNodeSortingByTotalInclusiveTime: public Insights::FTableCellValueSorter { public: FTimerNodeSortingByTotalInclusiveTime(TSharedRef InColumnRef); virtual void Sort(TArray& NodesToSort, Insights::ESortMode SortMode) const override; }; //////////////////////////////////////////////////////////////////////////////////////////////////// class FTimerNodeSortingByTotalExclusiveTime: public Insights::FTableCellValueSorter { public: FTimerNodeSortingByTotalExclusiveTime(TSharedRef InColumnRef); virtual void Sort(TArray& NodesToSort, Insights::ESortMode SortMode) const override; }; //////////////////////////////////////////////////////////////////////////////////////////////////// // Organizers //////////////////////////////////////////////////////////////////////////////////////////////////// /** Enumerates types of grouping or sorting for the timer nodes. */ enum class ETimerGroupingMode { /** Creates a single group for all timers. */ Flat, /** Creates one group for one letter. */ ByName, /** Creates groups based on timer metadata group names. */ ByMetaGroupName, /** Creates one group for each timer type. */ ByType, /** Creates one group for each logarithmic range ie. 0, [1 .. 10), [10 .. 100), [100 .. 1K), etc. */ ByInstanceCount, ByTotalInclusiveTime, ByTotalExclusiveTime, /** Invalid enum type, may be used as a number of enumerations. */ InvalidOrMax, }; /** Type definition for shared pointers to instances of ETimerGroupingMode. */ typedef TSharedPtr ETimerGroupingModePtr; ////////////////////////////////////////////////////////////////////////////////////////////////////