Skip to content

Code Generation - Advanced

Activity Code Generation

Generate code for activities?

Default: True

AnsiC class instantiation strategy

  • CreateInstanceAndFunction: The statically allocated instance and accessing function for the current class will be generated
  • CreateStaticInstance: The statically allocated instance for the current class will be generated
  • CreateNothing: Will skip the generation for the statically allocated instance and accessing function for the current class

Default: CreateInstanceAndFunction

Consider define scope

If set will take "private/public" scope of define Attributes into consideration during generation.

(private defines will be generated into the .c file)

Default: No

Generate Directories for Packages

Will generate a sub folder for each sub package of the current package.

Default: No

Generate 'origin of code' comment

If set will generate a //User-supplied code: [UmlType] '[ElementName]', [ElementGuid] for every user-supplied code

(e.g.: OpaqueActions, Behaviors,...)

Default: No

Include Path Delimiter

Delimiter to use for include path generation

Default: /

MISRA Compliance Enabled

Generate redundant statements to maintain MISRA compliance?

Default: True

Multi-Line Comments Template

Template for multi-line comments in generated code.

Default:

/*
 * [comment]
 */

See also

Comments

Position of field comments

Customize where to put the comments of a field (BeforeField, AfterField, AfterFieldIfSingleLine)

Default: `AfterFieldIfSingleLine

Single-Line Comments Template

Template for single-line comments in generated code.

If there is no valid template set, the code generator will automatically use the default value.

Default: /* [comment] */

See also

Comments

State Machine Code Generation

Generate code for state machines?

Default: True

Single Class instance mode

If Yes: Will omit generation of the "me/this" pointer in Class Operations and will access the statically allocated field instead.

Default: No

Single State Machine instance mode

If Yes: Will omit generation of the "stm" pointer in State Machine Operations and will access the statically allocated struct field instead.

Default: No

State Machine Code Generation

Generate code for State Machines?

Default: True

Suppress operation prefix

Suppress operation prefixes for private/public/both operations.

  • None: Generates the operations with the default class prefixes
  • Public: Generates public operations without the class prefix
  • Private: Generates private operations without the class prefix
  • PublicAndPrivate: Generates both public & private operations without the class prefix

Info

This only applies to AnsiC code generation

Default: None

Use Element Alias as Tag Name

Uses the element alias as tag name instead of the automatically generated tag.

Default: No

See also

Struct

User Code storage field

Define if usercode will be stored the Enterprise Architect field:

  • Initial Code
  • Behavior

Default: InitalCode

Write comment before include

Customize where to put the include comment

Default: False