import AbstractReport from 'typhonjs-escomplex-commons/src/module/report/AbstractReport.js'
AbstractReport
Direct Subclass:
Indirect Subclass:
Provides several helper methods to work with method oriented data stored as this.methodAggregate
in ClassReport
/
ModuleReport
and directly in ClassMethodReport
/ ModuleMethodReport
.
Constructor Summary
Public Constructor | ||
public |
constructor(aggregateMethodReport: AggregateMethodReport) If given assigns the method report to an internal variable. |
Member Summary
Public Members | ||
public get |
Returns the associated |
|
public |
Stores any associated |
Method Summary
Public Methods | ||
public |
incrementDistinctHalsteadItems(metric: string, identifier: string) Increments the associated aggregate report HalsteadData for distinct identifiers. |
|
public |
incrementHalsteadItems(metric: string, identifier: string) Increments the associated aggregate report Halstead items including distinct and total counts. |
|
public |
incrementHalsteadMetric(metric: string, type: string) Increments the associated aggregate report Halstead metric type. |
|
public |
incrementParams(count: number) Increments the associated aggregate report parameter count. |
|
public |
isHalsteadMetricDistinct(metric: string, identifier: string): boolean Returns true if a given HalsteadData metric / identifier is not found in the associated aggregate report. |
|
public |
Formats this report given the type. |
Public Constructors
public constructor(aggregateMethodReport: AggregateMethodReport) source
If given assigns the method report to an internal variable. This is used by ClassReport
and ModuleReport
which stores a AggregateMethodReport
respectively in this.methodAggregate
.
Params:
Name | Type | Attribute | Description |
aggregateMethodReport | AggregateMethodReport | An AggregateMethodReport to associate with this report. |
Public Members
public get aggregateMethodReport: AggregateMethodReport: * source
Returns the associated AggregateMethodReport
or this
. Both ClassReport and ModuleReport have an
methodAggregate
AggregateMethodReport.
Public Methods
public incrementDistinctHalsteadItems(metric: string, identifier: string) source
Increments the associated aggregate report HalsteadData for distinct identifiers.
public incrementHalsteadItems(metric: string, identifier: string) source
Increments the associated aggregate report Halstead items including distinct and total counts.
public incrementHalsteadMetric(metric: string, type: string) source
Increments the associated aggregate report Halstead metric type.
public incrementParams(count: number) source
Increments the associated aggregate report parameter count.
Params:
Name | Type | Attribute | Description |
count | number | Value to increase params by. |