get_dict_tupleT_get_dict_tupleGetDictTupleGetDictTuple (Operator)


get_dict_tupleT_get_dict_tupleGetDictTupleGetDictTuple — Retrieve a tuple associated with the key from the dictionary.


get_dict_tuple( : : DictHandle, Key : Tuple)

Herror T_get_dict_tuple(const Htuple DictHandle, const Htuple Key, Htuple* Tuple)

void GetDictTuple(const HTuple& DictHandle, const HTuple& Key, HTuple* Tuple)

HTuple HDict::GetDictTuple(const HTuple& Key) const

HTuple HDict::GetDictTuple(const HString& Key) const

HTuple HDict::GetDictTuple(const char* Key) const

HTuple HDict::GetDictTuple(const wchar_t* Key) const   (Windows only)

static void HOperatorSet.GetDictTuple(HTuple dictHandle, HTuple key, out HTuple tuple)

HTuple HDict.GetDictTuple(HTuple key)

HTuple HDict.GetDictTuple(string key)


get_dict_tupleget_dict_tupleGetDictTupleGetDictTupleGetDictTuple retrieves a tuple associated with the KeyKeyKeyKeykey from the dictionary denoted by the DictHandleDictHandleDictHandleDictHandledictHandle. The tuple has to be previously stored to the dictionary using set_dict_tupleset_dict_tupleSetDictTupleSetDictTupleSetDictTuple.

The operator returns the data in the parameter TupleTupleTupleTupletuple. The data including strings is copied by the operation, the dictionary can thus be immediately reused.

If the given KeyKeyKeyKeykey is not present in the dictionary or if the data associated with the key is not a tuple, get_dict_tupleget_dict_tupleGetDictTupleGetDictTupleGetDictTuple fails. Presence of keys and information about the data associated with the key can be verified using get_dict_paramget_dict_paramGetDictParamGetDictParamGetDictParam.

Execution Information


DictHandleDictHandleDictHandleDictHandledictHandle (input_control)  dict HDict, HTupleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)

Dictionary handle.

Number of elements: DictHandle == 1

KeyKeyKeyKeykey (input_control)  string HTupleHTupleHtuple (string / integer) (string / int / long) (HString / Hlong) (char* / Hlong)

Key string.

Number of elements: Key == 1

Restriction: length(Key) > 0

TupleTupleTupleTupletuple (output_control)  tuple(-array) HTupleHTupleHtuple (string / integer / real) (string / int / long / double) (HString / Hlong / double) (char* / Hlong / double)

Tuple value retrieved from the dictionary.

Example (HDevelop)

* ...
get_dict_param (Dict, 'key_exists', ['simple_string','foo','my_image'], \
get_dict_param (Dict, 'key_data_type', ['simple_string','my_image'], \
get_dict_tuple (Dict, 'simple_string', TupleString)


If the operation succeeds, get_dict_tupleget_dict_tupleGetDictTupleGetDictTupleGetDictTuple returns 2 (H_MSG_TRUE). Otherwise an exception is raised. Possible error conditions include invalid parameters (handle or key), the required key not found in the dictionary, or other than tuple data associated with given key.

Possible Predecessors




See also

create_dictcreate_dictCreateDictCreateDictCreateDict, set_dict_tupleset_dict_tupleSetDictTupleSetDictTupleSetDictTuple, set_dict_objectset_dict_objectSetDictObjectSetDictObjectSetDictObject, get_dict_objectget_dict_objectGetDictObjectGetDictObjectGetDictObject, remove_dict_keyremove_dict_keyRemoveDictKeyRemoveDictKeyRemoveDictKey, get_dict_paramget_dict_paramGetDictParamGetDictParamGetDictParam