Ark Server API (ASA) - Wiki
Loading...
Searching...
No Matches
FGuid Struct Reference

#include <Guid.h>

Public Member Functions

 FGuid ()
 
 FGuid (uint32 InA, uint32 InB, uint32 InC, uint32 InD)
 
 FGuid (const FString &InGuidStr)
 
uint32operator[] (int32 Index)
 
const uint32operator[] (int32 Index) const
 
bool Serialize (FArchive &Ar)
 
bool Serialize (FStructuredArchive::FSlot Slot)
 
bool ExportTextItem (FString &ValueStr, FGuid const &DefaultValue, UObject *Parent, int32 PortFlags, struct UObject *ExportRootScope) const
 
bool ImportTextItem (const TCHAR *&Buffer, int32 PortFlags, UObject *Parent, FOutputDevice *ErrorText)
 
void Invalidate ()
 
bool IsValid () const
 
FString ToString (EGuidFormats Format=EGuidFormats::Digits) const
 
void AppendString (FString &Out, EGuidFormats Format=EGuidFormats::Digits) const
 
void AppendString (FAnsiStringBuilderBase &Builder, EGuidFormats Format=EGuidFormats::DigitsWithHyphensLower) const
 
void AppendString (FUtf8StringBuilderBase &Builder, EGuidFormats Format=EGuidFormats::DigitsWithHyphensLower) const
 
void AppendString (FWideStringBuilderBase &Builder, EGuidFormats Format=EGuidFormats::DigitsWithHyphensLower) const
 

Static Public Member Functions

static FGuid NewGuid ()
 
static bool Parse (const FString &GuidString, FGuid &OutGuid)
 
static bool ParseExact (const FString &GuidString, EGuidFormats Format, FGuid &OutGuid)
 

Public Attributes

uint32 A
 
uint32 B
 
uint32 C
 
uint32 D
 

Friends

bool operator== (const FGuid &X, const FGuid &Y)
 
bool operator!= (const FGuid &X, const FGuid &Y)
 
bool operator< (const FGuid &X, const FGuid &Y)
 
FArchiveoperator<< (FArchive &Ar, FGuid &G)
 
void operator<< (FStructuredArchive::FSlot Slot, FGuid &G)
 
FString LexToString (const FGuid &Value)
 
void LexFromString (FGuid &Result, const TCHAR *String)
 
uint32 GetTypeHash (const FGuid &Guid)
 

Detailed Description

Implements a globally unique identifier.

Definition at line 107 of file Guid.h.

Constructor & Destructor Documentation

◆ FGuid() [1/3]

FGuid::FGuid ( )
inline

Default constructor.

Definition at line 112 of file Guid.h.

+ Here is the caller graph for this function:

◆ FGuid() [2/3]

FGuid::FGuid ( uint32 InA,
uint32 InB,
uint32 InC,
uint32 InD )
inlineexplicit

Creates and initializes a new GUID from the specified components.

Parameters
InAThe first component.
InBThe second component.
InCThe third component.
InDThe fourth component.

Definition at line 127 of file Guid.h.

◆ FGuid() [3/3]

FGuid::FGuid ( const FString & InGuidStr)
inlineexplicit

Definition at line 131 of file Guid.h.

+ Here is the call graph for this function:

Member Function Documentation

◆ AppendString() [1/4]

void FGuid::AppendString ( FAnsiStringBuilderBase & Builder,
EGuidFormats Format = EGuidFormats::DigitsWithHyphensLower ) const

Appends this GUID to the string builder using the specified format.

◆ AppendString() [2/4]

void FGuid::AppendString ( FString & Out,
EGuidFormats Format = EGuidFormats::Digits ) const

Converts this GUID to its string representation using the specified format.

Parameters
FormatThe string format to use.
+ Here is the caller graph for this function:

◆ AppendString() [3/4]

void FGuid::AppendString ( FUtf8StringBuilderBase & Builder,
EGuidFormats Format = EGuidFormats::DigitsWithHyphensLower ) const

◆ AppendString() [4/4]

void FGuid::AppendString ( FWideStringBuilderBase & Builder,
EGuidFormats Format = EGuidFormats::DigitsWithHyphensLower ) const

◆ ExportTextItem()

bool FGuid::ExportTextItem ( FString & ValueStr,
FGuid const & DefaultValue,
UObject * Parent,
int32 PortFlags,
struct UObject * ExportRootScope ) const

Exports the GUIDs value to a string.

Parameters
ValueStrWill hold the string value.
DefaultValueThe default value.
ParentNot used.
PortFlagsNot used.
ExportRootScopeNot used.
Returns
true on success, false otherwise.
See also
ImportTextItem

◆ ImportTextItem()

bool FGuid::ImportTextItem ( const TCHAR *& Buffer,
int32 PortFlags,
UObject * Parent,
FOutputDevice * ErrorText )

Imports the GUIDs value from a text buffer.

Parameters
BufferThe text buffer to import from.
PortFlagsNot used.
ParentNot used.
ErrorTextThe output device for error logging.
Returns
true on success, false otherwise.
See also
ExportTextItem

