RME icon indicating copy to clipboard operation
RME copied to clipboard

[RME] Commands' parameters' types (for validation)

Open acs-l opened this issue 8 years ago • 0 comments

Enumeration of the available commands' parameters' types. These will be used to dynamically validate one command's parameters upon invocation.

Let's call these parameter types domains as they will only be used for identification or validation. Each implementation of a domain should define the following method in order to behave as expected : valid?(val) which returns a boolean stating whether the supplied value (val) is complying with the domain (true) or not (false).

Generics

  • Domain: this domain is defined using a predicate;
  • SetDomain / Enum: explicit set of values which are contained within the domain;
  • RangeDomain: closed interval which is only defined by its lower and upper bound (this kind of domain only applies for numbers or characters);

Specializations

TODO: Specify them all

  • Boolean: {true, false}
  • Opacity : [0, 255]
  • EasingFunction: {:InLinear, :OutLinear, :InOutLinear, :InQuad, :OutQuad, :InOutQuad, :InCubic, :OutCubic, :InOutCubic, :InQuart, :OutQuart...}
  • PositiveInteger : x ∈ ℕ
  • ...

acs-l avatar Feb 12 '18 20:02 acs-l