Ark Server API (ASA) - Wiki
Loading...
Searching...
No Matches
FName Class Reference

#include <NameTypes.h>

+ Collaboration diagram for FName:

Public Member Functions

FORCEINLINE FNameEntryId GetComparisonIndex () const
 
FORCEINLINE FNameEntryId GetDisplayIndex () const
 
FORCEINLINE int32 GetNumber () const
 
FORCEINLINE void SetNumber (const int32 NewNumber)
 
FStringGetPlainNameString (FString *result) const
 
uint32 GetPlainNameString (TCHAR(&OutName)[NAME_SIZE]) const
 
void GetPlainANSIString (ANSICHAR(&AnsiName)[NAME_SIZE]) const
 
void GetPlainWIDEString (WIDECHAR(&WideName)[NAME_SIZE]) const
 
const FNameEntryGetComparisonNameEntry () const
 
const FNameEntryGetDisplayNameEntry () const
 
FString ToString () const
 
void ToString (FString &Out) const
 
void ToString (FWideStringBuilderBase &Out) const
 
void ToString (FUtf8StringBuilderBase &Out) const
 
uint32 GetStringLength () const
 
uint32 ToString (TCHAR *Out, uint32 OutSize) const
 
template<int N>
uint32 ToString (TCHAR(&Out)[N]) const
 
void AppendString (FString &Out) const
 
void AppendString (FWideStringBuilderBase &Out) const
 
void AppendString (FUtf8StringBuilderBase &Out) const
 
bool TryAppendAnsiString (FAnsiStringBuilderBase &Out) const
 
FORCEINLINE bool IsEqual (const FName &Other, const ENameCase CompareMethod=ENameCase::IgnoreCase, const bool bCompareNumber=true) const
 
FORCEINLINE bool operator== (FName Other) const
 
FORCEINLINE bool operator!= (FName Other) const
 
FORCEINLINE bool operator== (EName Ename) const
 
FORCEINLINE bool operator!= (EName Ename) const
 
 UE_DEPRECATED (4.23, "Please use FastLess() / FNameFastLess or LexicalLess() / FNameLexicalLess instead. " "Default lexical sort order is deprecated to avoid unintended expensive sorting. ") FORCEINLINE bool operator<(const FName &Other) const
 
 UE_DEPRECATED (4.23, "Please use B.FastLess(A) or B.LexicalLess(A) instead of A > B.") FORCEINLINE bool operator>(const FName &Other) const
 
FORCEINLINE bool FastLess (const FName &Other) const
 
FORCEINLINE bool LexicalLess (const FName &Other) const
 
FORCEINLINE bool IsNone () const
 
bool IsValid () const
 
bool IsValidIndexFast () const
 
bool IsValidXName (const FString &InInvalidChars=INVALID_NAME_CHARACTERS, FText *OutReason=nullptr, const FText *InErrorCtx=nullptr) const
 
bool IsValidXName (FText &OutReason, const FString &InInvalidChars=INVALID_NAME_CHARACTERS) const
 
bool IsValidObjectName (FText &OutReason) const
 
bool IsValidGroupName (FText &OutReason, bool bIsGroupName=false) const
 
int32 Compare (const FName &Other) const
 
FORCEINLINE int32 CompareIndexes (const FName &Other) const
 
FORCEINLINE FName (EName Ename)
 
FORCEINLINE FName (EName Ename, int32 InNumber)
 
FORCEINLINE FName (FName Other, int32 InNumber)
 
FORCEINLINE FName (FNameEntryId InComparisonIndex, FNameEntryId InDisplayIndex, int32 InNumber)
 
FORCEINLINE FName ()
 
 FName (ENoInit)
 
FORCEINLINE FName (FMinimalName InName)
 
FORCEINLINE FName (FScriptName InName)
 
FORCEINLINE FName (FMemoryImageName InName)
 
 FName (const WIDECHAR *Name, EFindName FindType=FNAME_Add)
 
 FName (const UTF8CHAR *Name, EFindName FindType=FNAME_Add)
 
 FName (const char *Name, EFindName FindType=FNAME_Add)
 
 FName (int32 Len, const WIDECHAR *Name, EFindName FindType=FNAME_Add)
 
 FName (int32 Len, const ANSICHAR *Name, EFindName FindType=FNAME_Add)
 
 FName (int32 Len, const UTF8CHAR *Name, EFindName FindType=FNAME_Add)
 
 FName (TStringView< ANSICHAR > View, EFindName FindType=FNAME_Add)
 
 FName (TStringView< WIDECHAR > View, EFindName FindType=FNAME_Add)
 
 FName (TStringView< UTF8CHAR > View, EFindName FindType=FNAME_Add)
 
 FName (const WIDECHAR *Name, int32 Number, EFindName FindType)
 
 FName (const ANSICHAR *Name, int32 Number, EFindName FindType)
 
 FName (const UTF8CHAR *Name, int32 Number, EFindName FindType)
 
 FName (int32 Len, const WIDECHAR *Name, int32 Number, EFindName FindType)
 
 FName (int32 Len, const ANSICHAR *Name, int32 Number, EFindName FindType)
 
 FName (int32 Len, const UTF8CHAR *Name, int32 Number, EFindName FindType)
 
 FName (const WIDECHAR *Name, int32 Number)
 
 FName (const ANSICHAR *Name, int32 Number)
 
 FName (const UTF8CHAR *Name, int32 Number)
 
 FName (int32 Len, const WIDECHAR *Name, int32 Number)
 
 FName (int32 Len, const ANSICHAR *Name, int32 Number)
 
 FName (int32 Len, const UTF8CHAR *Name, int32 Number)
 
 FName (TStringView< ANSICHAR > View, int32 InNumber, EFindName FindType)
 
 FName (TStringView< WIDECHAR > View, int32 InNumber, EFindName FindType)
 
 FName (TStringView< UTF8CHAR > View, int32 InNumber, EFindName FindType)
 
 FName (TStringView< ANSICHAR > View, int32 InNumber)
 
 FName (TStringView< WIDECHAR > View, int32 InNumber)
 
 FName (TStringView< UTF8CHAR > View, int32 InNumber)
 
 FName (const TCHAR *Name, int32 InNumber, EFindName FindType, bool bSplitName)
 
 FName (const TCHAR *Name, int32 InNumber, bool bSplitName)
 
 FName (const FNameEntrySerialized &LoadedEntry)
 
