Table 9.6. Predefined part types
Part type | Description | Icon |
---|---|---|
ps:class | Maps directly to a class in an object-oriented programming language. |
![]() |
ps:classalias | Different classes may be mapped to a single class name. Value restrictions must ensure that in every possible configuration only one class is assigned to the alias. |
![]() |
ps:object | Maps directly to an object in an object-oriented programming language. |
![]() |
ps:variable | Describes a configuration variable name, usually evaluated in make files. The variable can have a value assigned. |
![]() |
ps:flag |
A synonym for
ps:variable
.
This part type maps to a source code flag . A flag can be undefined
or can have an
associated value that is calculated at configuration time.ps:flag
is usually used in conjunction with the flagfile
source element, which generates a C++-preprocessor#define
<flagName> <flagValue>
statement in the specified
file. |
![]() |
ps:project | ps:project can be used as the part type for anything that does not fit into other part types. |
![]() |
ps:aspect | Maps directly to an aspect in an aspect-oriented language (e.g. AspectJ or AspectC++). |
![]() |
ps:feature | Maps directly to a feature in a Feature Model. |
![]() |
ps:value | General abstraction of a value. |
![]() |
ps:method | Maps directly to a method of a class in an object-oriented programming language. |
![]() |
ps:function | Describes the declaration of a function. |
![]() |
ps:functionimpl | Describes the implementation of a function. |
![]() |
ps:operator | Maps directly to a programming language operator or operator function. |
![]() |
ps:link | General abstraction for a link. This could be for instance a www link or file system link. |
![]() |
The following sections provide detailed descriptions of the family model part element types that are relevant for the standard transformation (see Section 6.3.2, “ Standard Transformation ” ).
class
[ps:class]
|
Value
[ps:string]
|
A class alias is an abstract place holder for variant specific type
instantiations. It
allows to use concepts similar to interface inheritance with virtual
methods in C++
without any overhead. The corresponding source element
ps:classaliasfile
can
be used to generate the required C++ code.
The class or class alias to be aliased can be either referenced by
the attribute class
or the attribute Value
.
Using attribute class
the class or class alias
element is directly referenced. The referenced element has to be of part typeps:class
or ps:classalias
.
Alternatively, using the attribute Value
the class or class alias
element can be referenced by its unique name.
For more information and an example see Section 9.5.8, “ ps:classaliasfile ” .
classname?
[ps:string]
|
A class represents a class in the architecture. It can be used in
conjunction with
ps:classalias
.
The value of the optional attribute
classname
represents the fully
qualified name of the class (e.g. std::string
)
to be used when
generating code using the standard transformation. Otherwise the unique name
of the
element is used for this purpose.
For more information and an example on using
ps:class
together
withps:classalias
see
Section 9.5.8, “
ps:classaliasfile
”
.
Value
[ps:string]
|
A flag represents any kind of named value, e.g. a C/C++
preprocessor constant. For the
standard transformation the value of attribute
Value
is evaluated by
ps:flagfile
resp.
ps:makefile
source elements to generate C/C++ specific preprocessor
definitions resp.make
file variables.
For more information about the
ps:flagfile
and
ps:makefile
source element types see
Section 9.5.6, “
ps:flagfile
”
and
Section 9.5.7, “
ps:makefile
”
.
Value
[ps:string]
|
A variable represents any kind of named value, e.g. a
make
file
or programming language variable. For the standard transformation the
value of attribute
Value
is evaluated by
ps:flagfile
resp.
ps:makefile
source elements to generate C/C++
specific preprocessor definitions resp.make
file variables.
For more information about the
ps:flagfile
and
ps:makefile
source element types see
Section 9.5.6, “
ps:flagfile
”
and
Section 9.5.7, “
ps:makefile
”
.
fid
[ps:feature]
|
This special part type is used to define features which have to be
present if the part
element is selected. If pure::variants detects a selected part of type
ps:feature
, the current feature selection must contain the
feature with the id given as value of the attributefid
. Otherwise the
result is not considered to be valid. The evaluation
tries to satisfy feature selections expected by
ps:feature
part elements. This functionality does not depend on the use of
any specific transformation modules.
This type is deprecated since pure::variants version 7.0.0. Please contact pure::variants team for replacement options.