UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
FDatasmithUniqueNameProviderBase Class Referenceabstract

#include <DatasmithUtils.h>

+ Inheritance diagram for FDatasmithUniqueNameProviderBase:

Public Member Functions

 FDatasmithUniqueNameProviderBase ()=default
 
UE_API FDatasmithUniqueNameProviderBase (const FDatasmithUniqueNameProviderBase &Other)
 
UE_API FDatasmithUniqueNameProviderBase (FDatasmithUniqueNameProviderBase &&Other)
 
virtual ~FDatasmithUniqueNameProviderBase ()=default
 
UE_API FDatasmithUniqueNameProviderBaseoperator= (const FDatasmithUniqueNameProviderBase &Other)
 
UE_API FDatasmithUniqueNameProviderBaseoperator= (FDatasmithUniqueNameProviderBase &&Other)
 
UE_API FString GenerateUniqueName (const FString &BaseName, int32 CharBudget=INT32_MAX)
 
virtual void AddExistingName (const FString &Name)=0
 
virtual void RemoveExistingName (const FString &Name)=0
 
virtual UE_API void Clear ()
 

Protected Member Functions

virtual bool Contains (const FString &Name)=0
 

Detailed Description

Based on a table of frequently used names, this class generates unique names with a good complexity when the number of name is important.

Note
: This abstact class allows various implementation of the cache of known name. Implementation could use a simple TSet, or reuse existing specific cache structure

Constructor & Destructor Documentation

◆ FDatasmithUniqueNameProviderBase() [1/3]

FDatasmithUniqueNameProviderBase::FDatasmithUniqueNameProviderBase ( )
default

◆ FDatasmithUniqueNameProviderBase() [2/3]

FDatasmithUniqueNameProviderBase::FDatasmithUniqueNameProviderBase ( const FDatasmithUniqueNameProviderBase Other)

◆ FDatasmithUniqueNameProviderBase() [3/3]

FDatasmithUniqueNameProviderBase::FDatasmithUniqueNameProviderBase ( FDatasmithUniqueNameProviderBase &&  Other)

◆ ~FDatasmithUniqueNameProviderBase()

virtual FDatasmithUniqueNameProviderBase::~FDatasmithUniqueNameProviderBase ( )
virtualdefault

Member Function Documentation

◆ AddExistingName()

virtual void FDatasmithUniqueNameProviderBase::AddExistingName ( const FString &  Name)
pure virtual

Register a name as known

Parameters
Namename to register

Implemented in FDatasmithUniqueNameProvider.

◆ Clear()

void FDatasmithUniqueNameProviderBase::Clear ( )
virtual

Flushes all known names

Reimplemented in FDatasmithUniqueNameProvider.

◆ Contains()

virtual bool FDatasmithUniqueNameProviderBase::Contains ( const FString &  Name)
protectedpure virtual

Check if the given name is already registered

Parameters
Namename to test
Returns
true if the name is in the cache

Implemented in FDatasmithUniqueNameProvider.

◆ GenerateUniqueName()

FString FDatasmithUniqueNameProviderBase::GenerateUniqueName ( const FString &  BaseName,
int32  CharBudget = INT32_MAX 
)

Generates a unique name

Parameters
BaseNameName that will be suffixed with an index to be unique
CharBudgetMax character allowed in the name.
Returns
FString unique name. Calling "Contains()" with this name will be false

◆ operator=() [1/2]

FDatasmithUniqueNameProviderBase * FDatasmithUniqueNameProviderBase::operator= ( const FDatasmithUniqueNameProviderBase Other)

◆ operator=() [2/2]

FDatasmithUniqueNameProviderBase * FDatasmithUniqueNameProviderBase::operator= ( FDatasmithUniqueNameProviderBase &&  Other)

◆ RemoveExistingName()

virtual void FDatasmithUniqueNameProviderBase::RemoveExistingName ( const FString &  Name)
pure virtual

Remove a name from the list of existing name

Parameters
Namename to unregister

Implemented in FDatasmithUniqueNameProvider.


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