get_dict_object — 从字典中检索与键关联的对象。
get_dict_object( : Object : DictHandle, Key : )
get_dict_object retrieves an object associated with the Key
from the dictionary denoted by the DictHandle.
The object has to be previously stored to the dictionary using
set_dict_object。
The operator returns the data in the parameter Object. The
iconic object is copied by the operation. Therefore, clearing or reusing
the dictionary object afterwards will not have any side-effect on the
returned iconic object.
If the given Key is not present in the dictionary or if the data
associated with the key is not an object, get_dict_object fails.
Presence of keys and information about the data associated with the key can
be verified using get_dict_param。
Object (输出对象) object(-array) → object
Object value retrieved from the dictionary.
DictHandle (输入控制) dict → (handle)
Dictionary handle.
元素数量: DictHandle == 1
Key (输入控制) string → (string / integer)
Key string.
元素数量: Key == 1
限制:
length(Key) > 0
* ...
get_dict_param (Dict, 'key_exists', ['simple_string','foo','my_image'], \
KeysPresence)
get_dict_param (Dict, 'key_data_type', ['simple_string','my_image'], \
KeysType)
get_dict_object (Image, Dict, 'my_image')
If the operation succeeds, get_dict_object 返回 2 ( H_MSG_TRUE )。否则将抛出异常。 Possible error conditions include
invalid parameters (handle or key), the required key not found in the
dictionary or other than object data associated with given key.
create_dict,
set_dict_tuple,
get_dict_tuple,
set_dict_object,
remove_dict_key,
get_dict_param
基础