Download pure::variants User`s Guide

Transcript
Supported Functions
Function
Description
Example: Access the attribute X of the same element in a calculation:
getContext(EID), getAttribute(EID,'X',XValue)
getVariantContext(VCID,VCN)
getVariantContextId(VCID)
getVariantContextName(VCN)
isVariant(VN)
These methods are used to get the ID and name of the current variant context
element. This element marks a context change in the evaluation of a model
that links other models. Each linked model is evaluated in its own unique
context.
True if the currently evaluated variants unique id or name (VDM name, set
in model properties) equals VN.
Example usage in a restriction:
isVariant('MyVariant')
Example usage in a calculation getting the variants unique id:
isVariant(Value)
getVariantId(MID)
getModelList(MIDL)
is unified with the unique id of the VDM (.vdm) currently being evaluated.
MID
MIDL is unified with the list of all models currently being evaluated. This gives
access to ids of the Feature Models, Family Models and VDMs in the current
configuration space
getElementModel(EID,MID)
MID
EID
is bound to the model id associated with the unique element id
is not given, the context element is used as EID.
EID.
If
getElementModel(MID)
getElementChil\
dren(EID,CEIDS)
is unified with the list of children of the element specified with EID or
an empty list if no children exist.
CEIDS
is unified with the list of parents of the element specified by EID or
an empty list if no parents exist.
getElementPar\
ents(EID,PARIDS)
PARIDS
getElementRoot(EID,ROOTID)
ROOTID
is the root element for the element specified by
with several root elements only one is chosen.
EID.
For elements
getElementName(EID,ENAME)
ENAME
is unified with the unique name of the element specified with EID.
getElementVisible\
Name(EID,ENAME)
ENAME
is unified with the visible name of the element specified with EID.
getElementClass(EID,ECLASS)
ECLASS is unified with the type model element class of the element specified
with EID. The standard meta model uses the classes ps:feature, ps:component,
ps:part and ps:source.
getElementType(EID,ETYPE)
getMatchingElements
(MatchExpr,MEIDS)
getMatchingElements
(CTXID,MatchExpr,MEIDS)
ETYPE is unified
with EID.
with the type model element type of the element specified
is unified with a list of all the elements which comply with the specified match expression MatchExpr. The context of the match expression is the
current element context (see getContext) unless CTXID is used to specify a
different context.
MEIDS
Match expressions are explained below.
Example: Put all features below the current element with unique names starting with FEA_X in a list:
getMatchingElements('**.FEA_X*',LIST)
getMatchingAttributes
(MatchExpr,EID,AIDS)
AIDS is unified with all attributes of the element specified with the unique
id EID which match with the pattern in MatchExpr. The match pattern is the
same as for getMatchingElements, but it must not contain dot characters.
131