clibIsReadOnly
説明
例
オブジェクトが const
か nonconst
かを判定
次の C++ ライブラリ MyClass
の MATLAB® インターフェイスがあると仮定します。
const class MyClass { public: int val1; int val2; }; const MyClass& func();
MATLAB で関数 func
を呼び出して MyClass
定数オブジェクトを作成します。
res = clib.MyClass.func()
res = read-only MyClass with properties: val1: 1 val2: 2
オブジェクトが読み取り専用であることを確認します。
clibIsReadOnly(res)
ans = logical 1
関数は logical 1 (true
) を返すため、オブジェクトは読み取り専用です。
入力引数
cppObj
— MATLAB で作成された C++ オブジェクト
ハンドル
MATLAB で作成された C++ オブジェクト。ハンドルとして指定します。
バージョン履歴
R2019b で導入
MATLAB コマンド
次の MATLAB コマンドに対応するリンクがクリックされました。
コマンドを MATLAB コマンド ウィンドウに入力して実行してください。Web ブラウザーは MATLAB コマンドをサポートしていません。
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)