Skip to content

get_dict_paramGetDictParamGetDictParamget_dict_paramT_get_dict_param🔗

説明🔗

get_dict_paramGetDictParamGetDictParamget_dict_paramT_get_dict_param — ディクショナリのパラメータあるいはディクショナリの情報について問い合わせる。

書式🔗

get_dict_param( dict DictHandle, attribute.name GenParamName, string Key, out attribute.value GenParamValue )void GetDictParam( const HTuple& DictHandle, const HTuple& GenParamName, const HTuple& Key, HTuple* GenParamValue )static void HOperatorSet.GetDictParam( HTuple dictHandle, HTuple genParamName, HTuple key, out HTuple genParamValue )def get_dict_param( dict_handle: HHandle, gen_param_name: str, key: MaybeSequence[Union[str, int]] ) -> Sequence[Union[int, float, str]]

def get_dict_param_s( dict_handle: HHandle, gen_param_name: str, key: MaybeSequence[Union[str, int]] ) -> Union[int, float, str]Herror T_get_dict_param( const Htuple DictHandle, const Htuple GenParamName, const Htuple Key, Htuple* GenParamValue )

HTuple HDict::GetDictParam( const HString& GenParamName, const HTuple& Key ) const

HTuple HDict::GetDictParam( const HString& GenParamName, const HString& Key ) const

HTuple HDict::GetDictParam( const char* GenParamName, const char* Key ) const

HTuple HDict::GetDictParam( const wchar_t* GenParamName, const wchar_t* Key ) const (Windows only)

HTuple HDict.GetDictParam( string genParamName, HTuple key )

HTuple HDict.GetDictParam( string genParamName, string key )

説明🔗

get_dict_paramGetDictParam は、ディクショナリのパラメータの現在の値あるいはディクショナリの状態についてのその他の情報を問い合わせます。

get_dict_paramGetDictParam の呼び出しでは、一度に1つのパラメータの値しか問い合わせることができません。 しかしながら、パラメータ / 問い合わせ には、2つのタイプがあります。

  • パラメータ / 問い合わせ はディクショナリ全体に適用できます。 この場合、キーは何も特定されてはならず、パラメータ Keykeykey は空の tuple でなければなりません。

  • パラメータ / 問い合わせ はキーのそれぞれに適用できます。 この場合、パラメータ Keykeykey には空ではないキーのリストが特定されていなければなりません。 このキーは、Keykeykey パラメータで指定されたのと同じ順番で処理されます。

キーに依存しない (グローバルな) パラメータ名:

  • 'keys'"keys": tuple であろうと、オブジェクトデータであろうと、関連付けられたものが何であれ、ディクショナリに格納されたすべてのキーを問い合わせます。 キーのリストは、 GenParamValuegenParamValuegen_param_value を介して、1つの文字列 tuple として出力されます。 この問い合わせのために、パラメータ Keykeykey は空の tuple でなければなりません。

現時点でサポートされている、キーに特有のパラメータ名:

  • 'key_exists'"key_exists": 入力として与えられたキーがディクショナリに格納されている場合、11 を返し、そうでない場合は、00 を返します。 その結果は、キーそれぞれに1つの値ずつ、GenParamValuegenParamValuegen_param_value を介して報告されます。

  • 'key_data_type'"key_data_type": ディクショナリにある tuple データ(get_dict_tupleGetDictTuple を用いて検索ができる)に関連付けられたキーに対して、'tuple'"tuple" を報告します。 オブジェクトデータ(get_dict_objectGetDictObject を用いて検索ができる)に関連付けられたキーに対して、 'object'"object" を報告します。 その結果は、キーそれぞれに1つの値ずつ、GenParamValuegenParamValuegen_param_value を介して報告されます。 このパラメータは、ある特定のキーのデータを取得するために、get_dict_tupleGetDictTuple と get_dict_objectGetDictObject のどちらを用いるのかをダイナミックに決定するのに有用です。

実行情報🔗

実行情報
  • マルチスレッドタイプ: リエントラント(非排他なオペレーターと並列に動作)

  • マルチスレッドスコープ: グローバル(他のスレッドから呼び出される可能性あり)

  • 並列演算処理には未対応

パラメーター🔗

DictHandledictHandledict_handle (input_control) dict → (handle)HTuple (HHandle)HDict, HTuple (IntPtr)HHandleHtuple (handle)

ディクショナリのハンドル.

要素数: DictHandle == 1

GenParamNamegenParamNamegen_param_name (input_control) attribute.name → (string)HTuple (HString)HTuple (string)strHtuple (char*)

ディクショナリのパラメータ名 あるいは 問い合わせ情報

要素数: GenParamName == GenParamValue
初期値: 'keys'"keys"
値のリスト: 'key_data_type', 'key_exists', 'keys'"key_data_type", "key_exists", "keys"

Keykeykey (input_control) string(-array) → (string / integer)HTuple (HString / Hlong)HTuple (string / int / long)MaybeSequence[Union[str, int]]Htuple (char* / Hlong)

パラメータ / 問い合わせ が適用可能な ディクショナリの キー(GenParamName = ‘keys’の場合は空)

初期値: [][]

GenParamValuegenParamValuegen_param_value (output_control) attribute.value(-array) → (string / integer / real)HTuple (HString / Hlong / double)HTuple (string / int / long / double)Sequence[Union[int, float, str]]Htuple (char* / Hlong / double)

ディクショナリのパラメータの値 あるいは 問い合わせ情報

例🔗

(HDevelop)


get_dict_param (Dict, 'keys', [], AllKeys)
get_dict_param (Dict, 'key_data_type', AllKeys, KeysType)

結果🔗

すべてのオペレータパラメータや特有のキーが有効である場合、get_dict_paramGetDictParam は 2 (H_MSG_TRUE) を返します。 そうでない場合は、例外が発生します。

他のオペレーターとの組み合わせ🔗

組み合わせ

前処理の候補

create_dictCreateDict

関連項目

create_dictCreateDict, set_dict_tupleSetDictTuple, get_dict_tupleGetDictTuple, set_dict_objectSetDictObject, get_dict_objectGetDictObject, remove_dict_keyRemoveDictKey

モジュール🔗

Foundation