Name

criteria, criteria, kPMCriteria — Group of conditions to test.

Synopsis

criteria structure { requires, conditions };
requires : string, choice, default, optional
conditions : array of condition structures, default

Description

Group of conditions to test.

criteria groups conditions with a pass requirement. Through criteria the host's environment can be tested.

While the order of the conditions is maintained by the engine, the order does not affect the order in which conditions are tested. The engine may reorder the conditions at runtime to reduce the computation or time needed to reach the final outcome.

Do not reply on conditions be tested at the time of triggering. The engine may perform conditions at any time.

Fields

requires. Combination of required conditions.

The combination of conditions that must pass or fail for the criteria to be met. conditions is manipulated as an unordered set.

An empty conditions combined with requires resolves to the following:

empty conditions + requires all = criteria passes;
empty conditions + requires at least one = criteria fails;
empty conditions + requires none = criteria passes.

conditions will be sorted by expense before being tested. The engine performs the lowest number of conditions possible to determine the criteria.

If requires is all, the first condition that fails will cause any remaining conditions to be skipped; the criteria has not been met.

If requires is at least one, the first condition that passes will cause any remaining conditions to be skipped; the criteria has been met.

If requires is none, the first condition that passes will cause any remaining conditions to be skipped; the criteria has not been met.

requires is a string. If requires is omitted, the default all is used. requires is optional. requires must be one of the following three constants:

  • all, kPMCriteriaRequires_All.
  • at least one, kPMCriteriaRequires_AtLeastOne.
  • none, kPMCriteriaRequires_None.

conditions. Conditions to test.

The engine will maintain the order of conditions.

conditions is an array of condition structures. If conditions is omitted, a default is created.