Expression Class Reference

Represents expression parser and evaluator. More...

Collaboration diagram for Expression:
Collaboration graph

Public Member Functions

bool Calculate (out object result)
 Calculates the expression. More...
 
bool CalculateForTableRow (int RowIndex, int targetFieldIndex)
 Calculates the expression for the given table row and writes the result to the specified field. More...
 
bool CalculateForTableRow2 (int RowIndex, out object result)
 Calculates the expression for the given table row. More...
 
Function get_SupportedFunction (int functionIndex)
 Gets the specified function from the list of function recognized by the expression parser. More...
 
bool Parse (string expr)
 Parses the specifies string and build an expression out of it. More...
 
bool ParseForTable (string expr, Table tbl)
 Parses expression seeking for fields in the specified table. More...
 

Properties

string LastErrorMessage [get]
 Gets the last error message. More...
 
int LastErrorPosition [get]
 Gets the position of the last error. More...
 
int NumSupportedFunctions [get]
 Gets the number of functions recognized by the expression parser. More...
 
Table Table [get]
 Gets the table associated with the current expression. More...
 

Detailed Description

Represents expression parser and evaluator.

New API 4.9.4:
Added in version 4.9.4

Member Function Documentation

◆ Calculate()

bool Expression.Calculate ( out object  result)

Calculates the expression.

Parameters
resultThe result.
Returns
Result which is of string, double, or boolean type.

◆ CalculateForTableRow()

bool Expression.CalculateForTableRow ( int  RowIndex,
int  targetFieldIndex 
)

Calculates the expression for the given table row and writes the result to the specified field.

Parameters
RowIndexIndex of the row.
targetFieldIndexIndex of the target field.
Returns
True on success.

◆ CalculateForTableRow2()

bool Expression.CalculateForTableRow2 ( int  RowIndex,
out object  result 
)

Calculates the expression for the given table row.

Parameters
RowIndexIndex of the row.
resultThe result of calculation (string, double, or boolean).
Returns
True on success.

◆ get_SupportedFunction()

Function Expression.get_SupportedFunction ( int  functionIndex)

Gets the specified function from the list of function recognized by the expression parser.

Parameters
functionIndexIndex of the function.
Returns
The function object with metadata.

◆ Parse()

bool Expression.Parse ( string  expr)

Parses the specifies string and build an expression out of it.

Parameters
exprThe string with expression.
Returns
True on success.

◆ ParseForTable()

bool Expression.ParseForTable ( string  expr,
Table  tbl 
)

Parses expression seeking for fields in the specified table.

Parameters
exprThe expression to parse.
tblThe table.
Returns
True on success.

Property Documentation

◆ LastErrorMessage

string Expression.LastErrorMessage
get

Gets the last error message.

◆ LastErrorPosition

int Expression.LastErrorPosition
get

Gets the position of the last error.

◆ NumSupportedFunctions

int Expression.NumSupportedFunctions
get

Gets the number of functions recognized by the expression parser.

◆ Table

Table Expression.Table
get

Gets the table associated with the current expression.