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 Objecteering C++ Developer 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.  Objecteering uses specific modeling techniques for this model annotation.  For information on equivalents, see "Equivalence between C++ source code and the UML model".

 

 

C++ Reverse functioning

The C++ Reverse functions over two stages:

·         The first phase consists of analyzing the C++ source code which is to be reversed.  Once this analysis has been successfully completed, the application is modeled in the form of a tree.  At this stage, nothing is imported into Objecteering.

·         During the second phase, the elements selected by you are reversed in Objecteering.  The selected elements are reversed in the form of a UML model in Objecteering, and the UML elements obtained are annotated in accordance with the C++ development module present in Objecteering.

 

Figure 76. Diagram of C++ Reverse functioning

 

 

Warning

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

 

If two users reverse the same class into two different projecting projects, Objecteering 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.