C API Functions

## udbMetricProject

### Description

Return the metric value for the specified project metric.

### Syntax

     #include "udb/udb.h"
     int  udbMetricProject(UdbMetric metric)

### Arguments

Argument | description
--- | ---
UdbMetric metric | Specified project metric

The project metrics are language-specific and are defined as follows:

Ada Project Metrics | description
--- | ---
Udb_adaProjMetricCountDeclaration | Number of declarations in the project.
Udb_adaProjMetricCountFile | Number of files in the project.
Udb_adaProjMetricCountLibunit | Number of library units in the project.
Udb_adaProjMetricCountLine | Number of lines (code, comments, blank) in the project.
Udb_adaProjMetricCountLineBlank | Number of blank lines in the project.
Udb_adaProjMetricCountLineCode | Number of code lines in the project.Note that code lines which also contain comments will be counted in both LineCode and LineComment.
Udb_adaProjMetricCountLineComment | Number of comment lines in the project.Note that code lines which also contain comments will be counted in both LineCode and LineComment.
Udb_adaProjMetricCountStatement | Number of statements in the project.

C Project Metrics | description
--- | ---
Udb_cProjMetricCountClass | Number of classes in the project.
Udb_cProjMetricCountFile | Number of files in the project.
Udb_cProjMetricCountFunction | Number of functions in the project.
Udb_cProjMetricCountLine | Number of lines (code, comments, blank) in the project.
Udb_cProjMetricCountLineBlank | Number of blank lines in the project.
Udb_cProjMetricCountLineCode | Number of code lines in the project. Note that code lines which also contain comments will be counted in both LineCode and LineComment.
Udb_cProjMetricCountLineComment | Number of comment lines in the project. Note that code lines which also contain comments will be counted.
Udb_cProjMetricRatioCommentCode | Ratio of comment lines to code lines in project.

Fortran Project Metrics | description
--- | ---
Udb_ftnProjMetricCountFile | Number of files in the project.
Udb_ftnProjMetricCountLine | Number of lines (code, comments, blank) in the project.
Udb_ftnProjMetricCountLineBlank | Number of blank lines in the project.
Udb_ftnProjMetricCountLineCode | Number of code lines in the project. Note that code lines which also contain comments will be counted in both LineCode and LineComment.
Udb_ftnProjMetricCountLineComment | Number of comment lines in the project. Note that code lines which also contain comments will be counted.
Udb_ftnProjMetricCountStmtDec | Number of declaration statements in the project.
Udb_ftnProjMetricCountStmtExe | Number of executable statements in the project.
Udb_ftnProjMetricRatioCommentCode | Ratio of comment lines to code lines in project.

### Return Values

Return Value | description
--- | ---
int | Returns the value of the specified metric for the project.

### Example Usage

     numfuncs = udbMetricEntity(entity,
    Udb_cProjMetricCountFunction);

### See Also

udbMetricEntity to get a specified metric of an entity.

udbMetricIsRatio to check if the metric is a ratio.

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