◆ Invalidate()

void FGuid::Invalidate ( )
inline

Invalidates the GUID.

See also
IsValid

Definition at line 297 of file Guid.h.

+ Here is the caller graph for this function:

◆ IsValid()

bool FGuid::IsValid ( ) const
inline

Checks whether this GUID is valid or not.

A GUID that has all its components set to zero is considered invalid.

Returns
true if valid, false otherwise.
See also
Invalidate

Definition at line 310 of file Guid.h.

+ Here is the caller graph for this function:

◆ NewGuid()

static FGuid FGuid::NewGuid ( )
static

Returns a new GUID.

Returns
A new GUID.
+ Here is the caller graph for this function:

◆ operator[]() [1/2]

uint32 & FGuid::operator[] ( int32 Index)
inline

Provides access to the GUIDs components.

Parameters
IndexThe index of the component to return (0...3).
Returns
The component.

Definition at line 186 of file Guid.h.

◆ operator[]() [2/2]

const uint32 & FGuid::operator[] ( int32 Index) const
inline

Provides read-only access to the GUIDs components.

Parameters
IndexThe index of the component to return (0...3).
Returns
The component.

Definition at line 208 of file Guid.h.

◆ Parse()

static bool FGuid::Parse ( const FString & GuidString,
FGuid & OutGuid )
static

Converts a string to a GUID.

Parameters
GuidStringThe string to convert.
OutGuidWill contain the parsed GUID.
Returns
true if the string was converted successfully, false otherwise.
See also
ParseExact, ToString
+ Here is the caller graph for this function:

◆ ParseExact()

static bool FGuid::ParseExact ( const FString & GuidString,
EGuidFormats Format,
FGuid & OutGuid )
static

Converts a string with the specified format to a GUID.

Parameters
GuidStringThe string to convert.
FormatThe string format to parse.
OutGuidWill contain the parsed GUID.
Returns
true if the string was converted successfully, false otherwise.
See also
Parse, ToString

◆ Serialize() [1/2]

bool FGuid::Serialize ( FArchive & Ar)
inline

Definition at line 240 of file Guid.h.

◆ Serialize() [2/2]

bool FGuid::Serialize ( FStructuredArchive::FSlot Slot)
inline

Definition at line 259 of file Guid.h.

◆ ToString()

FString FGuid::ToString ( EGuidFormats Format = EGuidFormats::Digits) const
inline

Converts this GUID to its string representation.

Parameters
FormatThe string format to use.
Returns
The string representation.

Definition at line 321 of file Guid.h.

+ Here is the call graph for this function:

Friends And Related Symbol Documentation

◆ GetTypeHash

uint32 GetTypeHash ( const FGuid & Guid)
friend

Calculates the hash for a GUID.

Parameters
GuidThe GUID to calculate the hash for.
Returns
The hash.

Definition at line 350 of file Guid.h.

◆ LexFromString

void LexFromString ( FGuid & Result,
const TCHAR * String )
friend

Definition at line 254 of file Guid.h.

◆ LexToString

FString LexToString ( const FGuid & Value)
friend

Guid default string conversion.

Definition at line 249 of file Guid.h.

◆ operator!=

bool operator!= ( const FGuid & X,
const FGuid & Y )
friend

Compares two GUIDs for inequality.

Parameters
XThe first GUID to compare.
YThe second GUID to compare.
Returns
true if the GUIDs are not equal, false otherwise.

Definition at line 160 of file Guid.h.

◆ operator<

bool operator< ( const FGuid & X,
const FGuid & Y )
friend

Compares two GUIDs.

Parameters
XThe first GUID to compare.
YThe second GUID to compare.
Returns
true if the first GUID is less than the second one.

Definition at line 172 of file Guid.h.

◆ operator<< [1/2]

FArchive & operator<< ( FArchive & Ar,
FGuid & G )
friend

Serializes a GUID from or into an archive.

Parameters
ArThe archive to serialize from or into.
GThe GUID to serialize.

◆ operator<< [2/2]

void operator<< ( FStructuredArchive::FSlot Slot,
FGuid & G )
friend

Serializes a GUID from or into a structured archive slot.

Parameters
SlotThe structured archive slot to serialize from or into
GThe GUID to serialize.

◆ operator==

bool operator== ( const FGuid & X,
const FGuid & Y )
friend

Compares two GUIDs for equality.

Parameters
XThe first GUID to compare.
YThe second GUID to compare.
Returns
true if the GUIDs are equal, false otherwise.

Definition at line 148 of file Guid.h.

Member Data Documentation

◆ A

uint32 FGuid::A

Holds the first component.

Definition at line 389 of file Guid.h.

◆ B

uint32 FGuid::B

Holds the second component.

Definition at line 392 of file Guid.h.

◆ C

uint32 FGuid::C

Holds the third component.

Definition at line 395 of file Guid.h.

◆ D

uint32 FGuid::D

Holds the fourth component.

Definition at line 398 of file Guid.h.


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