Skip to content

fread_serialized_itemFreadSerializedItemFreadSerializedItemfread_serialized_itemT_fread_serialized_item🔗

Short description🔗

fread_serialized_itemFreadSerializedItemFreadSerializedItemfread_serialized_itemT_fread_serialized_item — Read a serialized item from a file.

Signature🔗

fread_serialized_item( file FileHandle, out serialized_item SerializedItemHandle )void FreadSerializedItem( const HTuple& FileHandle, HTuple* SerializedItemHandle )static void HOperatorSet.FreadSerializedItem( HTuple fileHandle, out HTuple serializedItemHandle )def fread_serialized_item( file_handle: HHandle ) -> HHandle

Herror T_fread_serialized_item( const Htuple FileHandle, Htuple* SerializedItemHandle )

void HSerializedItem::FreadSerializedItem( const HFile& FileHandle )

void HSerializedItem.FreadSerializedItem( HFile fileHandle )

Description🔗

fread_serialized_itemFreadSerializedItem reads a serialized item, that was written by fwrite_serialized_itemFwriteSerializedItem from the current input file with the file handle FileHandlefileHandlefile_handle (see fwrite_serialized_itemFwriteSerializedItem for an introduction of the basics of serialization). For this, a serialized item is created and the values read from file are stored in the serialized item. The operator returns the handle of the serialized item in the parameter SerializedItemHandleserializedItemHandleserialized_item_handle. The file can be opened by the operator open_fileOpenFile. Note that the file must be open in binary format. For reading more than on item from one file the operator fread_serialized_itemFreadSerializedItem must be called several times.

Execution information🔗

Execution information
  • Multithreading type: reentrant (runs in parallel with non-exclusive operators).

  • Multithreading scope: global (may be called from any thread).

  • Processed without parallelization.

This operator returns a handle. Note that the state of an instance of this handle type may be changed by specific operators even though the handle is used as an input parameter by those operators.

Parameters🔗

FileHandlefileHandlefile_handle (input_control) file → (handle)HTuple (HHandle)HFile, HTuple (IntPtr)HHandleHtuple (handle)

File handle.

SerializedItemHandleserializedItemHandleserialized_item_handle (output_control) serialized_item → (handle)HTuple (HHandle)HSerializedItem, HTuple (IntPtr)HHandleHtuple (handle)

Handle of the serialized item.

Result🔗

If the parameters are valid, the operator fread_serialized_itemFreadSerializedItem returns the value 2 (H_MSG_TRUE). If necessary, an exception is raised. The error code 9581 indicates that the end of file is reached before a serialized item could be read.

Combinations with other operators🔗

Combinations

Possible predecessors

open_fileOpenFile, fwrite_serialized_itemFwriteSerializedItem

Possible successors

close_fileCloseFile, get_serialized_item_ptrGetSerializedItemPtr, deserialize_shape_modelDeserializeShapeModel, deserialize_ncc_modelDeserializeNccModel

Module🔗

Foundation