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

#include <Text.h>

+ Collaboration diagram for FTextFormat:

Public Types

enum class  EExpressionType { Invalid , Simple , Complex }
 

Public Member Functions

 FTextFormat ()
 
 FTextFormat (const FText &InText)
 
 FTextFormat (const FText &InText, FTextFormatPatternDefinitionConstRef InCustomPatternDef)
 
bool IsValid () const
 
bool IdenticalTo (const FTextFormat &Other, const ETextIdenticalModeFlags CompareModeFlags) const
 
FText GetSourceText () const
 
const FStringGetSourceString () const
 
EExpressionType GetExpressionType () const
 
FTextFormatPatternDefinitionConstRef GetPatternDefinition () const
 
bool ValidatePattern (const FCulturePtr &InCulture, TArray< FString > &OutValidationErrors) const
 
void GetFormatArgumentNames (TArray< FString > &OutArgumentNames) const
 

Static Public Member Functions

static FTextFormat FromString (const FString &InString)
 
static FTextFormat FromString (FString &&InString)
 
static FTextFormat FromString (const FString &InString, FTextFormatPatternDefinitionConstRef InCustomPatternDef)
 
static FTextFormat FromString (FString &&InString, FTextFormatPatternDefinitionConstRef InCustomPatternDef)
 

Private Member Functions

 FTextFormat (FString &&InString, FTextFormatPatternDefinitionConstRef InCustomPatternDef)
 

Private Attributes

TSharedRef< FTextFormatData, ESPMode::ThreadSafeTextFormatData
 

Friends

class FTextFormatter
 

Detailed Description

Cached compiled expression used by the text formatter. The compiled expression will automatically update if the display string is changed, and is safe to be used as a function-level static. See TextFormatter.cpp for the definition.

Definition at line 254 of file Text.h.

Member Enumeration Documentation

◆ EExpressionType

Enumerator
Invalid 

Invalid expression

Simple 

Simple expression, containing no arguments or argument modifiers

Complex 

Complex expression, containing arguments or argument modifiers

Definition at line 259 of file Text.h.

Constructor & Destructor Documentation

◆ FTextFormat() [1/4]

FTextFormat::FTextFormat ( )

Construct an instance using an empty FText.

◆ FTextFormat() [2/4]

FTextFormat::FTextFormat ( const FText & InText)

Construct an instance from an FText. The text will be immediately compiled.

◆ FTextFormat() [3/4]

FTextFormat::FTextFormat ( const FText & InText,
FTextFormatPatternDefinitionConstRef InCustomPatternDef )

Construct an instance from an FText and custom format pattern definition. The text will be immediately compiled.

◆ FTextFormat() [4/4]

FTextFormat::FTextFormat ( FString && InString,
FTextFormatPatternDefinitionConstRef InCustomPatternDef )
private

Construct an instance from an FString. The string will be immediately compiled.

Member Function Documentation

◆ FromString() [1/4]

static FTextFormat FTextFormat::FromString ( const FString & InString)
static

Construct an instance from an FString. The string will be immediately compiled.

◆ FromString() [2/4]

static FTextFormat FTextFormat::FromString ( const FString & InString,
FTextFormatPatternDefinitionConstRef InCustomPatternDef )
static

Construct an instance from an FString and custom format pattern definition. The string will be immediately compiled.

◆ FromString() [3/4]

static FTextFormat FTextFormat::FromString ( FString && InString)
static

◆ FromString() [4/4]

static FTextFormat FTextFormat::FromString ( FString && InString,
FTextFormatPatternDefinitionConstRef InCustomPatternDef )
static

◆ GetExpressionType()

EExpressionType FTextFormat::GetExpressionType ( ) const

Get the type of expression currently compiled.

◆ GetFormatArgumentNames()

void FTextFormat::GetFormatArgumentNames ( TArray< FString > & OutArgumentNames) const

Append the names of any arguments to the given array.

◆ GetPatternDefinition()

FTextFormatPatternDefinitionConstRef FTextFormat::GetPatternDefinition ( ) const

Get the format pattern definition being used.

◆ GetSourceString()

const FString & FTextFormat::GetSourceString ( ) const

Get the source string that we're holding. If we're holding a text then we'll return its internal string.

◆ GetSourceText()

FText FTextFormat::GetSourceText ( ) const

Get the source text that we're holding. If we're holding a string then we'll construct a new text.

◆ IdenticalTo()

bool FTextFormat::IdenticalTo ( const FTextFormat & Other,
const ETextIdenticalModeFlags CompareModeFlags ) const

Check whether this instance is considered identical to the other instance, based on the comparison flags provided.

◆ IsValid()

bool FTextFormat::IsValid ( ) const

Test to see whether this instance contains valid compiled data.

◆ ValidatePattern()

bool FTextFormat::ValidatePattern ( const FCulturePtr & InCulture,
TArray< FString > & OutValidationErrors ) const

Validate the format pattern is valid based on the rules of the given culture (or null to use the current language).

Returns
true if the pattern is valid, or false if not (false may also fill in OutValidationErrors).

Friends And Related Symbol Documentation

◆ FTextFormatter

friend class FTextFormatter
friend

Definition at line 256 of file Text.h.

Member Data Documentation

◆ TextFormatData

TSharedRef<FTextFormatData, ESPMode::ThreadSafe> FTextFormat::TextFormatData
private

Cached compiled expression data

Definition at line 351 of file Text.h.


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