DelegatedFunction

Defines a delegate to implement a function.

Implements: IFunction

Description

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

FunctionCalculator

Defines a delegate to implement a function

typedef FunctionCalculator = Future<Variant> Function(List<Variant> params, IVariantOperations variantOperations)

Constructors

Constructs this function class with the specified parameters.

DelegatedFunction(String name, FunctionCalculator calculator)

  • name: string - name of this function.
  • calculator: FunctionCalculator - function calculator delegate.

Properties

name

Function’s name. @override

set name(String value)

  • retuns: String - function’s name.

Instance methods

calculate

Function’s calculation method.

@override

Future<Variant> calculate(List<Variant> params, IVariantOperations variantOperations)

  • params: List<Variant> - array with function parameters.
  • variantOperations: IVariantOperations - variants operations manager.
  • returns: Future<Variant> - returned function’s result.