23.4.3 DynAnyのメソッド
-
DynamicAny::DynAny_ptr dyn_any);
このメソッドは,指定したDynAnyから,このオブジェクト内の値を初期化します。Anyに含まれる型がこのオブジェクトに含まれる型と一致しなかった場合,TypeMismatch例外が発生します。
-
DynamicAny::DynAny_ptr copy();
このメソッドは,このオブジェクトのコピーを返します。
-
virtual CORBA::ULong component_count();
このメソッドは,DynAnyに格納された複合型コンポーネントの数をunsigned longとして返します。
-
virtual DynamicAny::DynAny_ptr current_component();
このメソッドは,このオブジェクト内のカレントコンポーネントを返します。
-
このメソッドは,このオブジェクトをデストラクトします。
-
const DynamicAny::DynAny_ptr value);
このメソッドは,二つのDynAny値が等しいかどうか比較します。等しい場合はTRUEを,等しくない場合はFALSEを返します。
-
CORBA::Any& value);
このメソッドは,指定したAnyオブジェクトから,このオブジェクトのカレントコンポーネントを初期化します。
Anyに含まれる値のTypeCodeが,このオブジェクトの作成時に定義したTypeCodeと一致しない場合,TypeMismatch例外が発生します。また,渡されたvalueパラメタが不正の場合,InvalidValue例外が発生します。
-
value
このオブジェクトに設定する値を格納するAnyオブジェクト
-
-
このメソッドは,次のコンポーネントがあれば,制御をそこへ進め,TRUEを返します。次のコンポーネントがなければFALSEを返します。
-
このメソッドは,このオブジェクトのカレントコンポーネントを,DynAnyで定義された先頭のコンポーネントに設定します。
オブジェクトにコンポーネントが一つしかなかった場合,このメソッドは何もしません。
-
CORBA::Long index);
このメソッドは,指定したインデックスのコンポーネントをカレントコンポーネントにします。指定したインデックスのコンポーネントがない場合,FALSEを返します。そうでない場合,TRUEを返します。
-
index
目標コンポーネントのインデックス。インデックスは0から始まります。
-
-
virtual CORBA::Any* to_any( );
このメソッドは,DynAnyオブジェクトをAnyオブジェクトに変換し,Anyオブジェクトを指すポインタを返します。
-
このメソッドは,DynAnyが格納する値のTypeCodeを返します。