get_message_objT_get_message_objGetMessageObjGetMessageObjget_message_obj (Operator)
Name
get_message_objT_get_message_objGetMessageObjGetMessageObjget_message_obj
— Retrieve an object associated with the key from the message.
Signature
Description
get_message_objget_message_objGetMessageObjGetMessageObjGetMessageObjget_message_obj
retrieves an object associated with the KeyKeyKeyKeykeykey
from the message denoted by the MessageHandleMessageHandleMessageHandleMessageHandlemessageHandlemessage_handle
.
The object has to be previously stored to the message using
set_message_objset_message_objSetMessageObjSetMessageObjSetMessageObjset_message_obj
.
The operator returns the data in the parameter ObjectDataObjectDataObjectDataObjectDataobjectDataobject_data
. The
iconic object is copied by the operation. Therefore, clearing or reusing
the message object afterwards will not have any side-effect on the returned
iconic object, afterwards.
If the given KeyKeyKeyKeykeykey
is not present in the message or if the data
associated with the key is not an object, get_message_objget_message_objGetMessageObjGetMessageObjGetMessageObjget_message_obj
fails.
Presence of keys and information about the data associated with the key can
be verified using get_message_paramget_message_paramGetMessageParamGetMessageParamGetMessageParamget_message_param
.
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
ObjectDataObjectDataObjectDataObjectDataobjectDataobject_data
(output_object) object(-array) →
objectHObjectHObjectHObjectHobject *
Tuple value retrieved from the message.
MessageHandleMessageHandleMessageHandleMessageHandlemessageHandlemessage_handle
(input_control) message →
HMessage, HTupleHHandleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)
Message handle.
Number of elements: MessageHandle == 1
Restriction: MessageHandle != 0
KeyKeyKeyKeykeykey
(input_control) string →
HTupleUnion[str, int]HTupleHtuple (string / integer) (string / int / long) (HString / Hlong) (char* / Hlong)
Key string or integer.
Number of elements: Key == 1
Example (HDevelop)
* ...
get_message_param (Message,'key_exists',['simple_string','foo','my_image'],\
KeysPresence)
get_message_param (Message,'key_data_type',['simple_string','my_image'],\
KeysType)
get_message_obj (Image, Message, 'my_image')
Result
If the operation succeeds, get_message_objget_message_objGetMessageObjGetMessageObjGetMessageObjget_message_obj
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
message or other than object data associated with given key.
Possible Predecessors
dequeue_messagedequeue_messageDequeueMessageDequeueMessageDequeueMessagedequeue_message
Alternatives
get_message_tupleget_message_tupleGetMessageTupleGetMessageTupleGetMessageTupleget_message_tuple
See also
create_messagecreate_messageCreateMessageCreateMessageCreateMessagecreate_message
,
clear_messageclear_messageClearMessageClearMessageClearMessageclear_message
,
set_message_tupleset_message_tupleSetMessageTupleSetMessageTupleSetMessageTupleset_message_tuple
,
get_message_tupleget_message_tupleGetMessageTupleGetMessageTupleGetMessageTupleget_message_tuple
,
set_message_objset_message_objSetMessageObjSetMessageObjSetMessageObjset_message_obj
,
set_message_paramset_message_paramSetMessageParamSetMessageParamSetMessageParamset_message_param
,
get_message_paramget_message_paramGetMessageParamGetMessageParamGetMessageParamget_message_param
,
enqueue_messageenqueue_messageEnqueueMessageEnqueueMessageEnqueueMessageenqueue_message
,
dequeue_messagedequeue_messageDequeueMessageDequeueMessageDequeueMessagedequeue_message
Module
Foundation