Prev Next

C++/CLI Conventions

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

Stereotypes

Stereotype

Applies To

See also

event

Operation

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

property

Operation, Attribute

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

reference

Class

Description: Corresponds to the 'ref class' or 'ref struct' keyword.

value

Class

Description: Corresponds to the 'value class' or 'value struct' keyword.

Tagged Values

Tag

Applies To

See also

attribute_name

Operation with stereotype property or event

Description: The name of the variable behind this property or event.

generic

Operation

Description: Defines the generic parameters for this Operation.

genericConstraints

Templated Class or Interface, Operation with tag generic

Description: Defines the constraints on the generic parameters for this Operation.

initonly

Attribute

Description: Corresponds to the 'initonly' keyword.

literal

Attribute

Description: Corresponds to the literal keyword.

managedType

Class with stereotype reference, value or enumeration; Interface

Description: Corresponds to either the 'class' or 'struct' keyword.

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