bool operator== (const ANSICHAR *Other) const
 
bool operator== (const WIDECHAR *Other) const
 
template<typename CharType >
bool operator!= (const CharType *Other) const
 
const ENameToEName () const
 
FORCEINLINE uint64 ToUnstableInt () const
 

Static Public Member Functions

static bool IsValidXName (const FName InName, const FString &InInvalidChars, FText *OutReason=nullptr, const FText *InErrorCtx=nullptr)
 
static bool IsValidXName (const TCHAR *InName, const FString &InInvalidChars, FText *OutReason=nullptr, const FText *InErrorCtx=nullptr)
 
static bool IsValidXName (const FString &InName, const FString &InInvalidChars, FText *OutReason=nullptr, const FText *InErrorCtx=nullptr)
 
static bool IsValidXName (const FStringView &InName, const FString &InInvalidChars, FText *OutReason=nullptr, const FText *InErrorCtx=nullptr)
 
static FString SanitizeWhitespace (const FString &FNameString)
 
static FNameEntryId GetComparisonIdFromDisplayId (FNameEntryId DisplayId)
 
static FName CreateFromDisplayId (FNameEntryId DisplayId, int32 Number)
 
static void DisplayHash (class FOutputDevice &Ar)
 
static FString SafeString (FNameEntryId InDisplayIndex, int32 InstanceNumber=NAME_NO_NUMBER_INTERNAL)
 
static int32 GetNameEntryMemorySize ()
 
static int32 GetNameTableMemorySize ()
 
static int32 GetNumAnsiNames ()
 
static int32 GetNumWideNames ()
 
static TArray< const FNameEntry * > DebugDump ()
 
static FNameEntry constGetEntry (EName Ename)
 
static FNameEntry constGetEntry (FNameEntryId Id)
 
static void AutoTest ()
 
static FString NameToDisplayString (const FString &InDisplayName, const bool bIsBool)
 
static void AddNameToDisplayStringExemption (const FString &InExemption)
 
static void RemoveNameToDisplayStringExemption (const FString &InExemption)
 
static void TearDown ()
 

Static Public Attributes

static constexpr uint32 StringBufferSize = NAME_SIZE + 1 + 10
 

Private Member Functions

friend FMinimalName::FMinimalName (const FName &Name)
 
friend FScriptName::FScriptName (const FName &Name)
 
friend FMemoryImageName::FMemoryImageName (const FName &Name)
 
template<typename StringBufferType >
FORCEINLINE void AppendStringInternal (StringBufferType &Out) const
 
FORCEINLINE FNameEntryId GetDisplayIndexFast () const
 
FORCEINLINE FNameEntryId GetComparisonIndexInternal () const
 
FORCEINLINE FNameEntryId GetDisplayIndexInternal () const
 

Static Private Member Functions

static const FNameEntryResolveEntry (FNameEntryId LookupId)
 
static const FNameEntryResolveEntryRecursive (FNameEntryId LookupId)
 
static bool IsWithinBounds (FNameEntryId Id)
 
static FORCEINLINE FName CreateNumberedNameIfNecessary (FNameEntryId ComparisonId, FNameEntryId DisplayId, int32 Number)
 
static FORCEINLINE FName CreateNumberedNameIfNecessary (FNameEntryId ComparisonId, int32 Number)
 

Private Attributes

FNameEntryId ComparisonIndex
 
uint32 Number
 

Friends

struct FNameHelper
 
const TCHAR * DebugFName (int32)
 
const TCHAR * DebugFName (int32, int32)
 
const TCHAR * DebugFName (FName &)
 
FScriptName NameToScriptName (FName InName)
 
FMinimalName NameToMinimalName (FName InName)
 
template<typename CharType >
bool operator== (const CharType *LHS, const FName &RHS)
 
template<typename CharType >
bool operator!= (const CharType *LHS, const FName &RHS)
 
FORCEINLINE bool operator== (FName Lhs, FMinimalName Rhs)
 
FORCEINLINE bool operator== (FName Lhs, FScriptName Rhs)
 
FORCEINLINE bool operator== (FName Lhs, FMemoryImageName Rhs)
 
FORCEINLINE uint32 GetTypeHash (FName Name)
 
FORCEINLINE bool operator== (FMinimalName Lhs, FName Rhs)
 
FORCEINLINE bool operator!= (FMinimalName Lhs, FName Rhs)
 
FORCEINLINE bool operator!= (FName Lhs, FMinimalName Rhs)
 
FORCEINLINE bool operator== (FScriptName Lhs, FName Rhs)
 
FORCEINLINE bool operator!= (FScriptName Lhs, FName Rhs)
 
FORCEINLINE bool operator!= (FName Lhs, FScriptName Rhs)
 
FORCEINLINE bool operator== (FMemoryImageName Lhs, FName Rhs)
 
FORCEINLINE bool operator!= (FName Lhs, FMemoryImageName Rhs)
 
FORCEINLINE bool operator!= (FMemoryImageName Lhs, FName Rhs)
 

Detailed Description

Public name, available to the world. Names are stored as a combination of an index into a table of unique strings and an instance number. Names are case-insensitive, but case-preserving (when WITH_CASE_PRESERVING_NAME is 1)

Definition at line 600 of file NameTypes.h.

Constructor & Destructor Documentation

◆ FName() [1/39]

FORCEINLINE FName::FName ( EName Ename)
inline

Create an FName with a hardcoded string index.

Parameters
NThe hardcoded value the string portion of the name will have. The number portion will be NAME_NO_NUMBER

Definition at line 916 of file NameTypes.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ FName() [2/39]

FORCEINLINE FName::FName ( EName Ename,
int32 InNumber )
inline

Create an FName with a hardcoded string index and (instance).

Parameters
NThe hardcoded value the string portion of the name will have
InNumberThe hardcoded value for the number portion of the name

Definition at line 924 of file NameTypes.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ FName() [3/39]

FORCEINLINE FName::FName ( FName Other,
int32 InNumber )
inline

Create an FName from an existing string, but with a different instance.

Parameters
OtherThe FName to take the string values from
InNumberThe hardcoded value for the number portion of the name

Definition at line 936 of file NameTypes.h.

+ Here is the call graph for this function:

◆ FName() [4/39]

FORCEINLINE FName::FName ( FNameEntryId InComparisonIndex,
FNameEntryId InDisplayIndex,
int32 InNumber )
inline

Create an FName from its component parts Only call this if you really know what you're doing

Definition at line 945 of file NameTypes.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ FName() [5/39]

FORCEINLINE FName::FName ( )
inline

Default constructor, initialized to None

Definition at line 974 of file NameTypes.h.

+ Here is the caller graph for this function:

◆ FName() [6/39]

FName::FName ( ENoInit )
inlineexplicit

Scary no init constructor, used for something obscure in UObjectBase

Definition at line 984 of file NameTypes.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ FName() [7/39]

FORCEINLINE FName::FName ( FMinimalName InName)
explicit

Definition at line 1565 of file NameTypes.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ FName() [8/39]

FORCEINLINE FName::FName ( FScriptName InName)
explicit

Definition at line 1574 of file NameTypes.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ FName() [9/39]

FORCEINLINE FName::FName ( FMemoryImageName InName)

Definition at line 1583 of file NameTypes.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ FName() [10/39]

FName::FName ( const WIDECHAR * Name,
EFindName FindType = FNAME_Add )

Create an FName. If FindType is FNAME_Find, and the name doesn't already exist, then the name will be NAME_None. The check for existance or not depends on UE_FNAME_OUTLINE_NUMBER. When UE_FNAME_OUTLINE_NUMBER is 0, we only check for the string part. When UE_FNAME_OUTLINE_NUMBER is 1, we check for whole name including the number.

Parameters
NameValue for the string portion of the name
FindTypeAction to take (see EFindName)
+ Here is the caller graph for this function:

◆ FName() [11/39]

FName::FName ( const UTF8CHAR * Name,
EFindName FindType = FNAME_Add )

◆ FName() [12/39]

FName::FName ( const char * Name,
EFindName FindType = FNAME_Add )
inline

Definition at line 1009 of file NameTypes.h.

+ Here is the caller graph for this function:

◆ FName() [13/39]

FName::FName ( int32 Len,
const WIDECHAR * Name,
EFindName FindType = FNAME_Add )

Create FName from non-null string with known length

◆ FName() [14/39]

FName::FName ( int32 Len,
const ANSICHAR * Name,
EFindName FindType = FNAME_Add )

◆ FName() [15/39]

FName::FName ( int32 Len,
const UTF8CHAR * Name,
EFindName FindType = FNAME_Add )

◆ FName() [16/39]

FName::FName ( TStringView< ANSICHAR > View,
EFindName FindType = FNAME_Add )
inlineexplicit

Definition at line 1020 of file NameTypes.h.

+ Here is the call graph for this function:

◆ FName() [17/39]

