Book a Demo

Please note : This help page is not for the latest version of Enterprise Architect. The latest help can be found here.

Prev Next

C++ Options - Model

If you intend to generate C++ code from your model, you can configure the model-specific code generation options using the 'C++ Specifications' page of the 'Manage Model Options' dialog to:

  • Indicate the version of C++ to generate; this controls the set of templates used and how properties are created
  • Specify the default reference type used when a type is specified by reference
  • Specify the default file extensions
  • Specify default Get/Set prefixes
  • Specify the Collection Class definitions for Association connectors
  • Define additional Collection Classes - to define custom Collection Classes, which can be simple substitutions (such as CArray<#TYPE#>) or a mix of other strings and substitutions (such as Cmap<CString,LPCTSTR,#TYPE#*,#TYPE#*>); these Collection Classes are defined by default:
         -  CArray<#TYPE#>;CMap<CString,LPCTSTR,#TYPE#*,#TYPE#*>;
  • Set the StateMachine Engineering options

Access

Ribbon

Settings > Model > Options > Source Code Engineering > C++

Options

Option

Action

See also

Options for the current model

In the value fields, specify the options that affect all users of the current model:

  • The version of C++ you are using (which determines which templates to use when generating code)
  • The default reference type to use when creating properties for C++ attributes by reference
  • The default header and source file extensions for the code files
  • The default 'Get' prefix
  • The default 'Set' prefix
  • The additional Collection Classes

StateMachine Engineering Options

In the value fields, use the drop-down arrows to set the options to True or False; these options apply to generating code from StateMachine models in the current model only:

  • 'Use the new StateMachine Template' - set to True to use the code generation templates from Enterprise Architect Release 11 and later, set to False to apply the EASL Legacy templates
  • 'Generate Trace Code' - set to True to generate Trace code, False to omit it
Legacy StateMachine Templates

Collection Classes

Click on this button to open the 'Collection Classes for Association Roles' dialog, through which you specify the Collection Class definitions for Association connectors.

Set Collection Classes

Notes

  • These options affect all users of the current model; however, they do not apply to other models

Learn more