NDEVR
API Documentation
CodeStatistics

Scans source files and collects statistics such as line counts, class counts, comment density, indentation metrics, and other code-quality indicators. More...

Collaboration diagram for CodeStatistics:
[legend]

Public Member Functions

void collectInformation (const File &header_file)
 Collects statistics from a single source file.
void collectStatistics ()
 Scans the entire source tree and accumulates all statistics.

Public Attributes

uint04 assert_count = 0
 Total number of assert statements found.
uint04 class_count = 0
 Total number of class declarations found.
uint04 comment_count = 0
 Total number of comment lines found.
uint04 empty_space_count = 0
 Total number of empty or whitespace-only lines.
uint04 execution_line_count = 0
 Total number of executable lines.
String include_folder_name = String("Headers")
 The subdirectory name for header files.
String include_source_name = String("Source")
 The subdirectory name for source files.
uint04 line_count = 0
 Total number of lines scanned.
LogPtr log = nullptr
 Log for status messages.
uint04 max_indentation = 0
 Maximum indentation level encountered.
File max_indentation_file
 The file containing the maximum indentation.
File output_location
 The directory for statistics output.
File source_code_directory
 The root source directory to scan.
uint04 space_count = 0
 Total number of leading space characters found.
uint04 tab_count = 0
 Total number of tab characters found.
uint04 template_count = 0
 Total number of template declarations found.

Detailed Description

Scans source files and collects statistics such as line counts, class counts, comment density, indentation metrics, and other code-quality indicators.

Definition at line 10 of file CodeStatistics.h.

Member Function Documentation

◆ collectInformation()

void CodeStatistics::collectInformation ( const File & header_file)

Collects statistics from a single source file.

Parameters
[in]header_fileThe file to analyze.

The documentation for this class was generated from the following file: