UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
FPathTree Class Reference

#include <PathTree.h>

Public Member Functions

ASSETREGISTRY_API FPathTree ()
 
ASSETREGISTRY_API void EnsureAdditionalCapacity (int32 NumNewPaths)
 
ASSETREGISTRY_API bool CachePath (FName Path, TFunctionRef< void(FName)> OnPathAdded)
 
ASSETREGISTRY_API bool RemovePath (FName Path, TFunctionRef< void(FName)> OnPathRemoved)
 
ASSETREGISTRY_API bool PathExists (FName Path) const
 
ASSETREGISTRY_API bool GetAllPaths (TSet< FName > &OutPaths) const
 
ASSETREGISTRY_API void EnumerateAllPaths (TFunctionRef< bool(FName)> Callback) const
 
ASSETREGISTRY_API bool GetSubPaths (FName BasePath, TSet< FName > &OutPaths, bool bRecurse=true) const
 
ASSETREGISTRY_API bool EnumerateSubPaths (FName BasePath, TFunctionRef< bool(FName)> Callback, bool bRecurse=true) const
 
ASSETREGISTRY_API void Shrink ()
 
int32 NumPaths () const
 
SIZE_T GetAllocatedSize (void) const
 

Static Public Member Functions

static ASSETREGISTRY_API FName NormalizePackagePath (FName In)
 

Constructor & Destructor Documentation

◆ FPathTree()

FPathTree::FPathTree ( )

Member Function Documentation

◆ CachePath()

bool FPathTree::CachePath ( FName  Path,
TFunctionRef< void(FName)>  OnPathAdded 
)

Adds the specified path to the tree, creating nodes as needed and calling OnPathAdded for any new paths added. Returns true if the specified path was actually added (as opposed to already existed)

◆ EnsureAdditionalCapacity()

void FPathTree::EnsureAdditionalCapacity ( int32  NumNewPaths)

Reserve extra space for the expected number of paths that will be added in future. Count is added to the current number of stored paths and not any previous reservation.

◆ EnumerateAllPaths()

void FPathTree::EnumerateAllPaths ( TFunctionRef< bool(FName)>  Callback) const

Enumerate all of the paths we know about

◆ EnumerateSubPaths()

bool FPathTree::EnumerateSubPaths ( FName  BasePath,
TFunctionRef< bool(FName)>  Callback,
bool  bRecurse = true 
) const

Recursively enumerates all child paths from the specified base path relative to this node

◆ GetAllocatedSize()

SIZE_T FPathTree::GetAllocatedSize ( void  ) const
inline

◆ GetAllPaths()

bool FPathTree::GetAllPaths ( TSet< FName > &  OutPaths) const

Get all of the paths we know about

◆ GetSubPaths()

bool FPathTree::GetSubPaths ( FName  BasePath,
TSet< FName > &  OutPaths,
bool  bRecurse = true 
) const

Recursively gathers all child paths from the specified base path relative to this node

◆ NormalizePackagePath()

FName FPathTree::NormalizePackagePath ( FName  In)
static

Normalize the given PackagePath (/Game/SubDir) by removing a trailing slash if it exists.

◆ NumPaths()

int32 FPathTree::NumPaths ( ) const
inline

◆ PathExists()

bool FPathTree::PathExists ( FName  Path) const

Checks whether the given path is one that we know about

◆ RemovePath()

bool FPathTree::RemovePath ( FName  Path,
TFunctionRef< void(FName)>  OnPathRemoved 
)

Removes the specified path from the tree, calling OnPathRemoved for any existing paths removed. Returns true if the path was found and removed.

◆ Shrink()

void FPathTree::Shrink ( )

Shrinks the internal structures reducing the memory they use.


The documentation for this class was generated from the following files: