![]() |
![]() |
![]() |
![]() |
![]() |
The keyword is only used in conjunction with template definition. It denotes the matching mechanism where the incoming field must contain all elements defined in the value list of subset, and may contain others. It is applicable to fields of set of types only.
Related keyword:
superset(value_list) |
value_list is a comma separated list containing all the values that the concerned field must contain. The field may contain elements not included in the list.
Example 1
type set of integer MySetOfType (0 .. 10);
template MySetOfType MyTemplate1 := superset (1, 2, 3);
Matches any sequence of integers which contains at least one occurrences of the numbers 1, 2 and at least one more valid integer value (i.e. between 0 and 10, inclusively), in any order and position.
Example 2
template MySetOfType MyTemplate2_AnyValue := superset (1, 2, ?);
Matches any sequence of integers which contains at least one occurrences of the numbers 1, 2 and at least one more valid integer value.
Example 3
type record of integer RoI;
type set of integer SoI;
template RoI t_RoI1 := {1, 2, ?};
template SoI t_SoI1 := superset(all from t_RoI1);
Results in superset(1, 2, ?) .
BNF definition of superset