C# Класс YAMP.BinaryOperator

The abstract base class for any binary operator (+, -, *, ...).
Наследование: Operator
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
BinaryOperator ( String op, Int32 level ) : System

Creates a new binary operator.

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

The implementation of the more general evaluate method.

Handle ( Expression left, Expression right, Value>.IDictionary symbols ) : Value

Handles the evaluation of two expressions.

Perform ( Value left, Value right ) : Value

Performs the operation with the 2 evaluated values.

PerformOverFind ( Value left, Value right, BinaryOperatorMappingList mapping ) : Value

Performs the operation from finding the operator in the mapping.

TryPerformOverFind ( Value left, Value right, BinaryOperatorMappingList mapping, Value &value ) : System.Boolean

Tries to perform the operation from finding the operator in the mapping.

Описание методов

BinaryOperator() публичный Метод

Creates a new binary operator.
public BinaryOperator ( String op, Int32 level ) : System
op String The operator string.
level System.Int32 The operator level.
Результат System

Evaluate() публичный Метод

The implementation of the more general evaluate method.
public Evaluate ( Expression expressions, Value>.IDictionary symbols ) : Value
expressions Expression The array of expressions, binary operators require Length == 2.
symbols Value>.IDictionary The external symbols to consider.
Результат Value

Handle() публичный Метод

Handles the evaluation of two expressions.
public Handle ( Expression left, Expression right, Value>.IDictionary symbols ) : Value
left Expression The expression on the left.
right Expression The expression on the right.
symbols Value>.IDictionary The external symbols to consider.
Результат Value

Perform() публичный абстрактный Метод

Performs the operation with the 2 evaluated values.
public abstract Perform ( Value left, Value right ) : Value
left Value The left value.
right Value The right value.
Результат Value

PerformOverFind() публичный Метод

Performs the operation from finding the operator in the mapping.
public PerformOverFind ( Value left, Value right, BinaryOperatorMappingList mapping ) : Value
left Value
right Value
mapping BinaryOperatorMappingList
Результат Value

TryPerformOverFind() публичный статический Метод

Tries to perform the operation from finding the operator in the mapping.
public static TryPerformOverFind ( Value left, Value right, BinaryOperatorMappingList mapping, Value &value ) : System.Boolean
left Value
right Value
mapping BinaryOperatorMappingList
value Value
Результат System.Boolean