FName::FName ( TStringView< WIDECHAR > View,
EFindName FindType = FNAME_Add )
inlineexplicit

Definition at line 1025 of file NameTypes.h.

+ Here is the call graph for this function:

◆ FName() [18/39]

FName::FName ( TStringView< UTF8CHAR > View,
EFindName FindType = FNAME_Add )
inlineexplicit

Definition at line 1030 of file NameTypes.h.

+ Here is the call graph for this function:

◆ FName() [19/39]

FName::FName ( const WIDECHAR * Name,
int32 Number,
EFindName FindType )

Create an FName. Will add the string to the name table if it does not exist. When UE_FNAME_OUTLINE_NUMBER is set, will also add the combination of base string and number to the name table if it doesn't exist.

Parameters
NameValue for the string portion of the name
NumberValue for the number portion of the name

◆ FName() [20/39]

FName::FName ( const ANSICHAR * Name,
int32 Number,
EFindName FindType )

◆ FName() [21/39]

FName::FName ( const UTF8CHAR * Name,
int32 Number,
EFindName FindType )

◆ FName() [22/39]

FName::FName ( int32 Len,
const WIDECHAR * Name,
int32 Number,
EFindName FindType )

◆ FName() [23/39]

FName::FName ( int32 Len,
const ANSICHAR * Name,
int32 Number,
EFindName FindType )

◆ FName() [24/39]

FName::FName ( int32 Len,
const UTF8CHAR * Name,
int32 Number,
EFindName FindType )

◆ FName() [25/39]

FName::FName ( const WIDECHAR * Name,
int32 Number )

◆ FName() [26/39]

FName::FName ( const ANSICHAR * Name,
int32 Number )

◆ FName() [27/39]

FName::FName ( const UTF8CHAR * Name,
int32 Number )

◆ FName() [28/39]

FName::FName ( int32 Len,
const WIDECHAR * Name,
int32 Number )

◆ FName() [29/39]

FName::FName ( int32 Len,
const ANSICHAR * Name,
int32 Number )

◆ FName() [30/39]

FName::FName ( int32 Len,
const UTF8CHAR * Name,
int32 Number )

◆ FName() [31/39]

FName::FName ( TStringView< ANSICHAR > View,
int32 InNumber,
EFindName FindType )
inline

Definition at line 1064 of file NameTypes.h.

+ Here is the call graph for this function:

◆ FName() [32/39]

FName::FName ( TStringView< WIDECHAR > View,
int32 InNumber,
EFindName FindType )
inline

Definition at line 1072 of file NameTypes.h.

+ Here is the call graph for this function:

◆ FName() [33/39]

FName::FName ( TStringView< UTF8CHAR > View,
int32 InNumber,
EFindName FindType )
inline

Definition at line 1080 of file NameTypes.h.

+ Here is the call graph for this function:

◆ FName() [34/39]

FName::FName ( TStringView< ANSICHAR > View,
int32 InNumber )
inline

Definition at line 1088 of file NameTypes.h.

+ Here is the call graph for this function:

◆ FName() [35/39]

FName::FName ( TStringView< WIDECHAR > View,
int32 InNumber )
inline

Definition at line 1093 of file NameTypes.h.

+ Here is the call graph for this function:

◆ FName() [36/39]

FName::FName ( TStringView< UTF8CHAR > View,
int32 InNumber )
inline

Definition at line 1098 of file NameTypes.h.

+ Here is the call graph for this function:

◆ FName() [37/39]

FName::FName ( const TCHAR * Name,
int32 InNumber,
EFindName FindType,
bool bSplitName )

Create an FName. If FindType is FNAME_Find, and the string part of the name doesn't already exist, then the name will be NAME_None

Parameters
NameValue for the string portion of the name
NumberValue for the number portion of the name
FindTypeAction to take (see EFindName)
bSplitNametrue if the trailing number should be split from the name when Number == NAME_NO_NUMBER_INTERNAL, or false to always use the name as-is

◆ FName() [38/39]

FName::FName ( const TCHAR * Name,
int32 InNumber,
bool bSplitName )

◆ FName() [39/39]

FName::FName ( const FNameEntrySerialized & LoadedEntry)

Constructor used by FLinkerLoad when loading its name table; Creates an FName with an instance number of 0 that does not attempt to split the FName into string and number portions. Also, this version skips calculating the hashes of the names if possible

Member Function Documentation

◆ AddNameToDisplayStringExemption()

static void FName::AddNameToDisplayStringExemption ( const FString & InExemption)
static

Add/remove an exemption to the formatting applied by NameToDisplayString. Example: exempt the compound word "MetaHuman" to ensure its not reformatted as "Meta Human".

◆ AppendString() [1/3]

void FName::AppendString ( FString & Out) const

Converts an FName to a readable format, in place, appending to an existing string (ala GetFullName)

Parameters
OutString to append with the string representation of the name

◆ AppendString() [2/3]

void FName::AppendString ( FUtf8StringBuilderBase & Out) const
+ Here is the caller graph for this function:

◆ AppendString() [3/3]

void FName::AppendString ( FWideStringBuilderBase & Out) const

