Running reverse operations

 

Launching the Reverse command

The first step in the C++ reverse procedure is to run the actual reverse command itself (Figure 77).

 

Figure 77. Launching the "Reverse C++ application" command

 

 

The "C++ Reverse" window

After running the "Reverse C++ application" command, the "C++ Reverse" window then appears.  This window is used to:

·         Select the files to be reversed

·         Select the elements to exclude

·         Define C++ reverse options

 

 

Selecting the files to be reversed

The first window to appear when the "Reverse application" command is launched is used to select the files you wish to reverse (Figure 78).

This window contains three zones:

·         a zone used to select the files and directories that you wish to reverse (the "Files and directories to reverse" zone)

·         a zone used to select any header files and directories you want to include in the reverse (the "Header files and directories to reverse if they are included" zone)

·         a zone in which you can enter include paths, to find libraries used by the application (the "Includes paths" zone)

 

Figure 78. Selecting directories to be reversed

 

Steps:

1.      In the "Files and directories to reverse" zone, click on the  or  icons, according to whether you want to select a directory or an actual file.  The "Browse for folder" (for directory selection) or "Open" window (for file selection) then appears.

2.      In this window, select the directory or file you wish to reverse.

3.      Click on "OK" to confirm.  The selected directory or file is then added to the list in the "Files and directories to reverse" zone.

4.      In the same way, select any header files and directories and include paths in the "Header files and directories to reverse if they are included" and "Includes paths" zones.

5.      Click on "Next" to continue.

 

 

Excluding elements from the reverse

The second "C++ Reverse" window, which appears after you click on "Next" in the first window, is used to select any files, namespaces or classes you want to exclude from the reverse operation you are about to run.

This window contains three zones:

·         a zone used to indicate the files that you do not want to include in the reverse (the "Files to exclude from reverse" zone)

·         a zone used to enter element names you wish to exclude from the reverse (the "Excluded namespaces" zone)

·         a zone used to enter classes that you do not want to include in the reverse, as shown in Figure 79 below (the "Excluded classes" zone)

 

For the "Files to exclude from reverse" zone, the associated icons are the same as those previously described for the first "C++ Reverse" window.

For the "Excluded namespaces" and "Excluded classes" zones, the icons used to manage these zones are as follows:

·         the  icon is used to confirm the addition of the namespace or class you have just entered to the list of excluded namespaces or classes

·         the  icon is used to modify a previously entered namespace or class

·         the  icon is used to delete a namespace or class that figures in the list of excluded namespaces or classes

 

Figure 79. Selecting elements to exclude from the reverse

 

Steps:

1.      If you wish to exclude any files from the reverse, select them here using the associated icons.

2.      If you wish to exclude any namespaces from the reverse, enter them here and use the  icon to confirm.

3.      If you wish to exclude any classes from the reverse, enter them here.

4.      Use the  icon to confirm.

5.      Click on the "Next" button to confirm.

 

 

Defining reverse options

The third and final "C++ Reverse" window, which appears after you click on "Next" in the second window, is used to define the various options used during reverse operations (Figure 80).

 

This window contains four zones:

·         a zone used to indicate the file extensions of the files that are to be reversed (the "File extensions" zone).  Select "cpp" files to reverse a complete application.  ".h" is sufficient to carry out a structural reverse of a library.

·         a zone used to enter macros passed to the pre-processor, before carrying out the reverse (the "Macro definition" zone).  Files are reversed after pre-processing

·         a zone used to select input file extensions from those proposed (the "Input file extensions" zone).  Available input file extensions are "ms-extensions.xml", "ms-extensions-new.xml" and "ms-extensions-old.xml".

·         a zone used to select the granularity of the reverse (the "Granularity" zone).  Available granularities are "Complete", "Complete structure" and "Simple structure".  For further information on granularities, see "Reverse modes".

 

Figure 80. Defining reverse options

 

Steps:

1.      Define the file extensions that are to be used during reverse operations.

2.      Define any macros you wish to use.

3.      Select an input file definition from those available in the dropdown list.

4.      Select a granularity from those available in the dropdown list.

5.      Click on "Reverse" to start the reverse.

 

 

Reverse reports

After the reverse operation has been completed, a window named "Report of the reverse" appears (Figure 81). This window provides you with information on the reverse operation, as well as indicating any errors which were encountered.

 

Figure 81. The "Report of the reverse" window

 

·         Lines simply providing you with information are preceded by the  icon.

·         Warnings are preceded by the  icon.

·         Errors are preceded by the  icon.