About Microsoft Visual C++ 7.0 code to UML mapping

During reverse engineering, the following code constructs in Visual C++ correspond to UML elements:

Namespace

A C++ Namespace is reverse engineered as a UML package and includes:

  • Name

  • Members

Note: Variables defined outside a class are added to a class with the stereotype <<utility>> within the namespace.

Class

A class in C++ is reverse engineered as a UML class and includes:

  • Name

  • Inherited classes

  • Visibility (public, protected, or private)

  • IsAbstract

  • Member operations

  • Member variables

Note: In C++, class definitions inside functions are not reverse engineered.

Enum

An enumerated type in C++ is reverse engineered as a UML data type with <<enum>> stereotype and includes:

  • Name

  • Visibility (public, protected, or private)

  • IsLeaf

  • Members

Struct

A struct in C++ is reverse engineered as a UML class with <<struct>> stereotype and includes:

  • Name

  • Visibility (public, protected, or private)

  • IsAbstract

  • IsLeaf

  • Base classes

  • Members

Union

A union in C++ is reverse engineered as a UML class with <<union>> stereotype and includes:

  • Name

  • Visibility (public, protected, or private)

  • IsLeaf

  • Members

Member operations

Member operations in C++ are reverse engineered as UML operations and include:

  • Name

  • Visibility (public, protected, or private)

  • Scope (local, static, or shared)

  • IsPolymorphic

  • IsAbstract

  • Operation kind

Operations are flagged according to their type, such as constructor, destructor, operator, or procedure. You can view these flags in the UML model using the Code Generation Options page of the UML Operation Properties dialog box.

  • Return type

  • Parameters

Member variables

Member variables in C++ are reverse engineered as UML attributes and include:

  • Name

  • Type

  • Visibility (public, protected, or private)

  • Scope (local, static, or shared)

  • Changeable (frozen or changeable)

  • Initial value

Method parameters

Method parameters in C++ are reverse engineered as UML parameters and include:

  • Name

  • Type

  • Direction (in, inout, out, or return)

  • Default value

  • Multiplicity

Multiplicity modifiers will be added to the parameter type's suffix. For example:

void Func(int *p)

will be reverse engineered as:

p: int*

Typedef

A typedef in C++ is reverse engineered as a UML class and includes:

  • Name

  • Visibility (public, protected, or private)

  • Binding relationship to base type

Template definitions

Template definitions in C++ are reverse engineered as UML parameterized classes and include:

  • Name

  • Parameters

  • Member variables

  • Member operations

Other C++ code constructs that can be reverse engineered

  • Function specifier: Inline

  • Cv qualifier: Const is reverse engineered for member variables and member functions

  • Conversion-function id: operator conversion-type id

  • Operator-function id: operator operator

C++ code constructs not supported in UML

The following C++ code constructs won't be mapped to UML elements when reverse engineering from Visual Studio. NET to a Microsoft Office Visio UML model diagram.

  • Classes  Class definitions inside functions are not reverse engineered.

  • Declaration specifier  Friend is not reverse engineered.

  • Storage-class specifier  Auto, Register, Extern, Mutable are not reverse engineered.

  • Function specifier  Explicit is not reverse engineered.

  • Using directive  Using namespace is not reverse engineered.

  • Asm definition  Asm is not reverse engineered.

  • Linkage specification  Extern is not reverse engineered.

  • Cv qualifier Volatile is not reverse engineered.

Share Facebook Facebook Twitter Twitter Email Email

Was this information helpful?

Great! Any other feedback?

How can we improve it?

Thank you for your feedback!

×