9.6.  Predefined Part Element Types

Table 9.8. Predefined part types

Part typeDescriptionIcon
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 ” ).

Attributes:
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 unique name of the ps:classalias element represents the class name to be used when creating or referencing to objects implementing this abstract interface.

The values of attribute Value must evaluate to unique names of ps:class elements. The value calculated during evaluation is used to locate the implementation class for the abstract class alias.

For more information and an example see Section 9.5.10, “ ps:classaliasfile ” .

Attributes:
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 with ps:classalias see Section 9.5.10, “ ps:classaliasfile ” .

Attributes:
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.8, “ ps:flagfile ” and Section 9.5.9, “ ps:makefile ” .

Attributes:
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.8, “ ps:flagfile ” and Section 9.5.9, “ ps:makefile ” .

Attributes:
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 attribute fid . Otherwise the result is not considered to be valid. The selection problem Auto Resolver (if activated) tries to satisfy feature selections expected by ps:feature part elements. This functionality does not depend on the use of any specific transformation modules.