主要内容

本页采用了机器翻译。点击此处可查看英文原文。

slreportgen.report.FunctionReference 类

命名空间: slreportgen.report
超类: slreportgen.report.Reporter

MATLAB 函数引用的报告器

自 R2022a 起

描述

使用 slreportgen.report.FunctionReference 类的对象来报告专门用于计算 MATLAB® 模块中的参数的 Simulink® 函数引用。您可以使用 FunctionReference 对象将这些元素添加到您的报告中:

  • 包含有关模型模块如何引用该函数的详细信息的表格

  • 包含有关函数类型信息的节

  • 包含有关定义该函数的 MATLAB 程序文件 (.m) 的信息的节

slreportgen.report.FunctionReference 类是 handle 类。

类属性

HandleCompatible
true

有关类属性的信息,请参阅类属性

创建对象

您没有明确创建 FunctionReference 对象。要创建 FunctionReference 对象,请将 getReporter 方法与 slreportgen.finder.FunctionReferenceResult 类的对象一起使用。

属性

全部展开

要报告的 MATLAB 函数,指定为 slreportgen.finder.FunctionReferenceResult 对象。

属性:

GetAccess
公共
SetAccess
私有

数据类型: slreportgen.finder.FunctionReferenceResult

标签、函数文件路径和函数类型文本的格式化程序,指定为 mlreportgen.dom.Paragraph 对象。如果包含在报告中,此格式化程序将确定所有标签、函数类型文本和函数文件路径的呈现。要自定义这些元素的渲染,请自定义现有的 Paragraph 对象或分配并自定义新的 Paragraph 对象。

注意

如果 FunctionFileDisplayPolicy"code",则此属性仅影响函数代码节的标签。使用 MATLABCodeReporter 属性自定义函数代码的外观。

属性:

GetAccess
公共
SetAccess
公共

数据类型: mlreportgen.dom.Paragraph

是否在报告中包含函数类型,指定为逻辑值 1 (true) 或 0 (false)。

属性:

GetAccess
公共
SetAccess
公共

数据类型: logical

引用表

与引用表相关的属性,其中包含有关引用该函数的模块的信息。

是否在报告中包含引用表,指定为逻辑值 1 (true) 或 0 (false)。

属性:

GetAccess
公共
SetAccess
公共

数据类型: logical

如果报告中含有引用表的标题,则指定为以下值之一:

描述
空的 0x0 字符串默认标题,格式为 <function name> References
字符向量或字符串标量表格的明确标题
mlreportgen.dom.Text 对象Text 对象的 Content 属性的值
mlreportgen.dom.InternalLink 对象InternalLink 对象的 Children 属性中对象内容的串联
mlreportgen.dom.InternalLink 对象ExternalLink 对象的 Children 属性中对象内容的串联

属性:

GetAccess
公共
SetAccess
公共

数据类型: char | string | mlreportgen.dom.Text | mlreportgen.dom.InternalLink | mlreportgen.dom.ExternalLink

如果包含在报告中,则引用表的格式化程序指定为 mlreportgen.report.BaseTable 对象。该属性的默认值是 BaseTable 对象,其 TableStyleName 属性设置为 FunctionReferenceTable 样式,该样式在 FunctionReference 报告器的默认模板中定义。要自定义引用表,请自定义现有的 BaseTable 对象或分配并自定义新的 BaseTable 对象。

属性:

GetAccess
公共
SetAccess
公共

数据类型: mlreportgen.report.BaseTable

程序文件

与定义引用函数的 MATLAB 程序文件 (.m) 的信息的节相关的属性。

是否包含有关 MATLAB 程序文件的信息,指定为逻辑值 1 (true) 或 0 (false)。FunctionFileDisplayPolicy 的值决定要包含有关文件的哪些信息,文件内容还是文件路径。仅对用户定义的函数有效。

属性:

GetAccess
公共
SetAccess
公共

数据类型: logical

确定是否包含 MATLAB 程序文件的内容或路径,指定为以下值之一:

描述
"code"包含 MATLAB 程序文件的内容
"text"包含 MATLAB 程序文件的路径

仅对用户定义的函数有效。

属性:

GetAccess
公共
SetAccess
公共

数据类型: char | string

MATLAB 程序文件代码的格式化程序(如果包含在报告中)指定为 mlreportgen.report.MATLABCode 对象。要自定义报告中代码的格式,请自定义现有的 MATLABCode 对象或分配并自定义新的 MATLABCode 对象。

属性:

GetAccess
公共
SetAccess
公共

数据类型: mlreportgen.report.MATLABCode

方法

全部展开

版本历史记录

在 R2022a 中推出