Skip to content

get_dict_paramGetDictParamGetDictParamget_dict_paramT_get_dict_param🔗

Short description🔗

get_dict_paramGetDictParamGetDictParamget_dict_paramT_get_dict_param — Query dictionary parameters or information about a dictionary.

Signature🔗

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 )

Description🔗

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

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

  • Parameters/queries applicable to the entire dictionary. In this case no keys must be specified, the parameter Keykeykey must be an empty tuple.

  • Parameters/queries applicable to the individual keys. In this case a list of keys must be specified in the parameter Keykeykey. The keys are processed in the same order as specified in the Keykeykey parameter.

Key-independent (global) parameter names:

  • '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 GenParamValuegenParamValuegen_param_value. For this query the parameter Keykeykey must be an empty tuple.

Currently supported key-specific parameter names are:

Execution information🔗

Execution information
  • Multithreading type: reentrant (runs in parallel with non-exclusive operators).

  • Multithreading scope: global (may be called from any thread).

  • Processed without parallelization.

Parameters🔗

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

Dictionary handle.

Number of elements: DictHandle == 1

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

Names of the dictionary parameters or info queries.

Number of elements: GenParamName == GenParamValue
Default: 'keys'"keys"
List of values: '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)

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

Default: [][]

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)

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_paramGetDictParam returns 2 (H_MSG_TRUE). Otherwise an exception is raised.

Combinations with other operators🔗

Combinations

Possible predecessors

create_dictCreateDict

See also

create_dictCreateDict, set_dict_tupleSetDictTuple, get_dict_tupleGetDictTuple, set_dict_objectSetDictObject, get_dict_objectGetDictObject, remove_dict_keyRemoveDictKey

Module🔗

Foundation