Overview of C++ Reverse

Introduction

Reversing an application or a part of an application is the operation that consists of creating a project that represents the application.

However, the reverse operation is not defined or scarcely defined for certain code constructions, either because they are not directly in tune with the UML norm, because they are truly specific to C++ or simply because they are not recommended for an object-oriented approach.  This introduces some restrictions in the reverse tool’s ability to retrieve some parts of the code in the project.

The Modelio C++ Reverser reverse function is used to build a UML model from C++ source code. This UML model creation based on C++ code is carried out over several stages.  Each of these stages will be presented and explained in this chapter.

The C++ code is transformed into a UML model annotated by a set of notes and tagged values from C++ Designer.  Modelio uses specific modeling techniques for this model annotation.  For information on equivalents, see “Equivalence between C++ source code and the UML model”.

Modelio C++ Reverser is a specific module that depends on the C++ Designer module and that must be deployed before performing any reverse operation.

C++ Reverse functioning

The C++ Reverse functions over two stages:


Diagram of C++ Reverse functioning

Warning

A class reversed into a project receives an identifier just like an object created in the Modelio browser or graphic editor.

If two users reverse the same class into two different projecting projects, Modelio will consider them as two different objects.

To avoid losing the links towards the reversed classes during the import, it is necessary to run the reverse in a reference modeling project from which each user imports the used classes.