CoreTrace Qt IDE 1.0
The CoreTrace Text editor
 
Loading...
Searching...
No Matches
AuditService Class Reference

Provides functionality to perform audits on files. More...

#include <audit_service.hpp>

Public Member Functions

 AuditService ()
 Constructs an AuditService object.
 
 ~AuditService ()
 
QList< AuditResultperformAudit (const QString &file, const QString &options="")
 Performs an audit on the specified file and returns the results.
 

Private Attributes

CTraceCLI ctraceCLI
 
Parser parser
 
AuditCache auditCache
 
ErrorHighlighter errorHighlighter
 

Detailed Description

Provides functionality to perform audits on files.

The AuditService class interacts with the ctrace CLI to perform audits, parses the results, caches them, and highlights errors in the files.

Constructor & Destructor Documentation

◆ AuditService()

AuditService::AuditService ( )

Constructs an AuditService object.

◆ ~AuditService()

AuditService::~AuditService ( )

Member Function Documentation

◆ performAudit()

QList< AuditResult > AuditService::performAudit ( const QString &  file,
const QString &  options = "" 
)

Performs an audit on the specified file and returns the results.

This method first checks the cache for any previously computed audit results for the given file. If cached results are found, they are returned immediately. Otherwise, the method executes the ctrace CLI tool to perform the audit, parses the results, caches them for future use, and highlights any errors in the file.

Parameters
fileThe path to the file to be audited.
optionsThe options to be used with the ctrace CLI.
Returns
A QList of AuditResult objects containing the audit results.

Member Data Documentation

◆ auditCache

AuditCache AuditService::auditCache
private

◆ ctraceCLI

CTraceCLI AuditService::ctraceCLI
private

◆ errorHighlighter

ErrorHighlighter AuditService::errorHighlighter
private

◆ parser

Parser AuditService::parser
private

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