integer_to_handleT_integer_to_handleIntegerToHandleIntegerToHandleinteger_to_handle (算子)

名称

integer_to_handleT_integer_to_handleIntegerToHandleIntegerToHandleinteger_to_handle — 将整数转换为句柄。

警告

It is not recommended to use this operator in HDevelop. This operator is only provided for reasons of backward compatibility.

签名

integer_to_handle( : : IntegerHandle : Handle)

Herror T_integer_to_handle(const Htuple IntegerHandle, Htuple* Handle)

void IntegerToHandle(const HTuple& IntegerHandle, HTuple* Handle)

static void HOperatorSet.IntegerToHandle(HTuple integerHandle, out HTuple handle)

def integer_to_handle(integer_handle: MaybeSequence[int]) -> Sequence[HHandle]

def integer_to_handle_s(integer_handle: MaybeSequence[int]) -> HHandle

描述

integer_to_handleinteger_to_handleIntegerToHandleIntegerToHandleIntegerToHandleinteger_to_handle converts the integer IntegerHandleIntegerHandleIntegerHandleIntegerHandleintegerHandleinteger_handle, that represents a handle, to a handle of type HANDLE_PAR and returns it in HandleHandleHandleHandlehandlehandle. This allows to convert handles created in code parts where the legacy handle mode is enabled into proper handles.

If the legacy handle mode is disabled (the default), the ownership of the handle is transferred onto the handle. In this case, the handle will automatically be cleared once all references to that handle, such as in the tuple HandleHandleHandleHandlehandlehandle, are overwritten. In that case, if the original IntegerHandleIntegerHandleIntegerHandleIntegerHandleintegerHandleinteger_handle should continue to be used, a reference to the returned HandleHandleHandleHandlehandlehandle must be kept in order to avoid clearing the handle.

If the legacy handle mode is enabled, the returned value will again be an integer. Additionally, the handle must then be cleared using clear_handleclear_handleClearHandleClearHandleClearHandleclear_handle or the clear operator of the corresponding semantic type of the handle.

注意

It is not recommended to use this operator in HDevelop. This operator is solely provided to enable backward compatibility with legacy code.

执行信息

此算子返回一个句柄。请注意,即使该句柄被用作特定算子的输入参数,这些算子仍可能改变此句柄类型的实例状态。

参数

IntegerHandleIntegerHandleIntegerHandleIntegerHandleintegerHandleinteger_handle (输入控制)  pointer(-array) HTupleMaybeSequence[int]HTupleHtuple (integer) (IntPtr) (Hlong) (Hlong)

The handle as integer.

HandleHandleHandleHandlehandlehandle (输出控制)  handle(-array) HHandle, HTupleSequence[HHandle]HTupleHtuple (handle) (IntPtr) (HHandle) (handle)

The handle as handle.

结果

如果参数有效,算子 integer_to_handleinteger_to_handleIntegerToHandleIntegerToHandleIntegerToHandleinteger_to_handle 返回值 2 ( H_MSG_TRUE )。否则,将抛出异常。

另见

handle_to_integerhandle_to_integerHandleToIntegerHandleToIntegerHandleToIntegerhandle_to_integer

模块

基础