Code Generation Option Configuration

C++ Add-In

Code Generation Option Configuration

Top  Previous  Next

Code Generation Option ([Tools] -> [Options...]) is the group of option items for code generation by C++ Add-In. This category includes the [General], [Code Generation], [Editing], and [File Header] sub-categories.

cpp_opt_codegen

General

Option Item

Default

Description

Generate codes even when there is no profile

False

Specifies whether to generate codes even when C++ profile is not loaded in the project (not recommended).

File Generation

Option Item

Default

Description

Header file extension name

.h

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

Implementation file extension name

.cpp

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

Header file subdirectory

Specifies the subdirectory for saving the C++ header file generated. If unspecified, the file is saved in the current directory.

Implementation file subdirectory

Specifies the subdirectory for saving the C++ implementation file generated. If unspecified, the file is saved in the current directory.

Filename format

Same as the model name

Specifies the format for the C++ source file name.

Generate namespace as subdirectory

False

Generates namespace as subdirectory.

Code Generation

Option Item

Default

Description

Generate package as namespace

False

Generates package elements as namespaces.

Use Microsoft Visual C++ grammar

False

Generates code using Microsoft Visual C++ grammar.

.NET Managed C++ support

False

Generates code using .NET Managed C++ grammar.

Member order

Public member first

Determines the code generation order for the members defined in classes and interfaces.

Code Style

Option Item

Default

Description

Insert tabs as spaces

False

Uses space instead of tab for indentation.

Tab width

4

Specifies the number of spaces to be used when inserting tabs as spaces.

Place the opening curly brace in the new line

False

Places the opening curly brace "{" in the new line.

File Header

Option Item

Default

Description

File Header Comments

See description

Adds the comments in the beginning of the source file.

(Default)

//

//

// Generated by StarUML(tm) C++ Add-In

//

// @@ Project : @p

// @@ File Name : @f

// @@ Date : @d

// @@ Author : @a

//

//

Default Include text for header file

Contains the #include text that is included in all header files generated.

Default Include text for implementation file

Contains the #include text that is included in all implementation files

generated.