Skip to content

set_message_paramSetMessageParamSetMessageParamset_message_paramT_set_message_param🔗

説明🔗

set_message_paramSetMessageParamSetMessageParamset_message_paramT_set_message_param — メッセージパラメーターの設定やメッセージでのコマンドを呼び出す。

書式🔗

set_message_param( message MessageHandle, string GenParamName, string Key, tuple GenParamValue )void SetMessageParam( const HTuple& MessageHandle, const HTuple& GenParamName, const HTuple& Key, const HTuple& GenParamValue )static void HOperatorSet.SetMessageParam( HTuple messageHandle, HTuple genParamName, HTuple key, HTuple genParamValue )def set_message_param( message_handle: HHandle, gen_param_name: str, key: MaybeSequence[Union[str, int]], gen_param_value: MaybeSequence[Union[int, float, str]] ) -> None

Herror T_set_message_param( const Htuple MessageHandle, const Htuple GenParamName, const Htuple Key, const Htuple GenParamValue )

void HMessage::SetMessageParam( const HString& GenParamName, const HTuple& Key, const HTuple& GenParamValue ) const

void HMessage::SetMessageParam( const HString& GenParamName, const HString& Key, const HTuple& GenParamValue ) const

void HMessage::SetMessageParam( const char* GenParamName, const char* Key, const HTuple& GenParamValue ) const

void HMessage::SetMessageParam( const wchar_t* GenParamName, const wchar_t* Key, const HTuple& GenParamValue ) const (Windows only)

void HMessage.SetMessageParam( string genParamName, HTuple key, HTuple genParamValue )

void HMessage.SetMessageParam( string genParamName, string key, HTuple genParamValue )

説明🔗

set_message_paramSetMessageParam は、メッセージパラメーターの設定や メッセージでのアクションコマンドを呼び出します。

set_message_paramSetMessageParam を呼び出すたびに、パラメーターを 1 つだ け設定できます。ただし、パラメーター/コマンドには、次の 2 種類があります。

  • メッセージ全体に適用されるパラメーター/コマンド。この場合、 キーを指定してはいけません。つまり、パラメーター Keykeykey は空 の tuple でなければなりません。

  • 個々のキーに適用されるパラメーター/コマンド。この場合、パラ メーター Keykeykey に、キーの空ではないリストを指定する必要があり ます。キーは、 Keykeykey パラメーター内で指定された順番に処理されます。

キーに依存しないパラメーター名:

  • 'remove_all_keys'"remove_all_keys": 現在メッセージに格納されているすべてのキーを削除し、それらのキー に関連付けられている(制御またはアイコン)データをすべて解放しま す。この操作により、空のメッセージになります。 このパラメーターでは、 GenParamValuegenParamValuegen_param_value の内容は無視されま すが、 Keykeykey は空の tuple でなければなりません。

キー固有のパラメーター名:

  • 'remove_key'"remove_key": Keykeykey パラメーターで指定されたキーを削除し、それらのキー に関連付けられた( tuple またはオブジェクト)データをすべて解放し ます。1つ以上のキーを処理中にエラーが発生した場合(特に、キーが 無効である場合)、オペレーターは、失敗を報告する前に、できるだけ 多くのキーの削除を続行しようとします。 このパラメーターでは、 GenParamValuegenParamValuegen_param_value の内容は無視されます。

実行情報🔗

実行情報
  • マルチスレッドタイプ: リエントラント(非排他なオペレーターと並列に動作)

  • マルチスレッドスコープ: グローバル(他のスレッドから呼び出される可能性あり)

  • 並列演算処理には未対応

このオペレータは以下の入力パラメータの状態を変更します :

このパラメータの値は外部同期なしには複数スレッド間で共有されません。

パラメーター🔗

MessageHandlemessageHandlemessage_handle (input_control, 状態が変更されました) message → (handle)HTuple (HHandle)HMessage, HTuple (IntPtr)HHandleHtuple (handle)

メッセージハンドル

要素数: MessageHandle == 1
制限: MessageHandle != 0

GenParamNamegenParamNamegen_param_name (input_control) string → (string)HTuple (HString)HTuple (string)strHtuple (char*)

メッセージのパラメーターまたはアクションコマンドの名前

要素数: GenParamName == 1
初期値: 'remove_key'"remove_key"
値のリスト: 'remove_all_keys', 'remove_key'"remove_all_keys", "remove_key"

Keykeykey (input_control) string(-array) → (string / integer)HTuple (HString / Hlong)HTuple (string / int / long)MaybeSequence[Union[str, int]]Htuple (char* / Hlong)

パラメーター/コマンドが適用されるメッセージのキー

GenParamValuegenParamValuegen_param_value (input_control) tuple(-array) → (string / integer / real)HTuple (HString / Hlong / double)HTuple (string / int / long / double)MaybeSequence[Union[int, float, str]]Htuple (char* / Hlong / double)

メッセージのパラメーターまたはアクションコマンドの値

例🔗

(HDevelop)


* Remove some keys
set_message_param (Message, 'remove_key', ['my_image', 'simple_string'], [])

結果🔗

オペレーターのパラメーター、その値、および指定されたキーがすべて有 効な場合、 set_message_paramSetMessageParam は 2 (H_MSG_TRUE) を返します。それ以外の 場合には例外が発生します。

他のオペレーターとの組み合わせ🔗

組み合わせ

前処理の候補

dequeue_messageDequeueMessage, create_messageCreateMessage

後処理の候補

enqueue_messageEnqueueMessage, clear_messageClearMessage

関連項目

create_messageCreateMessage, clear_messageClearMessage, set_message_tupleSetMessageTuple, get_message_tupleGetMessageTuple, set_message_objSetMessageObj, get_message_objGetMessageObj, get_message_paramGetMessageParam, enqueue_messageEnqueueMessage, dequeue_messageDequeueMessage

モジュール🔗

Foundation