C++/CLI Conventions

The following conventions are used for modeling C++/CLI extensions to C++. In order to set Enterprise Architect to generate managed C++/CLI you must modify the C++ version in the C++ Options.

Reference

Stereotypes

Stereotype

Applies To

Description

event

Operation

Defines an event to provide access to the event handler for this Class.

property

Operation, Attribute

This is a property possibly containing both read and write code.

reference

Class

Corresponds to the ref class or ref struct keyword.

value

Class

Corresponds to the value class or value struct keyword.

 
Tagged Values

Tag

Applies To

Description

attribute_name

Operation with stereotype property or event

The name of the variable behind this property or event.

generic

Operation

Defines the generic parameters for this Operation.

genericConstraints

Templated Class or Interface, Operation with tag generic

Defines the constraints on the generic parameters for this Operation.

initonly

Attribute

Corresponds to the initonly keyword.

literal

Attribute

Corresponds to the literal keyword.

managedType

Class with stereotype reference, value or enumeration; Interface

Corresponds to either the class or struct keyword.

Topics

Topic

Detail

See also

Other Conventions

The typedef and anonymous tags are not used
The property get/property set stereotypes are not used
The Pure property of an operation corresponds to the keyword abstract

 

 

Learn more