メインコンテンツ

slreportgen.report.EnumerationType.customizeReporter

slreportgen.report.EnumerationType クラスのカスタム サブクラスを作成

R2023b 以降

構文

reporter = slreportgen.report.EnumerationType.customizeReporter(classpath)

説明

reporter = slreportgen.report.EnumerationType.customizeReporter(classpath) は、classpath で指定された場所に、slreportgen.report.EnumerationType のサブクラスである、要素が空のブロック線図クラス定義ファイルを作成します。さらに、customizeReporter メソッドは、既定のレポーター テンプレートを <classpath>/resources/template フォルダーにコピーします。新しいクラス定義ファイルを開始点として使用して、レポート用にカスタムの列挙型クラスを設計できます。

入力引数

すべて展開する

新しいクラス定義ファイルのパスと名前。文字ベクトルまたは string スカラーとして指定します。

説明
slreportgen.report.EnumerationType.customizeReporter("myFolder/MyClass")現在のフォルダーのサブフォルダー myFolderMyClass.m を作成します。
slreportgen.report.EnumerationType.customizeReporter("myFolder/@MyClass")

クラス名の前に @ 文字を付けて、レポーター クラスをクラス フォルダー内に作成します.m 拡張子は指定しないでください。

クラス定義を含むフォルダーを参照してください。

slreportgen.report.EnumerationType.customizeReporter("+myOrg/@MyClass")フォルダー名の前に + 文字を付けて、レポーター クラスをクラス名前空間内に作成します。

メモ

相対パスまたは絶対パスを指定できます。

データ型: string | char

出力引数

すべて展開する

新しいレポーター クラスのパスとファイル名。string スカラーとして返されます。

属性

Statictrue

メソッドの属性の詳細については、メソッドの属性 を参照してください。

すべて展開する

  1. カスタム列挙型レポーターとそれに関連する既定のテンプレートを作成します。指定された、現在の作業フォルダーに対する相対パスに派生クラスのファイルを作成します。この場合、myEnumTypeTable.m クラス ファイルのパスは <current working folder>/newEnumTypeTable/@myEnumTypeTable/myEnumTypeTable.m です。既定のルックアップ テーブル レポーター テンプレートは <current working folder>/newEnumTypeTable/@myEnumTypeTable/resources/templates フォルダーにあります。

    import mlreportgen.report.*
    import slreportgen.report.*
    LookupTable.customizeReporter('newEnumTypeTable/@myEnumTypeTable');
    

  2. この新しいクラス ファイルを編集した後、それを EnumerationType レポーターとして使用できます。

    ettable = myEnumTypeTable();

バージョン履歴

R2023b で導入