23.18.3 TypeCodeのメソッド
-
CORBA::TypeCode_ptr content_type() const;
このメソッドは,シーケンスまたは配列の要素のTypeCodeを返します。また,エイリアスの型も返します。オブジェクトの種類が,CORBA::tk_sequence,CORBA::tk_array,またはCORBA::tk_aliasのどれでもない場合,BadKind例外が発生します。
-
CORBA::Long default_index() const;
このメソッドは,unionを表すTypeCodeのデフォルトインデックスを返します。このオブジェクトの種類がCORBA::tk_unionでない場合,BadKind例外が発生します。
-
CORBA::TypeCode_ptr discriminator_type() const;
このメソッドは,unionを表すTypeCodeのディスクリミネータ型を返します。このオブジェクトの種類が,CORBA::tk_unionでない場合,BadKind例外が発生します。
-
CORBA::TypeCode_ptr tc) const;
このメソッドは,指定されたTypeCodeとこのオブジェクトを比較します。すべての面で一致する場合,TRUEが返されます。そうでない場合は,FALSEが返されます。
-
tc
このオブジェクトと比較されるオブジェクト
-
-
このメソッドは,このオブジェクトによって表される型のリポジトリIDを返します。その型がリポジトリIDを持たない場合,BadKind例外が発生します。リポジトリIDを持つ型を次に示します。
CORBA::tk_alias CORBA::tk_enum CORBA::tk_except CORBA::tk_objref CORBA::tk_struct CORBA::tk_union
-
このメソッドは,オブジェクトの種類を返します。
-
このメソッドは,このオブジェクトによって表される文字列,シーケンス,配列の長さを返します。オブジェクトの種類がCORBA::tk_string,CORBA::tk_sequence,またはCORBA::tk_arrayのどれでもない場合,BadKind例外が発生します。
-
CORBA::ULong member_count() const;
このメソッドは,このオブジェクトによって表される型のメンバカウントを返します。その型がメンバを持たない場合,BadKind例外が発生します。メンバを持つ型を次に示します。
CORBA::tk_enum CORBA::tk_except CORBA::tk_struct CORBA::tk_union
-
CORBA::ULong index) const;
このメソッドは,unionのTypeCodeオブジェクトから,指定されたインデックスとともにメンバのラベルを返します。このオブジェクトの種類がCORBA::tk_unionでない場合,BadKind例外が発生します。また,インデックスが不当な場合,Bounds例外が発生します。
-
index
型が返されるunionメンバのラベル。インデックスは0から始まります。
-
-
CORBA::ULong index) const;
このメソッドは,このオブジェクトによって表される型から,指定されたインデックスとともにメンバの名前を返します。その型がメンバを持たない場合,BadKind例外が発生します。また,インデックスが不当な場合,Bounds例外が発生します。メンバを持つ型を次に示します。
CORBA::tk_enum CORBA::tk_except CORBA::tk_struct CORBA::tk_union
-
index
名前が返されるメンバのインデックス。インデックスは0から始まります。
-
-
CORBA::TypeCode_ptr member_type(
CORBA::ULong index) const;
このメソッドは,このオブジェクトによって表される型から,指定されたインデックスとともにメンバの型を返します。その型に型を持つメンバがない場合,BadKind例外が発生します。また,インデックスが不当な場合,Bounds例外が発生します。メンバを持つ型を次に示します。
CORBA::tk_except CORBA::tk_union
-
index
型が返されるメンバのインデックス。インデックスは0から始まります。
-
-
このメソッドは,このオブジェクトによって表される型の名前を返します。その型が名前を持たない場合,BadKind例外が発生します。名前を持つ型を次に示します。
CORBA::tk_alias CORBA::tk_enum CORBA::tk_except CORBA::tk_objref CORBA::tk_struct CORBA::tk_union
-
static CORBA::TypeCode_ptr _duplicate(
CORBA::TypeCode_ptr obj);
この静的メソッドは,指定されたTypeCodeを複製します。
-
obj
複製されるオブジェクト
-
-
static CORBA::TypeCode_ptr _nil();
この静的メソッドは,初期化に使用できるNULL TypeCodeポインタを返します。
-
CORBA::TypeCode_ptr obj);
この静的メソッドは,指定されたオブジェクトのリファレンスカウントを減らします。そのカウントが0になると,オブジェクトによって管理されていたすべてのメモリが解放され,そのオブジェクトが削除されます。
-
obj
解放されるオブジェクト
-
-
CORBA::TypeCode_ptr tc) const;
equivalentオペレーションは,ORBが,IDLに格納された値の型等価を決定するときに使用します。
-
tc
このオブジェクトと比較されるオブジェクト
-
-
CORBA::TypeCode_ptr get_compact_typecode() const;
get_compact_codeオペレーションは,すべての任意の指定名フィールドとメンバ名フィールドを削除します。ただし,エイリアスのタイプコードは変更しません。
-
virtual CORBA::Visibility member_visibility(
CORBA::ULong index) const;
このメソッドは,インデックスで識別されるvaluetypeメンバのVisibilityを返します。
-
index
visibilityのインデックス。インデックスは0から始まります。
- 注
-
member_visibilityオペレーションは,valuebox(またはボックス化されたvalue)ではなく,valuetypeのTypeCodeにだけ呼び出されます。
-
-
virtual CORBA::ValueModifier type_modifier() const;
type_modifierオペレーションは,ボックス化されていないvaluetypeのTypeCodeにだけ呼び出されます。このメソッドは,ターゲットTypeCodeが表すvaluetypeに適用されるValueModifierを返します。
-
virtual CORBA::TypeCode_ptr concrete_base_type();
concrete_base_typeオペレーションは,ボックス化されていないvaluetypeのTypeCodeにだけ呼び出されます。ターゲットTypeCodeが表す値がconcreteベースのvaluetypeを持つ場合,このメソッドはconcreteベースのTypeCodeを返します。それ以外の場合,nil TypeCodeリファレンスを返します。