Home Manual Reference Source Test Repository
public class | source

AbstractTextMatrix

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.

Member Summary

Private Members
private
private

_keys: *

Method Summary

Public Methods
public

Formats a report as plain text.

public

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 / srcPaths.

private

_formatProject(projectReport: ProjectReport, options: object): string

Formats a matrix list stored in a ProjectReport.

Public Constructors

public constructor(headers: object, keys: object) source

Initializes instance storing default headers / keys.

Params:

NameTypeAttributeDescription
headers object

An object hash containing the following entries.

keys object

An object hash containing the following entries.

Private Members

private _headers: * source

private _keys: * source

Public Methods

public formatReport(report: ClassReport | MethodReport | ModuleReport | ProjectReport, options: object): string source

Formats a report as plain text.

Params:

NameTypeAttributeDescription
report ClassReport | MethodReport | ModuleReport | ProjectReport

A report to format.

options object

(Optional) One or more optional parameters passed to the formatter.

Return:

string

Return Properties:

NameTypeAttributeDescription
spacing number

(Optional) An integer defining the JSON output spacing.

public isSupported(reportType: ReportType): boolean source

Returns whether a given ReportType is supported by this format transform.

Params:

NameTypeAttributeDescription
reportType ReportType

A given report type.

Return:

boolean

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:

NameTypeAttributeDescription
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.

Return:

string

Return Properties:

NameTypeAttributeDescription
zeroIndex boolean

If true module report indexes are zero indexed.

matrixFilePath boolean

If true the module filePath is serialized.

private _formatProject(projectReport: ProjectReport, options: object): string source

Formats a matrix list stored in a ProjectReport.

Params:

NameTypeAttributeDescription
projectReport ProjectReport

A project report.

options object

(Optional) An object hash containing the following entries.

Return:

string

Return Properties:

NameTypeAttributeDescription
matrixFilePath boolean

If true the module filePath is serialized.

matrixList string

An entry key to lookup a given matrix list in a ProjectReport.

zeroIndex boolean

If true module report indexes are zero indexed.