FTextFilterExpressionEvaluator

Defines an expression evaluator that can be used to perform complex text filter queries

Windows
MacOS
Linux

References

Module

Core

Header

/Engine/Source/Runtime/Core/Public/Misc/TextFilterExpressionEvaluator.h

Include

#include "Misc/TextFilterExpressionEvaluator.h"

Syntax

class FTextFilterExpressionEvaluator

Remarks

Defines an expression evaluator that can be used to perform complex text filter queries

Variables

Name Description

Protected variable

TOptional< Expr...

 

CompiledFilter

The compiled filter created from the current filter text (compiled from FilterText)

Protected variable

TOptional< Text...

 

CompiledFilterSingleBasicStringTextToken

If there is only one token that is basic string it will be stored here to avoid recompile per item compared.

Protected variable

ETextFilterExpr...

 

ExpressionEvaluatorMode

Defines whether or not the expression parser can evaluate complex expressions

Protected variable

TArray< FExpres...

 

ExpressionTokens

The filter expression tokens created from the current filter text (lexed from FilterText)

Protected variable

FText

 

FilterErrorText

The last error returned from lexing or compiling the current filter text

Protected variable

FText

 

FilterText

The the filter terms that we're currently using (compiled into CompiledFilter)

Protected variable

ETextFilterExpr...

 

FilterType

The cached complexity of the current filter terms

Protected variable

FExpressionGram...

 

Grammar

Protected variable

TOperatorJumpTa...

 

JumpTable

Protected variable

FTokenDefinitio...

 

TokenDefinitions

Expression parser

Protected variable

TMap< FString, ...

 

TokenFunctionHandlers

Mapping of function names to their callbacks

Constructors

Name Description

Public function

FTextFilterExpressionEvaluator

(
    const ETextFilterExpressionEvaluato...
)

Construction and assignment

Public function

FTextFilterExpressionEvaluator

(
    const FTextFilterExpressionEvaluato...
)

Destructors

Functions

Name Description

Public function

void

 

AddFunctionTokenCallback

(
    FString InFunctionName,
    FTokenFunctionHandler InCallback
)

Helper function to add callbacks for function tokens

Protected function Virtual

void

 

ConstructExpressionParser()

Common function to construct the expression parser

Protected function Virtual Const

bool

 

EvaluateCompiledExpression

(
    const ExpressionParser::CompileResu...,
    const ITextFilterExpressionContext ...,
    FText* OutErrorText
)

Evaluate the given compiled result, and optionally populate OutErrorText with any error information

Public function Const

FText

 

GetFilterErrorText()

Get the last error returned from lexing or compiling the current filter text

Public function Const

const TArray...

 

GetFilterExpressionTokens()

Get the filter expression tokens created from the current filter text

Public function Const

FText

 

GetFilterText()

Get the filter terms that we're currently using

Public function Const

ETextFilterE...

 

GetFilterType()

Get the complexity of the current filter terms

Public function

bool

 

SetFilterText

(
    const FText& InFilterText
)

Set the filter terms to be compiled for evaluation later.

Protected function

void

 

SetupGrammar()

Sets up grammar used for evaluation

Public function Const

bool

 

TestTextFilter

(
    const ITextFilterExpressionContext ...
)

Test our compiled filter using the given context

Operators

Name Description

Public function

FTextFilterE...

 

operator=

(
    const FTextFilterExpressionEvaluato...
)

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss