engine
 
载入中...
搜索中...
未找到
Public 类型 | Public 成员函数 | 静态 Public 成员函数 | 友元 | 所有成员列表
FTextFormat类 参考

Cached compiled expression used by the text formatter. 更多...

#include <Text.h>

Public 类型

enum class  EExpressionType { Invalid , Simple , Complex }
 

Public 成员函数

 FTextFormat ()
 Construct an instance using an empty FText.
 
 FTextFormat (const FText &InText)
 Construct an instance from an FText. 更多...
 
 FTextFormat (const FText &InText, FTextFormatPatternDefinitionConstRef InCustomPatternDef)
 Construct an instance from an FText and custom format pattern definition. 更多...
 
EExpressionType GetExpressionType () const
 Get the type of expression currently compiled.
 
void GetFormatArgumentNames (TArray< FString > &OutArgumentNames) const
 Append the names of any arguments to the given array.
 
FTextFormatPatternDefinitionConstRef GetPatternDefinition () const
 Get the format pattern definition being used.
 
const FString & GetSourceString () const
 Get the source string that we're holding. 更多...
 
FText GetSourceText () const
 Get the source text that we're holding. 更多...
 
bool 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.
 
bool IsValid () const
 Test to see whether this instance contains valid compiled data.
 
bool 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). 更多...
 

静态 Public 成员函数

static FTextFormat FromString (const FString &InString)
 Construct an instance from an FString. 更多...
 
static FTextFormat FromString (const FString &InString, FTextFormatPatternDefinitionConstRef InCustomPatternDef)
 Construct an instance from an FString and custom format pattern definition. 更多...
 

友元

class FTextFormatter
 

详细描述

Cached compiled expression used by the text formatter.

The compiled expression will automatically update if the display string is changed. See TextFormatter.cpp for the definition.

成员枚举类型说明

◆ EExpressionType

enum class FTextFormat::EExpressionType
strong
枚举值
Invalid 

Invalid expression

Simple 

Simple expression, containing no arguments or argument modifiers

Complex 

Complex expression, containing arguments or argument modifiers

构造及析构函数说明

◆ FTextFormat() [1/2]

FTextFormat::FTextFormat ( const FText &  InText)

Construct an instance from an FText.

The text will be immediately compiled.

◆ FTextFormat() [2/2]

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

Construct an instance from an FText and custom format pattern definition.

The text will be immediately compiled.

成员函数说明

◆ FromString() [1/2]

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

Construct an instance from an FString.

The string will be immediately compiled.

◆ FromString() [2/2]

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.

◆ 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.

◆ 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).

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

该类的文档由以下文件生成: