get_dict_paramT_get_dict_paramGetDictParamGetDictParamget_dict_param (Operator)

Name

get_dict_paramT_get_dict_paramGetDictParamGetDictParamget_dict_param — Query dictionary parameters or information about a dictionary.

Signature

get_dict_param( : : DictHandle, GenParamName, Key : GenParamValue)

Herror T_get_dict_param(const Htuple DictHandle, const Htuple GenParamName, const Htuple Key, Htuple* GenParamValue)

void GetDictParam(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)

static void HOperatorSet.GetDictParam(HTuple dictHandle, HTuple genParamName, HTuple key, out HTuple genParamValue)

HTuple HDict.GetDictParam(string genParamName, HTuple key)

HTuple HDict.GetDictParam(string genParamName, string key)

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]

Description

get_dict_paramget_dict_paramGetDictParamGetDictParamGetDictParamget_dict_param queries current values of dictionary parameters or other information about the dictionary status.

With each call of get_dict_paramget_dict_paramGetDictParamGetDictParamGetDictParamget_dict_param, only a single parameter value can be queried. However, there are two types of parameters/queries:

Key-independent (global) parameter names:

'keys'"keys""keys""keys""keys""keys":

Queries all the keys stored in the dictionary, no matter whether they are associated with tuple or object data. The list of keys is reported as a string tuple via GenParamValueGenParamValueGenParamValueGenParamValuegenParamValuegen_param_value. For this query the parameter KeyKeyKeyKeykeykey must be an empty tuple.

Currently supported key-specific parameter names are:

'key_exists'"key_exists""key_exists""key_exists""key_exists""key_exists":

Reports 1 if the given key is stored in the dictionary, 0 otherwise. The results are reported via GenParamValueGenParamValueGenParamValueGenParamValuegenParamValuegen_param_value, one value for each key.

'key_data_type'"key_data_type""key_data_type""key_data_type""key_data_type""key_data_type":

Reports 'tuple'"tuple""tuple""tuple""tuple""tuple" for keys associated with tuple data within the dictionary (the data can be retrieved using get_dict_tupleget_dict_tupleGetDictTupleGetDictTupleGetDictTupleget_dict_tuple). Reports 'object'"object""object""object""object""object" for keys associated with object data (the data can be retrieved using get_dict_objectget_dict_objectGetDictObjectGetDictObjectGetDictObjectget_dict_object). The results are reported via GenParamValueGenParamValueGenParamValueGenParamValuegenParamValuegen_param_value, one value for each key. This parameter is useful to decide dynamically whether to use get_dict_tupleget_dict_tupleGetDictTupleGetDictTupleGetDictTupleget_dict_tuple or get_dict_objectget_dict_objectGetDictObjectGetDictObjectGetDictObjectget_dict_object to get the data of a specific key.

Execution Information

Parameters

DictHandleDictHandleDictHandleDictHandledictHandledict_handle (input_control)  dict HDict, HTupleHHandleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)

Dictionary handle.

Number of elements: DictHandle == 1

GenParamNameGenParamNameGenParamNameGenParamNamegenParamNamegen_param_name (input_control)  attribute.name HTuplestrHTupleHtuple (string) (string) (HString) (char*)

Names of the dictionary parameters or info queries.

Number of elements: GenParamName == GenParamValue

Default value: 'keys' "keys" "keys" "keys" "keys" "keys"

List of values: 'key_data_type'"key_data_type""key_data_type""key_data_type""key_data_type""key_data_type", 'key_exists'"key_exists""key_exists""key_exists""key_exists""key_exists", 'keys'"keys""keys""keys""keys""keys"

KeyKeyKeyKeykeykey (input_control)  string(-array) HTupleMaybeSequence[Union[str, int]]HTupleHtuple (string / integer) (string / int / long) (HString / Hlong) (char* / Hlong)

Dictionary keys the parameter/query should be applied to (empty for GenParamNameGenParamNameGenParamNameGenParamNamegenParamNamegen_param_name = 'keys'"keys""keys""keys""keys""keys").

Default value: []

GenParamValueGenParamValueGenParamValueGenParamValuegenParamValuegen_param_value (output_control)  attribute.value(-array) HTupleSequence[Union[int, float, str]]HTupleHtuple (string / integer / real) (string / int / long / double) (HString / Hlong / double) (char* / Hlong / double)

Values of the dictionary parameters or info queries.

Example (HDevelop)

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

Result

If all the operator parameters, and the specified keys are valid, get_dict_paramget_dict_paramGetDictParamGetDictParamGetDictParamget_dict_param returns TRUE. Otherwise an exception is raised.

Possible Predecessors

create_dictcreate_dictCreateDictCreateDictCreateDictcreate_dict

See also

create_dictcreate_dictCreateDictCreateDictCreateDictcreate_dict, set_dict_tupleset_dict_tupleSetDictTupleSetDictTupleSetDictTupleset_dict_tuple, get_dict_tupleget_dict_tupleGetDictTupleGetDictTupleGetDictTupleget_dict_tuple, set_dict_objectset_dict_objectSetDictObjectSetDictObjectSetDictObjectset_dict_object, get_dict_objectget_dict_objectGetDictObjectGetDictObjectGetDictObjectget_dict_object, remove_dict_keyremove_dict_keyRemoveDictKeyRemoveDictKeyRemoveDictKeyremove_dict_key

Module

Foundation