Text and HTML Reports

## Analysis and Quality Reports Overview

Understand for C++ generates a variety of analysis and quality reports. The reports fall into these categories:

- Cross Reference reports show much the same information as the Reference section in the Info Browser, except that all entities are shown together in alphabetic order. Cross Reference reports include the Data Dictionary, Object, Type, Function, Macro, Include, and Unused entities Cross Reference Reports.
- Structure reports show the structure of the analyzed program(s). Examples include the Invocation Tree Report.
- Quality reports show areas where code might need to be looked at more closely. The Function Complexity Report reports cyclomatic complexity metrics for each function.
- Metrics reports show basic metric information for functions and files such as number of lines of code and comments. Examples include Functions Metrics Report, File Metrics Report, and File Average Metrics Report.

### Augment with the PERL or C API

The reports included with Understand for C++ have evolved over many years to accomodate common customer requests. However, we recognize that not all needs can be covered.

To help you develop custom reports we include both PERL and C interfaces to Understand for C++ databases.

For details on the PERL interface see our web site:
http://www.scitools.com/perl.shtml

For details on the C API see its manual at
http://www.scitools.com/manuals/latest/

Both pages have a number of example programs and scripts.

### Output Formats

Understand for C++ reports are output either to Text or HTML format files. Using Microsoft Windows, the ASCII follows the DOS text file format (carriage return and linefeed after each line). On Unix and VMS Unix text files are created (with a carriage return after each line).

When HTML reports are generated they are stored in HTML 3.0 format files. The generated HTML is not complex, the only HTML 3.0 (over HTML 2.0) feature used is frames.

If you have specified multiple HTML files be generated per report in the Report Configuration dialog, the top of the HTML report will show the index of the report sections by displaying the first character of the entity name in that section. These are also links to those files, so clicking on the desired index entry will take you directly to that page.

### Report File Naming Conventions

File names of reports generated vary based on the type and format of the report generated.

For text files, a single text file containing all selected reports may be generated or separate files for each type of report may be generated. A single text file is named <project_name>.txt. For separate text files, the root of the file name is <project_name> with varying suffixes added to the file name to distinguish the type of report. The following table shows the file names used for each text report.

For HTML files, a single HTML file containing all selected reports may be generated or separate files for each type of report may be generated. HTML files are further broken down into separate files, either alphabetically by entity name or in groups of N number of entities. An index file is also generated and contains links to all the other HTML reports generated. The report index file is named index.html.

The following table shows the file names used for each separate HTML and Text report.

| SEPARATE HTML ReportS | Text Reports
--- | --- | ---
REPORT TYPE | ALPHABETIC (A - Z) | X-NUMBER (0 - n) | SEPARATE
Data Dictionary | dictionary_A.html | dictionary_0.html | project.dic
Object Cross Reference | object_xref_A.html | object_xref_0.html | project.obx
Type Cross Reference | type_xref_A.html | type_xref_0.html | project.tyx
Function Cross Reference | function_xref_A.html | function_xref_0.html | project.pux
Macro Cross Reference | macro_xref_A.html | macro_xref_0.html | project.max
Include File Cross Ref | inc_xref_A.html | inc_xref_0.html | project.inc
Invocation Tree | invocation_A.html | invocation_0.html | project.inv
Function Complexity | funccpx_A.html | funccpx_0.html | project.puc
Function Metrics | funcm_A.html | funcm_0.html | project.pme
File Metrics | filem_A.html | filem_0.html | project.fme
File Average Metrics | fileam_A.html | fileam_0.html | project.fam
Project Metrics | projmr.html | projmr.html | project.jme
Unused Functions | function_unused.html | function_unused.html | project.ufu
Unused Objects | object_unused.html | object_unused.html | project.uob

### Searchable Entity Index

For HTML reports only, there is a single index file containing an alphabetical list of all entities found in all other generated HTML reports. The entities listed in the index have hyper links to the Data Dictionary report for that entity. The entity index file is named entity_index.html and can be accessed from the "index" link on the main HTML page. Following is an example of the entity index.

### Generating Reports from the Command Line

HTML, text, and project metrics reports may be generated with the command line program "repc". Refer to Generating Reports for details on using "repc".

Scientific Toolworks, Inc. http://www.scitools.com Voice: (802) 763-2995 Fax: (802) 763-3066 support@scitools.com sales@scitools.com