Code Generation Option Configuration

C++ Add-In

Code Generation Option Configuration

Top  Previous  Next

 

Code Generation Option configuration Screen

This is the screen for configuring the options required for code generation.

cpp_codegen_opt

Generation file Setup

"Generation file setup" defines the file name and path for source file generation.

Item

Description

Header file

Specifies the extension name for C++ header file (e.g. .h).

Implementation file

Specifies the extension name for C++ implementation file (e.g. .cpp).

File name

Specifies the format of the C++ source file name. Four options are available: "same as the model name", "lower case", "upper case", and "lower case with '_' ".

Header file subdirectory

Specifies the subdirectory name for the C++ header file.

Implementation file subdirectory

Specifies the subdirectory name for the C++ implementation file. If unspecified, the current directory is used.

Generate Namespace as subdirectory

Specifies whether to generate namespace as subdirectory.

Code Style

Code Style defines the code style for the C++ code generated.

Item

Description

Insert tab as space

Specifies whether to insert space strings instead of tabs.

Tab width

Specifies the number of spaces for a tab. Effective only if the "Insert tab as space" option is selected.

Place opening curly brace "{" in the new line

Specifies the location of the opening curly brace "{" for code generation.

Code Generation

Code generation configures the general options for source code generation.

Item

Description

Generate package as namespace

Generates package element as C++ namespace. Classes and interfaces included in package are declared in namespace.

Use Microsoft Visual C++ grammar

Generates code using Microsoft's Visual C++ grammar.

Support .NET Managed C++

Generates code using grammar defined in .NET's Managed C++. Effective only when the "Use Microsoft Visual C++ grammar" option is selected.

Member in order

Specifies the code generation order for the members defined in classes and interfaces. Three options are available: "Public member first", "Private member first", and "Unordered".

 

 

cpp_codegen_opt2

 

File Header Comments and Default Include

"File Header Comments and Default Include" defines the comments for each file header and the common include clause for all files.

Item

Description

File Header Comment

Contains the comments to be inserted in the beginning of the source file. As described in the "header comments description" section, the '@' symbol and alphanumeric characters can be used to insert specific values here.

Initial header #includes

Contains the common #include clause for all header files.

Initial implementation #includes

Contains the common #include clause for all implementation files.