addAttribute
クラス: coder.make.ToolchainInfo
名前空間: coder.make
Attributes へのカスタム属性の追加
構文
h.addAttribute(Name,Value)
説明
は、指定された名前と値をもつカスタム属性を h.addAttribute(Name,Value)coder.make.ToolchainInfo.Attributes に追加します。この関数で値を指定しなかった場合、属性は true (既定) に初期化されます。
属性はすべてオプションです。属性はツールチェーンのビルド プロセスで使用されます。
入力引数
名前と値の引数
例
属性の追加と値の初期化による既定値のオーバーライド
h.Attribute
ans = # ------------------- # "Attribute" List # ------------------- (empty)
h.addAttribute('TransformPathsWithSpaces',false) h.getAttribute('TransformPathsWithSpaces')
ans =
0既定値をオーバーライドせずに属性を追加
h.addAttribute('CustomAttribute')
h.Attributes
ans = # ------------------- # "Attributes" List # ------------------- CustomAttribute = true
ツールチェーン定義ファイルを使用した属性の追加
MATLAB® Coder™ ビルド プロセスへのカスタム ツールチェーンの追加の例の intel_tc.m ファイルは以下のカスタム属性を定義します。
tc.addAttribute('TransformPathsWithSpaces');
tc.addAttribute('RequiresCommandFile');
tc.addAttribute('RequiresBatchFile');
この例のプロパティ値を MATLAB コマンド ウィンドウに表示するには、次を入力します。
h = intel_tc; h.Attributes
ans = # ------------------- # "Attributes" List # ------------------- RequiresBatchFile = true RequiresCommandFile = true TransformPathsWithSpaces = true
バージョン履歴
R2013a で導入