22.5.2 Contextのメソッド
-
const char *context_name() const;
このメソッドは,コンテキストを示す名前を返します。このオブジェクトが生成された際に名前が提供されないと,NULL値が返されます。
-
const char * name, CORBA::Context_out context);
このメソッドは,このオブジェクトの子Contextを生成します。
-
name
新しいContextオブジェクトの名前
-
context
新しく生成された子Contextに対するリファレンス
-
-
const char *name);
このメソッドは,オブジェクトからプロパティを削除します。
-
name
削除される一つ以上のプロパティの名前。該当するプロパティを削除するために,名前にワイルドカード"*"(アスタリスク)を含めることができます。すべてのプロパティを削除するには,"*"を一つ指定します。
-
-
static CORBA::Context_ptr _duplicate(
CORBA::Context_ptr ctx);
このメソッドは,指定されたオブジェクトを複製します。
-
ctx
複製されるオブジェクト
-
-
const char *start_scope,
CORBA::Flags flag,
const char *name,
CORBA::NVList_out NVList_ptr);
このメソッドは,Contextオブジェクト階層を検索し,nameパラメタで指定された一つ以上の名前・値ペアを取り出します。次に,NVListオブジェクトを生成し,検索した名前・値ペアを配置し,そのオブジェクトに対するリファレンスを返します。
start_scopeパラメタで,検索が開始される最初のコンテキストの名前を指定します。プロパティが見つからない場合,Contextオブジェクト階層での検索は一致するプロパティが見つかるまで,または検索対象となるContextオブジェクトがなくなるまで続きます。
該当するContextが見つからない場合,このメソッドはBAD_CONTEXT例外を発生させます。また,このメソッドは,nameに空の文字列を指定するとBAD_PARAM例外を発生させます。
メモリの確保に失敗した場合は,NO_RESOURCES例外を発生させます。
-
start_scope
検索が開始される最初のContextオブジェクトの名前。CORBA::Context::_nil()と設定した場合,カレントContextから検索が開始されます。
-
flag
検索スコープをカレントContextに限定するには,CORBA::CTX_RESTRICT_SCOPEと指定します。
限定しない場合は,CORBA::CTX_RESTRICT_SCOPE(15)以外の値を指定してください。
-
name
検索の対象となるプロパティ名。ワイルドカード"*"を使って,nameと一致するすべてのプロパティを取り出せます。一致するコンテキスト名が発見できない場合,例外が発生します。
-
NVList_ptr
見つかったプロパティのリストに対するリファレンス
-
-
static CORBA::Context_ptr _nil();
このメソッドは,初期化の際に使用するNULL Context_ptrを返します。
-
このパラメタは,親Contextを指すポインタを返します。親Contextがない場合,NULL値が返されます。
-
CORBA::Context_ptr ctx);
この静的メソッドは,指定されたContextオブジェクトを解放します。オブジェクトのリファレンスカウントが0になると,そのオブジェクトは自動的に削除されます。
-
ctx
解放されるオブジェクト
-
-
const char *name, const CORBA::Any& anAny);
このメソッドは,指定された名前と値を使って,このオブジェクトにプロパティを追加します。
-
name
プロパティの名前
-
anAny
プロパティの値
-
-
CORBA::NVList_ptr _list);
このメソッドは,NVListで指定された名前・値ペアを使って,オブジェクトに一つ以上のプロパティを追加します。このメソッドに対するinパラメタとして使用するためにNVListオブジェクトを生成した場合は,Flagsフィールドに0を設定し,NVListに追加したAnyオブジェクトのTypeCodeにTC_stringを設定する必要があります。NVListクラスの詳細については,「23.14 NVList」を参照してください。
-
_list
このオブジェクトに追加される名前・値ペアのリスト
-