Files
UnrealEngineUWP/Engine/Source/Editor/ContentBrowserData/Public/ContentBrowserDataUtils.h
bryan sefcik 98b51354ed Ran IWYU on Public headers under Engine/Source/Editor/...
Headers are updated to contain any missing #includes needed to compile and #includes are sorted.  Nothing is removed.

#ushell-cherrypick of 21065253 by bryan.sefcik
#jira
#preflight 62d5b3e91062f2e63014598e

#ROBOMERGE-AUTHOR: bryan.sefcik
#ROBOMERGE-SOURCE: CL 21152630 via CL 21156388 via CL 21157044
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v972-20964824)

[CL 21181817 by bryan sefcik in ue5-main branch]
2022-07-20 11:56:29 -04:00

46 lines
1.8 KiB
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#pragma once
#include "Containers/StringFwd.h"
#include "Containers/UnrealString.h"
#include "ContentBrowserDataFilter.h"
#include "CoreMinimal.h"
#include "HAL/Platform.h"
#include "Internationalization/Text.h"
#include "UObject/NameTypes.h"
namespace ContentBrowserDataUtils
{
/** Returns number of folders in forward slashed path (Eg, 1 for "/Path", 2 for "/Path/Name") */
CONTENTBROWSERDATA_API int32 CalculateFolderDepthOfPath(const FStringView InPath);
/** Returns true if folder has a depth of 1 */
CONTENTBROWSERDATA_API bool IsTopLevelFolder(const FStringView InFolderPath);
/** Returns true if folder has a depth of 1 */
CONTENTBROWSERDATA_API bool IsTopLevelFolder(const FName InFolderPath);
/**
* Tests internal path against attribute filter
*
* @param InPath Invariant path to test
* @param InAlreadyCheckedDepth Number of folders deep that have already been tested to avoid re-testing during recursion. Pass 0 if portion of path not already tested.
* @param InItemAttributeFilter Filter to test against
*
* @return True if passes filter
*/
CONTENTBROWSERDATA_API bool PathPassesAttributeFilter(const FStringView InPath, const int32 InAlreadyCheckedDepth, const EContentBrowserItemAttributeFilter InAttributeFilter);
/**
* Get display name override if there is one for InFolderPath
*
* @param InFolderPath Internal path to get display name override for
* @param InFolderItemName Short name of InFolderPath (rightmost folder name)
* @param bIsClassesFolder True if this folder is a classes folder
*
* @return Override display name or empty string
*/
CONTENTBROWSERDATA_API FText GetFolderItemDisplayNameOverride(const FName InFolderPath, const FString& InFolderItemName, const bool bIsClassesFolder);
}