Main Content

slreportgen.report.FunctionReference Class

Namespace: slreportgen.report
Superclasses: slreportgen.report.Reporter

Reporter for MATLAB function references

Since R2022a

Description

Use objects of the slreportgen.report.FunctionReference class to report on MATLAB® function references that are specifically used for calculating parameters in Simulink® blocks. You can use a FunctionReference object to add these elements to your report:

  • A table with details about how the function is referenced by model blocks

  • A section with information about the function type

  • A section with information about the MATLAB program file (.m) that defines the function

The slreportgen.report.FunctionReference class is a handle class.

Class Attributes

HandleCompatible
true

For information on class attributes, see Class Attributes.

Creation

You do not create FunctionReference objects explicitly. To create a FunctionReference object, use the getReporter method with an object of the class slreportgen.finder.FunctionReferenceResult.

Properties

expand all

MATLAB function to be reported, specified as an slreportgen.finder.FunctionReferenceResult object.

Attributes:

GetAccess
public
SetAccess
private

Data Types: slreportgen.finder.FunctionReferenceResult

Formatter for labels, function file path, and function type text, specified as an mlreportgen.dom.Paragraph object. This formatter determines the rendering of all labels, function type text, and function file path, if included in the report. To customize the rendering of these elements, customize the existing Paragraph object or assign and customize a new Paragraph object.

Note

If the FunctionFileDisplayPolicy is "code", this property affects only the label of the function code section. Use the MATLABCodeReporter property to customize the appearance of the function code.

Attributes:

GetAccess
public
SetAccess
public

Data Types: mlreportgen.dom.Paragraph

Whether to include the function type in the report, specified as a logical 1 (true) or 0 (false). When you specify:

  • 1 (true) — Include the function type in the report.

  • 0 (false) — Omit the function type in the report.

Attributes:

GetAccess
public
SetAccess
public

Data Types: logical

References Table

Properties related to the references table, which contains information about blocks that reference the function.

Whether to include a references table in the report, specified as a logical 1 (true) or 0 (false). When you specify:

  • 1 (true) — Include a references table in the report.

  • 0 (false) — Omit a references table in the report.

Attributes:

GetAccess
public
SetAccess
public

Data Types: logical

Title of references table, if included in the report, specified as one of the these values:

ValueDescription
empty 0x0 stringThe default title, in the format <function name> References
character vector or string scalarExplicit title of table
mlreportgen.dom.Text objectThe value of the Content property of the Text object
mlreportgen.dom.InternalLink objectConcatenation of the contents of the objects in the Children property of the InternalLink object
mlreportgen.dom.InternalLink objectConcatenation of the contents of the objects in the Children property of the ExternalLink object

Attributes:

GetAccess
public
SetAccess
public

Data Types: char | string | mlreportgen.dom.Text | mlreportgen.dom.InternalLink | mlreportgen.dom.ExternalLink

Formatter of the references table, if included in the report, specified as an mlreportgen.report.BaseTable object. The default value of this property is a BaseTable object with the TableStyleName property set to the FunctionReferenceTable style, which is defined in the default template for a FunctionReference reporter. To customize the references table, customize the existing BaseTable object or assign and customize a new BaseTable object.

Attributes:

GetAccess
public
SetAccess
public

Data Types: mlreportgen.report.BaseTable

Program File

Properties related to the section with information about the MATLAB program file (.m) that defines the referenced function.

Whether to include information about the MATLAB program file, specified as a logical 1 (true) or 0 (false). When you specify:

  • 1 (true) — Include information about the MATLAB program file.

  • 0 (false) — Omit information about the MATLAB program file.

The value of the FunctionFileDisplayPolicy determines which information about the file to include, the file content or the file path. In effect only for user-defined functions.

Attributes:

GetAccess
public
SetAccess
public

Data Types: logical

Whether to include the content or the path of the MATLAB program file, specified as a logical 1 (true) or 0 (false). When you specify:

  • "code" — Include the content of the MATLAB program file.

  • "text" — Include the path of the MATLAB program file.

Note

In effect only for user-defined functions.

Attributes:

GetAccess
public
SetAccess
public

Data Types: char | string

Formatter of MATLAB program file code, if included in the report, specified as an mlreportgen.report.MATLABCode object. To customize the format of the code in the report, customize the existing MATLABCode object or assign and customize a new MATLABCode object.

Attributes:

GetAccess
public
SetAccess
public

Data Types: mlreportgen.report.MATLABCode

Source of the template for this reporter, specified in one of these ways:

  • Character vector or string scalar that specifies the path of the file that contains the template for this reporter

  • Reporter or report whose template this reporter uses or whose template library contains the template for this reporter

  • Document Object Model (DOM) document or document part whose template this reporter uses or whose template library contains the template for this reporter

The specified template must be the same type as the report to which you append this reporter. For example, for a Microsoft® Word report, TemplateSrc must be a Word reporter template. If the TemplateSrc property is empty, this reporter uses the default reporter template for the output type of the report.

Attributes:

GetAccess
public
SetAccess
public
NonCopyable
true
Dependent
true

Name of the template for this reporter, specified as a character vector or string scalar. The template for this reporter must be in the template library of the template specified by the TemplateSrc property of this reporter.

Attributes:

GetAccess
public
SetAccess
public

Data Types: char | string

Hyperlink target for this reporter, specified as a character vector or string scalar that specifies the link target ID, or an mlreportgen.dom.LinkTarget object. A character vector or string scalar value converts to a LinkTarget object. The link target immediately precedes the content of this reporter in the output report.

Attributes:

GetAccess
public
SetAccess
public

Methods

expand all

Version History

Introduced in R2022a