主要内容

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

slreportgen.report.FunctionReference.customizeReporter

类: slreportgen.report.FunctionReference
命名空间: slreportgen.report

创建自定义函数引用报告器类

自 R2022a 起

语法

reporter = slreportgen.report.FunctionReference.customizeReporter(targetFilePath)

说明

reporter = slreportgen.report.FunctionReference.customizeReporter(targetFilePath)targetFilePath 指定的文件夹中新创建的 MATLAB® 程序文件(.m)中定义了 slreportgen.report.FunctionReference 的子类。该方法在 targetFilePath 指定的文件夹中创建或使用现有的 resources/templates 子文件夹,并将 FunctionReference 类的默认模板文件复制到该子文件夹中。使用创建的子类作为创建 FunctionReference 报告器的自定义版本的起点。

输入参数

全部展开

新类定义文件的路径和名称,指定为字符向量或字符串标量。

描述
slreportgen.report.FunctionReference.customizeReporter("myFolder/MyClass")在当前文件夹的子文件夹 myFolder 中创建 MyClass.m
slreportgen.report.FunctionReference.customizeReporter("myFolder/@MyClass")

通过在类名称前面加上 @ 字符来在类文件夹中创建报告器类。不要指定 .m 扩展名。

请参阅包含类定义的文件夹

slreportgen.report.FunctionReference.customizeReporter("+myOrg/@MyClass")通过在文件夹名称前面加上 + 字符,在类命名空间中创建报告器类。

注意

您可以指定相对路径或绝对路径。

数据类型: string | char

输出参量

全部展开

新报告器类的路径和文件名,以字符串标量的形式返回。

版本历史记录

在 R2022a 中推出