属性
属性
- プロパティは,コンポネント定義の中で,attributeキーワードを使って定義
- 従来の属性定義を拡張
- interface foo { attribute short attr raises (MyEx); //...};
- IDLコンパイラにかけると,以下のメソッドが追加される
- short get_attr() raises (MyEx);
- void set_attr(short attr) raises (MyEx);
-
- コンポネントの属性定義では,setメソッド,getメソッドのそれぞれに別の例外を定義可能
- component Comp entity { attribute short attr get_raises (Ex1) set_raises (Ex2);};
- IDLコンパイラにかけると,以下のメソッドがコンポネントインタフェースに追加される
- short _get_attr () raises (Ex1);
- void _set_attr (short attr) raises (Ex2);