import AbstractTextMatrix from 'typhonjs-escomplex-commons/src/transform/formats/text/AbstractTextMatrix.js'
AbstractTextMatrix
Direct Subclass:
Indirect Subclass:
Provides the base text format transform for ProjectReport matrix list entries.
Constructor Summary
Public Constructor | ||
public |
constructor(headers: object, keys: object) Initializes instance storing default headers / keys. |
Method Summary
Public Methods | ||
public |
formatReport(report: ClassReport | MethodReport | ModuleReport | ProjectReport, options: object): string Formats a report as plain text. |
|
public |
isSupported(reportType: ReportType): boolean Returns whether a given ReportType is supported by this format transform. |
Private Methods | ||
private |
_formatMatrixList(projectReport: ProjectReport, matrixList: Array<{row: number, cols: number[]}>, options: object): string Returns a string representing the adjacency relationships by printing out the report index followed by
dependent ModuleReport indices / |
|
private |
_formatProject(projectReport: ProjectReport, options: object): string Formats a matrix list stored in a ProjectReport. |
Public Constructors
Public Methods
public formatReport(report: ClassReport | MethodReport | ModuleReport | ProjectReport, options: object): string source
Formats a report as plain text.
Params:
Name | Type | Attribute | Description |
report | ClassReport | MethodReport | ModuleReport | ProjectReport | A report to format. |
|
options | object | (Optional) One or more optional parameters passed to the formatter. |
public isSupported(reportType: ReportType): boolean source
Returns whether a given ReportType is supported by this format transform.
Params:
Name | Type | Attribute | Description |
reportType | ReportType | A given report type. |
Private Methods
private _formatMatrixList(projectReport: ProjectReport, matrixList: Array<{row: number, cols: number[]}>, options: object): string source
Returns a string representing the adjacency relationships by printing out the report index followed by
dependent ModuleReport indices / srcPaths
.
Params:
Name | Type | Attribute | Description |
projectReport | ProjectReport | A project report containing the matrix list. |
|
matrixList | Array<{row: number, cols: number[]}> | The matrix list to be serialized. |
|
options | object | (Optional) An object hash of options. |
private _formatProject(projectReport: ProjectReport, options: object): string source
Formats a matrix list stored in a ProjectReport.
Params:
Name | Type | Attribute | Description |
projectReport | ProjectReport | A project report. |
|
options | object | (Optional) An object hash containing the following entries. |