Enum member isCallableAsSystem

Detect whether T is callable as a System.

enum isCallableAsSystem(T...) = true;

If T is callable as a System, use System.from to construct a SystemGenerator from the function.

Satisfaction Requirements

  1. T MUST satisfy isCallable.
  2. T MUST return void.
  3. All of T's parameters MUST match one of:
    • Any Basic Data Type, e.g. bool, int, uint, float, double, char, etc.
    • Any array type derived from a Basic Data Type, e.g. int[], float[], string[], etc.
    • Any string type, e.g. string, char[], wchar[], etc.
    • Any struct type
    • World
    • Resources
    • Window or any of its derivations
    • teraflop.platform.input.event.InputEvent or any of its derivations
    • Entity
    • Component or any of its derivations
    • System, or
    • Any user-defined class type
  4. All of T's parameters MUST NOT use the immutable Storage Class.

    Use const instead.

  5. Certain parameters MUST use specific Storage Classes:
  6. struct and Component parameters MAY use the ref Storage Class

See Also