C# Class YAMP.Operator

The abstract base class for any operator (unary, binary, ...).
Inheritance: Block, IRegisterElement
Mostrar archivo Open project: FlorianRappl/YAMP Class Usage Examples

Public Methods

Method Description
Create ( ) : Operator

Creates a new instance of the current operator.

Create ( ParseEngine engine ) : Operator

Creates a new instance of the current operator.

Evaluate ( Expression expressions, Value>.IDictionary symbols ) : Value

Begins the evaluation of given expressions.

Operator ( String op ) : System

Creates a new operator given the string for the operator.

Operator ( String op, Int32 level ) : System

Creates a new operator given the string and level for the operator.

RegisterElement ( IElementMapping elementMapping ) : void

Registers the operator at its factory.

ToCode ( ) : String

The code representation of the operator, which is usually just the operator itself.

ToDebug ( int padLeft, int tabsize ) : String

Returns a string to allow visualization of a Expression tree

ToString ( ) : String

Returns the string representation of the operator.

Method Details

Create() public abstract method

Creates a new instance of the current operator.
public abstract Create ( ) : Operator
return Operator

Create() public method

Creates a new instance of the current operator.
public Create ( ParseEngine engine ) : Operator
engine ParseEngine The engine that is used for parsing the query.
return Operator

Evaluate() public abstract method

Begins the evaluation of given expressions.
public abstract Evaluate ( Expression expressions, Value>.IDictionary symbols ) : Value
expressions Expression The expressions to evaluate.
symbols Value>.IDictionary External symbols to consider.
return Value

Operator() public method

Creates a new operator given the string for the operator.
public Operator ( String op ) : System
op String The operator string like +.
return System

Operator() public method

Creates a new operator given the string and level for the operator.
public Operator ( String op, Int32 level ) : System
op String The operator string like +.
level System.Int32 The operator level like 100.
return System

RegisterElement() public method

Registers the operator at its factory.
public RegisterElement ( IElementMapping elementMapping ) : void
elementMapping IElementMapping
return void

ToCode() public method

The code representation of the operator, which is usually just the operator itself.
public ToCode ( ) : String
return String

ToDebug() public method

Returns a string to allow visualization of a Expression tree
public ToDebug ( int padLeft, int tabsize ) : String
padLeft int
tabsize int
return String

ToString() public method

Returns the string representation of the operator.
public ToString ( ) : String
return String