![]() |
UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
|
#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) |
| FPathTree::FPathTree | ( | ) |
| 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)
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.
| void FPathTree::EnumerateAllPaths | ( | TFunctionRef< bool(FName)> | Callback | ) | const |
Enumerate all of the paths we know about
| 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
| 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
Normalize the given PackagePath (/Game/SubDir) by removing a trailing slash if it exists.
|
inline |
Checks whether the given path is one that we know about
| 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.
| void FPathTree::Shrink | ( | ) |
Shrinks the internal structures reducing the memory they use.