DelegatedFunction

Defines a delegate to implement a function.

Implements: IFunction

Description

The DelegatedFunction class allows you to define a delegate to implement a function.

Constructors

Constructs this function class with the specified parameters.

DelegatedFunction(name: str, calculator: Callable[[List[Variant], IVariantOperations], Variant])

  • name: str - name of this function.
  • calculator: Callable[[List[Variant], IVariantOperations] - function calculator delegate.

Properties

name

Function’s name.

name(): str

  • retuns: str - function’s name.

Instance methods

calculate

Function’s calculation method.

calculate(params: List[Variant], variant_operations: IVariantOperations): Variant

  • params: List[Variant] - array with function parameters.
  • variant_operations: IVariantOperations - variants operations manager.
  • returns: Variant - returned function’s result.