Converts an FName to a readable format, in place, appending to an existing string (ala GetFullName)

Parameters
OutStringBuilder to append with the string representation of the name
+ Here is the caller graph for this function:

◆ AppendStringInternal()

FORCEINLINE void FName::AppendStringInternal ( StringBufferType & Out) const
private

◆ AutoTest()

static void FName::AutoTest ( )
static

Run autotest on FNames.

◆ Compare()

int32 FName::Compare ( const FName & Other) const

Compares name to passed in one. Sort is alphabetical ascending.

Parameters
OtherName to compare this against
Returns
< 0 is this < Other, 0 if this == Other, > 0 if this > Other
+ Here is the caller graph for this function:

◆ CompareIndexes()

FORCEINLINE int32 FName::CompareIndexes ( const FName & Other) const
inline

Fast non-alphabetical order that is only stable during this process' lifetime.

Parameters
OtherName to compare this against
Returns
< 0 is this < Other, 0 if this == Other, > 0 if this > Other

Definition at line 897 of file NameTypes.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ CreateFromDisplayId()

static FName FName::CreateFromDisplayId ( FNameEntryId DisplayId,
int32 Number )
inlinestatic

Only call this if you really know what you're doing

Definition at line 959 of file NameTypes.h.

+ Here is the call graph for this function:

◆ CreateNumberedNameIfNecessary() [1/2]

static FORCEINLINE FName FName::CreateNumberedNameIfNecessary ( FNameEntryId ComparisonId,
FNameEntryId DisplayId,
int32 Number )
inlinestaticprivate

Definition at line 1301 of file NameTypes.h.

+ Here is the caller graph for this function:

◆ CreateNumberedNameIfNecessary() [2/2]

static FORCEINLINE FName FName::CreateNumberedNameIfNecessary ( FNameEntryId ComparisonId,
int32 Number )
inlinestaticprivate

Definition at line 1322 of file NameTypes.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ DebugDump()

static TArray< const FNameEntry * > FName::DebugDump ( )
static

◆ DisplayHash()

static void FName::DisplayHash ( class FOutputDevice & Ar)
static

◆ FastLess()

FORCEINLINE bool FName::FastLess ( const FName & Other) const
inline

Fast non-alphabetical order that is only stable during this process' lifetime.

Definition at line 773 of file NameTypes.h.

+ Here is the call graph for this function:

◆ FMemoryImageName::FMemoryImageName()

FName::FMemoryImageName::FMemoryImageName ( const FName & Name)
private

◆ FMinimalName::FMinimalName()

FName::FMinimalName::FMinimalName ( const FName & Name)
private

◆ FScriptName::FScriptName()

FName::FScriptName::FScriptName ( const FName & Name)
private

◆ GetComparisonIdFromDisplayId()

static FNameEntryId FName::GetComparisonIdFromDisplayId ( FNameEntryId DisplayId)
inlinestatic

Definition at line 953 of file NameTypes.h.

+ Here is the caller graph for this function:

◆ GetComparisonIndex()

FORCEINLINE FNameEntryId FName::GetComparisonIndex ( ) const
inline

Definition at line 607 of file NameTypes.h.

+ Here is the caller graph for this function:

◆ GetComparisonIndexInternal()

FORCEINLINE FNameEntryId FName::GetComparisonIndexInternal ( ) const
inlineprivate

Definition at line 1274 of file NameTypes.h.

+ Here is the caller graph for this function:

◆ GetComparisonNameEntry()

const FNameEntry * FName::GetComparisonNameEntry ( ) const

◆ GetDisplayIndex()

FORCEINLINE FNameEntryId FName::GetDisplayIndex ( ) const
inline

Definition at line 613 of file NameTypes.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetDisplayIndexFast()

FORCEINLINE FNameEntryId FName::GetDisplayIndexFast ( ) const
inlineprivate

Definition at line 1264 of file NameTypes.h.

+ Here is the caller graph for this function:

◆ GetDisplayIndexInternal()

FORCEINLINE FNameEntryId FName::GetDisplayIndexInternal ( ) const
inlineprivate

Definition at line 1280 of file NameTypes.h.

◆ GetDisplayNameEntry()

const FNameEntry * FName::GetDisplayNameEntry ( ) const
+ Here is the caller graph for this function:

◆ GetEntry() [1/2]

static FNameEntry const * FName::GetEntry ( EName Ename)
static

◆ GetEntry() [2/2]

static FNameEntry const * FName::GetEntry ( FNameEntryId Id)
static

◆ GetNameEntryMemorySize()

static int32 FName::GetNameEntryMemorySize ( )
static
Returns
Size of all name entries.

◆ GetNameTableMemorySize()

static int32 FName::GetNameTableMemorySize ( )
static
Returns
Size of Name Table object as a whole

◆ GetNumAnsiNames()

static int32 FName::GetNumAnsiNames ( )
static
Returns
number of ansi names in name table

◆ GetNumber()

FORCEINLINE int32 FName::GetNumber ( ) const
inline

Definition at line 625 of file NameTypes.h.

+ Here is the caller graph for this function:

◆ GetNumWideNames()

