Main Content

slreportgen.report.FunctionReference class

Package: slreportgen.report
Superclasses: slreportgen.report.Reporter

Reporter for MATLAB function references

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

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

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

Determine whether to include the content or the path of the MATLAB program file, specified as one of these values:

ValueDescription
"code"Include the content of the MATLAB program file
"text"Include the path of the MATLAB program file

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

Methods

expand all

Version History

Introduced in R2022a