Download pure::variants Eclipse Plug-in User`s Guide
Transcript
Family Model Element Relations
Rule2
hasFeature('FoosBar')
This is a logical or of two statements. The element will be included if either feature BarFoos is not in the feature selection or FoosBar is in it.
It is also possible to merge both rules into one by using the or keyword.
Rule 1 or Rule 2
not(hasFeature('BarFoos')) or hasFeature('FoosBar')
Family Model Element Relations
As for features, each element (component, part, and source element) may have relations to
other elements. The supported relations are shown in Table 6.9, “ Supported Element Relations only supported in CCFM ”.
When a configuration is checked, the configuration may be regarded as invalid if any relations are not satisfied.
Example using ps:exclusiveProvider/ps:requestsProvider
relations
In the example below, the “Cosine” class element is given an additional requestsProvider
relation to require that a cosine implementation must be present for a configuration to be
valid. Relation statements are used in two different cosine implementations either of which
could be used in some feature configurations (feature FixedTime and feature Equidistant),
but which cannot both be (ps:ExclusiveProvider) in the resulting system.
ps:class("Cosine")
Restriction: hasFeature('Cosine')
Relation:
ps:requestsProvider = 'Cosine'
ps:file(dir = src, file = cosine_1.cc, type = impl):
Restriction: hasFeature('FixedTime')
Relation:
ps:exclusiveProvider = 'Cosine'
ps:file(dir = src, file = cosine_2.cc, type = impl):
Restriction: hasFeature('FixedTime')
and hasFeature('Equidistant')
Relation:
ps:exclusiveProvider = 'Cosine'
19