Member attributes: Generator

This attribute controls the code generation for the affected project member.

Syntax

false

true

profile‑name,profile‑name, ...

Discussion

During code generation Embedded Wizard ignores per default all members not used nor referenced within your project. This results in the smallest and fastest code for the target device. This can, however, cause problems, when the affected member is intended to be used in the native code, e.g. within the implementation of a target device interface. In such case, the attribute Generator allows you to explicitly overrides the automatic elimination of the member.

In its simplest version, the Generator attribute expects a boolean value true or false. The value false corresponds to the default behavior resulting in members being eliminated if they are not referenced within the project. The value true, in turn, forces the Code Generator to explicitly incorporate the member when generating code, regardless of whether the member is referenced or not.

The attribute Generator can also be initialized with a list of , (comma) separated profile names. When generating code for a profile matching one of the names in the list, the Code Generator will explicitly incorporate the member, regardless of whether the member is referenced or not.

Modify the attribute

To inspect or modify the value of an Generator attribute, select first the affected member. Thereupon, the attribute is listed in the middle area of Inspector. Please note the available assistant you can activate by clicking on the button right to the attribute. The assistant lists all profiles you can choose individually by clicking on the corresponding checkbox. Deactivating all checkboxes in the assistant results in the attribute being initialized with the value false:

Inherited members

Please note, the Generator attribute can't be modified if the member is inherited from a base class. In case of a member derived as variant from another member, the attribute Generator is not available.