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

#include <TextFilterExpressionEvaluator.h>

+ Collaboration diagram for FTextFilterExpressionEvaluator:

Public Member Functions

 FTextFilterExpressionEvaluator (const ETextFilterExpressionEvaluatorMode InMode)
 
 FTextFilterExpressionEvaluator (const FTextFilterExpressionEvaluator &Other)
 
FTextFilterExpressionEvaluatoroperator= (const FTextFilterExpressionEvaluator &Other)
 
virtual ~FTextFilterExpressionEvaluator ()
 
ETextFilterExpressionType GetFilterType () const
 
FText GetFilterText () const
 
bool SetFilterText (const FText &InFilterText)
 
FText GetFilterErrorText () const
 
const TArray< FExpressionToken > & GetFilterExpressionTokens () const
 
bool TestTextFilter (const ITextFilterExpressionContext &InContext) const
 
void AddFunctionTokenCallback (FString InFunctionName, FTokenFunctionHandler InCallback)
 

Protected Member Functions

void SetupGrammar ()
 
virtual void ConstructExpressionParser ()
 
virtual bool EvaluateCompiledExpression (const ExpressionParser::CompileResultType &InCompiledResult, const ITextFilterExpressionContext &InContext, FText *OutErrorText) const
 

Protected Attributes

ETextFilterExpressionEvaluatorMode ExpressionEvaluatorMode
 
ETextFilterExpressionType FilterType
 
FText FilterText
 
FText FilterErrorText
 
TArray< FExpressionTokenExpressionTokens
 
TOptional< ExpressionParser::CompileResultTypeCompiledFilter
 
TOptional< TextFilterExpressionParser::FTextTokenCompiledFilterSingleBasicStringTextToken
 
TMap< FString, FTokenFunctionHandlerTokenFunctionHandlers
 
FTokenDefinitions TokenDefinitions
 
FExpressionGrammar Grammar
 
TOperatorJumpTable< ITextFilterExpressionContextJumpTable
 

Detailed Description

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

Definition at line 197 of file TextFilterExpressionEvaluator.h.

Constructor & Destructor Documentation

◆ FTextFilterExpressionEvaluator() [1/2]

FTextFilterExpressionEvaluator::FTextFilterExpressionEvaluator ( const ETextFilterExpressionEvaluatorMode InMode)

Construction and assignment

◆ FTextFilterExpressionEvaluator() [2/2]

FTextFilterExpressionEvaluator::FTextFilterExpressionEvaluator ( const FTextFilterExpressionEvaluator & Other)

◆ ~FTextFilterExpressionEvaluator()

virtual FTextFilterExpressionEvaluator::~FTextFilterExpressionEvaluator ( )
inlinevirtual

Definition at line 204 of file TextFilterExpressionEvaluator.h.

Member Function Documentation

◆ AddFunctionTokenCallback()

void FTextFilterExpressionEvaluator::AddFunctionTokenCallback ( FString InFunctionName,
FTokenFunctionHandler InCallback )

Helper function to add callbacks for function tokens

◆ ConstructExpressionParser()

virtual void FTextFilterExpressionEvaluator::ConstructExpressionParser ( )
protectedvirtual

Common function to construct the expression parser

◆ EvaluateCompiledExpression()

virtual bool FTextFilterExpressionEvaluator::EvaluateCompiledExpression ( const ExpressionParser::CompileResultType & InCompiledResult,
const ITextFilterExpressionContext & InContext,
FText * OutErrorText ) const
protectedvirtual

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

◆ GetFilterErrorText()

FText FTextFilterExpressionEvaluator::GetFilterErrorText ( ) const

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

◆ GetFilterExpressionTokens()

const TArray< FExpressionToken > & FTextFilterExpressionEvaluator::GetFilterExpressionTokens ( ) const

Get the filter expression tokens created from the current filter text

◆ GetFilterText()

FText FTextFilterExpressionEvaluator::GetFilterText ( ) const

Get the filter terms that we're currently using

◆ GetFilterType()

ETextFilterExpressionType FTextFilterExpressionEvaluator::GetFilterType ( ) const

Get the complexity of the current filter terms

◆ operator=()

FTextFilterExpressionEvaluator & FTextFilterExpressionEvaluator::operator= ( const FTextFilterExpressionEvaluator & Other)

◆ SetFilterText()

bool FTextFilterExpressionEvaluator::SetFilterText ( const FText & InFilterText)

Set the filter terms to be compiled for evaluation later. Returns true if the filter was actually changed

◆ SetupGrammar()

void FTextFilterExpressionEvaluator::SetupGrammar ( )
protected

Sets up grammar used for evaluation

◆ TestTextFilter()

bool FTextFilterExpressionEvaluator::TestTextFilter ( const ITextFilterExpressionContext & InContext) const

Test our compiled filter using the given context

Member Data Documentation

◆ CompiledFilter

TOptional<ExpressionParser::CompileResultType> FTextFilterExpressionEvaluator::CompiledFilter
protected

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

Definition at line 253 of file TextFilterExpressionEvaluator.h.

◆ CompiledFilterSingleBasicStringTextToken

TOptional<TextFilterExpressionParser::FTextToken> FTextFilterExpressionEvaluator::CompiledFilterSingleBasicStringTextToken
protected

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

Definition at line 256 of file TextFilterExpressionEvaluator.h.

◆ ExpressionEvaluatorMode

ETextFilterExpressionEvaluatorMode FTextFilterExpressionEvaluator::ExpressionEvaluatorMode
protected

Defines whether or not the expression parser can evaluate complex expressions

Definition at line 238 of file TextFilterExpressionEvaluator.h.

◆ ExpressionTokens

TArray<FExpressionToken> FTextFilterExpressionEvaluator::ExpressionTokens
protected

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

Definition at line 250 of file TextFilterExpressionEvaluator.h.

◆ FilterErrorText

FText FTextFilterExpressionEvaluator::FilterErrorText
protected

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

Definition at line 247 of file TextFilterExpressionEvaluator.h.

◆ FilterText

FText FTextFilterExpressionEvaluator::FilterText
protected

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

Definition at line 244 of file TextFilterExpressionEvaluator.h.

◆ FilterType

ETextFilterExpressionType FTextFilterExpressionEvaluator::FilterType
protected

The cached complexity of the current filter terms

Definition at line 241 of file TextFilterExpressionEvaluator.h.

◆ Grammar

FExpressionGrammar FTextFilterExpressionEvaluator::Grammar
protected

Definition at line 263 of file TextFilterExpressionEvaluator.h.

◆ JumpTable

TOperatorJumpTable<ITextFilterExpressionContext> FTextFilterExpressionEvaluator::JumpTable
protected

Definition at line 264 of file TextFilterExpressionEvaluator.h.

◆ TokenDefinitions

FTokenDefinitions FTextFilterExpressionEvaluator::TokenDefinitions
protected

Expression parser

Definition at line 262 of file TextFilterExpressionEvaluator.h.

◆ TokenFunctionHandlers

TMap<FString, FTokenFunctionHandler> FTextFilterExpressionEvaluator::TokenFunctionHandlers
protected

Mapping of function names to their callbacks

Definition at line 259 of file TextFilterExpressionEvaluator.h.


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