static int32 FName::GetNumWideNames ( )
static
Returns
number of wide names in name table

◆ GetPlainANSIString()

void FName::GetPlainANSIString ( ANSICHAR(&) AnsiName[NAME_SIZE]) const

Copy ANSI name without number part. Must only be used for ANSI FNames. Doesn't allocate.

◆ GetPlainNameString() [1/2]

FString * FName::GetPlainNameString ( FString * result) const
inline

Get name without number part as a dynamically allocated string

Definition at line 637 of file NameTypes.h.

◆ GetPlainNameString() [2/2]

uint32 FName::GetPlainNameString ( TCHAR(&) OutName[NAME_SIZE]) const

Convert name without number part into TCHAR buffer and returns string length. Doesn't allocate.

◆ GetPlainWIDEString()

void FName::GetPlainWIDEString ( WIDECHAR(&) WideName[NAME_SIZE]) const

Copy wide name without number part. Must only be used for wide FNames. Doesn't allocate.

◆ GetStringLength()

uint32 FName::GetStringLength ( ) const

Get the number of characters, excluding null-terminator, that ToString() would yield

◆ IsEqual()

FORCEINLINE bool FName::IsEqual ( const FName & Other,
const ENameCase CompareMethod = ENameCase::IgnoreCase,
const bool bCompareNumber = true ) const

Check to see if this FName matches the other FName, potentially also checking for any case variations

Definition at line 1641 of file NameTypes.h.

+ Here is the call graph for this function:

◆ IsNone()

FORCEINLINE bool FName::IsNone ( ) const
inline

True for FName(), FName(NAME_None) and FName("None")

Definition at line 785 of file NameTypes.h.

+ Here is the call graph for this function:

◆ IsValid()

bool FName::IsValid ( ) const
inline

Paranoid sanity check

All FNames are valid except for stomped memory, dangling pointers, etc. Should only be used to investigate such bugs and not in production code.

Definition at line 800 of file NameTypes.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ IsValidGroupName()

bool FName::IsValidGroupName ( FText & OutReason,
bool bIsGroupName = false ) const
inline

Takes an FName and checks to see that it follows the rules that Unreal requires for package or group names.

Parameters
OutReasonIf the check fails, this string is filled in with the reason why.
bIsGroupNameif true, check legality for a group name, else check legality for a package name
Returns
true if the name is valid

Definition at line 868 of file NameTypes.h.

+ Here is the call graph for this function:

◆ IsValidIndexFast()

bool FName::IsValidIndexFast ( ) const
inline

Paranoid sanity check, same as IsValid()

Definition at line 803 of file NameTypes.h.

+ Here is the call graph for this function:

◆ IsValidObjectName()

bool FName::IsValidObjectName ( FText & OutReason) const
inline

Takes an FName and checks to see that it follows the rules that Unreal requires for object names.

Parameters
OutReasonIf the check fails, this string is filled in with the reason why.
Returns
true if the name is valid

Definition at line 855 of file NameTypes.h.

+ Here is the call graph for this function:

◆ IsValidXName() [1/6]

static bool FName::IsValidXName ( const FName InName,
const FString & InInvalidChars,
FText * OutReason = nullptr,
const FText * InErrorCtx = nullptr )
static

Checks to see that a given name-like string follows the rules that Unreal requires.

Parameters
InNameString containing the name to test.
InInvalidCharsThe set of invalid characters that the name cannot contain.
OutReasonIf the check fails, this string is filled in with the reason why.
InErrorCtxError context information to show in the error message (default is "Name").
Returns
true if the name is valid
+ Here is the caller graph for this function:

◆ IsValidXName() [2/6]

bool FName::IsValidXName ( const FString & InInvalidChars = INVALID_NAME_CHARACTERS,
FText * OutReason = nullptr,
const FText * InErrorCtx = nullptr ) const
inline

Checks to see that a FName follows the rules that Unreal requires.

Parameters
InInvalidCharsThe set of invalid characters that the name cannot contain
OutReasonIf the check fails, this string is filled in with the reason why.
InErrorCtxError context information to show in the error message (default is "Name").
Returns
true if the name is valid

Definition at line 830 of file NameTypes.h.

+ Here is the call graph for this function:

◆ IsValidXName() [3/6]

static bool FName::IsValidXName ( const FString & InName,
const FString & InInvalidChars,
FText * OutReason = nullptr,
const FText * InErrorCtx = nullptr )
static

◆ IsValidXName() [4/6]

static bool FName::IsValidXName ( const FStringView & InName,
const FString & InInvalidChars,
FText * OutReason = nullptr,
const FText * InErrorCtx = nullptr )
static

◆ IsValidXName() [5/6]

static bool FName::IsValidXName ( const TCHAR * InName,
const FString & InInvalidChars,
FText * OutReason = nullptr,
const FText * InErrorCtx = nullptr )
static

◆ IsValidXName() [6/6]

bool FName::IsValidXName ( FText & OutReason,
const FString & InInvalidChars = INVALID_NAME_CHARACTERS ) const
inline

Takes an FName and checks to see that it follows the rules that Unreal requires.

Parameters
OutReasonIf the check fails, this string is filled in with the reason why.
InInvalidCharsThe set of invalid characters that the name cannot contain
Returns
true if the name is valid

Definition at line 843 of file NameTypes.h.

+ Here is the call graph for this function:

◆ IsWithinBounds()

static bool FName::IsWithinBounds ( FNameEntryId Id)
staticprivate
+ Here is the caller graph for this function:

◆ LexicalLess()

FORCEINLINE bool FName::LexicalLess ( const FName & Other) const
inline

Slow alphabetical order that is stable / deterministic over process runs.

Definition at line 779 of file NameTypes.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ NameToDisplayString()

static FString FName::NameToDisplayString ( const FString & InDisplayName,
const bool bIsBool )
static

Takes a string and breaks it down into a human readable string. For example - "bCreateSomeStuff" becomes "Create Some Stuff?" and "DrawScale3D" becomes "Draw Scale 3D".

Parameters
InDisplayName[In, Out] The name to sanitize
bIsBoolTrue if the name is a bool
Returns
the sanitized version of the display name

◆ operator!=() [1/3]

template<typename CharType >
bool FName::operator!= ( const CharType * Other) const
inline

Inequality operator.

Parameters
OtherString to compare this name to
Returns
true if name does not match the string, false otherwise

Definition at line 1140 of file NameTypes.h.

◆ operator!=() [2/3]

FORCEINLINE bool FName::operator!= ( EName Ename) const

Definition at line 1668 of file NameTypes.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ operator!=() [3/3]

FORCEINLINE bool FName::operator!= ( FName Other) const
inline

Definition at line 750 of file NameTypes.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ operator==() [1/4]

bool FName::operator== ( const ANSICHAR * Other) const

Equality operator.

Parameters
OtherString to compare this name to
Returns
true if name matches the string, false otherwise

◆ operator==() [2/4]

bool FName::operator== ( const WIDECHAR * Other) const

◆ operator==() [3/4]

FORCEINLINE bool FName::operator== ( EName Ename) const

Definition at line 1636 of file NameTypes.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ operator==() [4/4]

FORCEINLINE bool FName::operator== ( FName Other) const
inline

Definition at line 745 of file NameTypes.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ RemoveNameToDisplayStringExemption()

static void FName::RemoveNameToDisplayStringExemption ( const FString & InExemption)
static

◆ ResolveEntry()

static const FNameEntry * FName::ResolveEntry ( FNameEntryId LookupId)
staticprivate

◆ ResolveEntryRecursive()

static const FNameEntry * FName::ResolveEntryRecursive ( FNameEntryId LookupId)
staticprivate

◆ SafeString()

static FString FName::SafeString ( FNameEntryId InDisplayIndex,
int32 InstanceNumber = NAME_NO_NUMBER_INTERNAL )
static

◆ SanitizeWhitespace()

static FString FName::SanitizeWhitespace ( const FString & FNameString)
static

Printing FNames in logging or on screen can be problematic when they contain Whitespace characters such as
and \r, so this will return an FName based upon the calling FName, but with any Whitespace characters potentially problematic for showing in a log or on screen omitted.

Returns
the new FName based upon the calling FName, but with any Whitespace characters potentially problematic for showing in a log or on screen omitted.

◆ SetNumber()

FORCEINLINE void FName::SetNumber ( const int32 NewNumber)
inline

Definition at line 630 of file NameTypes.h.

◆ TearDown()

static void FName::TearDown ( )
static

Tear down system and free all allocated memory

FName must not be used after teardown

◆ ToEName()

const EName * FName::ToEName ( ) const

Get the EName that this FName represents or nullptr

◆ ToString() [1/6]

FString FName::ToString ( ) const
inline

Converts an FName to a readable format

Returns
String representation of the name

Definition at line 662 of file NameTypes.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ToString() [2/6]

void FName::ToString ( FString & Out) const
inline

Converts an FName to a readable format, in place

Parameters
OutString to fill with the string representation of the name

Definition at line 678 of file NameTypes.h.

+ Here is the caller graph for this function:

◆ ToString() [3/6]

void FName::ToString ( FUtf8StringBuilderBase & Out) const

◆ ToString() [4/6]

void FName::ToString ( FWideStringBuilderBase & Out) const

Converts an FName to a readable format, in place

Parameters
OutStringBuilder to fill with the string representation of the name

◆ ToString() [5/6]

uint32 FName::ToString ( TCHAR * Out,
uint32 OutSize ) const

Convert to string buffer to avoid dynamic allocations and returns string length

Fails hard if OutLen < GetStringLength() + 1. StringBufferSize guarantees success.

Note that a default constructed FName returns "None" instead of ""

◆ ToString() [6/6]

template<int N>
uint32 FName::ToString ( TCHAR(&) Out[N]) const
inline

Definition at line 711 of file NameTypes.h.

◆ ToUnstableInt()

FORCEINLINE uint64 FName::ToUnstableInt ( ) const
inline

Returns an integer that compares equal in the same way FNames do, only usable within the current process

Definition at line 1226 of file NameTypes.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ TryAppendAnsiString()

bool FName::TryAppendAnsiString ( FAnsiStringBuilderBase & Out) const

Converts an ANSI FName to a readable format appended to the string builder.

Parameters
OutA string builder to write the readable representation of the name into.
Returns
Whether the string is ANSI. A return of false indicates that the string was wide and was not written.

◆ UE_DEPRECATED() [1/2]

FName::UE_DEPRECATED ( 4. 23,
"Please use B.FastLess(A) or B.LexicalLess(A) instead of A,
B."  ) const &
inline

Definition at line 766 of file NameTypes.h.

+ Here is the call graph for this function:

◆ UE_DEPRECATED() [2/2]

FName::UE_DEPRECATED ( 4. 23,
"Please use FastLess() / FNameFastLess or LexicalLess() / FNameLexicalLess instead. " "Default lexical sort order is deprecated to avoid unintended expensive sorting. "  ) const &
inline

Definition at line 759 of file NameTypes.h.

+ Here is the call graph for this function:

Friends And Related Symbol Documentation

◆ DebugFName [1/3]

const TCHAR * DebugFName ( FName & )
friend

◆ DebugFName [2/3]

const TCHAR * DebugFName ( int32 )
friend

◆ DebugFName [3/3]

const TCHAR * DebugFName ( int32 ,
int32  )
friend

◆ FNameHelper

friend struct FNameHelper
friend

Definition at line 1254 of file NameTypes.h.

◆ GetTypeHash

FORCEINLINE uint32 GetTypeHash ( FName Name)
friend

Definition at line 1383 of file NameTypes.h.

◆ NameToMinimalName

FMinimalName NameToMinimalName ( FName InName)
friend

Definition at line 1658 of file NameTypes.h.

◆ NameToScriptName

FScriptName NameToScriptName ( FName InName)
friend

Definition at line 1663 of file NameTypes.h.

◆ operator!= [1/7]

template<typename CharType >
bool operator!= ( const CharType * LHS,
const FName & RHS )
friend

Inequality operator with CharType* on left hand side and FName on right hand side

Parameters
LHSCharType to compare to FName
RHSFName to compare to CharType
Returns
True if strings don't match, false otherwise.

Definition at line 1348 of file NameTypes.h.

◆ operator!= [2/7]

FORCEINLINE bool operator!= ( FMemoryImageName Lhs,
FName Rhs )
friend

Definition at line 1422 of file NameTypes.h.

◆ operator!= [3/7]

FORCEINLINE bool operator!= ( FMinimalName Lhs,
FName Rhs )
friend

Definition at line 1392 of file NameTypes.h.

◆ operator!= [4/7]

FORCEINLINE bool operator!= ( FName Lhs,
FMemoryImageName Rhs )
friend

Definition at line 1418 of file NameTypes.h.

◆ operator!= [5/7]

FORCEINLINE bool operator!= ( FName Lhs,
FMinimalName Rhs )
friend

Definition at line 1397 of file NameTypes.h.

◆ operator!= [6/7]

FORCEINLINE bool operator!= ( FName Lhs,
FScriptName Rhs )
friend

Definition at line 1410 of file NameTypes.h.

◆ operator!= [7/7]

FORCEINLINE bool operator!= ( FScriptName Lhs,
FName Rhs )
friend

Definition at line 1406 of file NameTypes.h.

◆ operator== [1/7]

template<typename CharType >
bool operator== ( const CharType * LHS,
const FName & RHS )
friend

Equality operator with CharType* on left hand side and FName on right hand side

Parameters
LHSCharType to compare to FName
RHSFName to compare to CharType
Returns
True if strings match, false otherwise.

Definition at line 1335 of file NameTypes.h.

◆ operator== [2/7]

Definition at line 1414 of file NameTypes.h.

◆ operator== [3/7]

FORCEINLINE bool operator== ( FMinimalName Lhs,
FName Rhs )
friend

Definition at line 1388 of file NameTypes.h.

◆ operator== [4/7]

Definition at line 1379 of file NameTypes.h.

◆ operator== [5/7]

FORCEINLINE bool operator== ( FName Lhs,
FMinimalName Rhs )
friend

Definition at line 1371 of file NameTypes.h.

◆ operator== [6/7]

FORCEINLINE bool operator== ( FName Lhs,
FScriptName Rhs )
friend

Definition at line 1375 of file NameTypes.h.

◆ operator== [7/7]

FORCEINLINE bool operator== ( FScriptName Lhs,
FName Rhs )
friend

Definition at line 1402 of file NameTypes.h.

Member Data Documentation

◆ ComparisonIndex

FNameEntryId FName::ComparisonIndex
private

Index into the Names array (used to find String portion of the string/number pair used for comparison)

Definition at line 1240 of file NameTypes.h.

◆ Number

uint32 FName::Number
private

Number portion of the string/number pair (stored internally as 1 more than actual, so zero'd memory will be the default, no-instance case)

Definition at line 1243 of file NameTypes.h.

◆ StringBufferSize

constexpr uint32 FName::StringBufferSize = NAME_SIZE + 1 + 10
staticconstexpr

Buffer size required for any null-terminated FName string, i.e. [name] '_' [digits] '\0'

Definition at line 699 of file NameTypes.h.


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