ClassesClasses | | Operators

serialize_handleT_serialize_handleSerializeHandleSerializeHandle (Operator)

Name

serialize_handleT_serialize_handleSerializeHandleSerializeHandle — Serialize the content of a handle.

Signature

serialize_handle( : : Handle : SerializedItem)

Herror T_serialize_handle(const Htuple Handle, Htuple* SerializedItem)

void SerializeHandle(const HTuple& Handle, HTuple* SerializedItem)

HSerializedItem HHandle::SerializeHandle() const

static void HOperatorSet.SerializeHandle(HTuple handle, out HTuple serializedItem)

HSerializedItem HHandle.SerializeHandle()

Description

serialize_handleserialize_handleSerializeHandleSerializeHandleSerializeHandle serializes the content of HandleHandleHandleHandlehandle and returns the serialized item in SerializedItemSerializedItemSerializedItemSerializedItemserializedItem (see fwrite_serialized_itemfwrite_serialized_itemFwriteSerializedItemFwriteSerializedItemFwriteSerializedItem for an introduction of the basic principle of serialization). The serialized item can later be deserialized with deserialize_handledeserialize_handleDeserializeHandleDeserializeHandleDeserializeHandle.

Note that not all handle types support serialization. To check if a handle can be serializes, use tuple_is_serializabletuple_is_serializableTupleIsSerializableTupleIsSerializableTupleIsSerializable or tuple_is_serializable_elemtuple_is_serializable_elemTupleIsSerializableElemTupleIsSerializableElemTupleIsSerializableElem. Handles that have already been cleared cannot be serialized.

Also note that the serialized item created by this operator is compatible with the type specific deserialization operators, such as deserialize_matrixdeserialize_matrixDeserializeMatrixDeserializeMatrixDeserializeMatrix or deserialize_shape_modeldeserialize_shape_modelDeserializeShapeModelDeserializeShapeModelDeserializeShapeModel.

Execution Information

Parameters

HandleHandleHandleHandlehandle (input_control)  handle HHandle, HTupleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)

Handle that should be serialized.

SerializedItemSerializedItemSerializedItemSerializedItemserializedItem (output_control)  serialized_item HSerializedItem, HTupleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)

Handle containing the serialized item.

Example (HDevelop)

create_matrix (3, 3, 0, MatrixID)
serialize_handle (MatrixID, SerializedMatrix)
deserialize_handle (SerializedMatrix, MatrixID2)

Result

If the parameters are valid, the operator serialize_handleserialize_handleSerializeHandleSerializeHandleSerializeHandle returns the value 2 (H_MSG_TRUE). Otherwise, an exception is raised.

Possible Predecessors

tuple_is_serializabletuple_is_serializableTupleIsSerializableTupleIsSerializableTupleIsSerializable, tuple_is_serializable_elemtuple_is_serializable_elemTupleIsSerializableElemTupleIsSerializableElemTupleIsSerializableElem

Possible Successors

deserialize_handledeserialize_handleDeserializeHandleDeserializeHandleDeserializeHandle, fwrite_serialized_itemfwrite_serialized_itemFwriteSerializedItemFwriteSerializedItemFwriteSerializedItem, send_serialized_itemsend_serialized_itemSendSerializedItemSendSerializedItemSendSerializedItem

Module

Foundation


ClassesClasses | | Operators