ClassesClasses | | Operators

fread_serialized_itemfread_serialized_itemFreadSerializedItemFreadSerializedItem (Operator)

Name

fread_serialized_itemfread_serialized_itemFreadSerializedItemFreadSerializedItem — Read a serialized item from a file.

Signature

fread_serialized_item( : : FileHandle : SerializedItemHandle)

Herror fread_serialized_item(const Hlong FileHandle, Hlong* SerializedItemHandle)

Herror T_fread_serialized_item(const Htuple FileHandle, Htuple* SerializedItemHandle)

void FreadSerializedItem(const HTuple& FileHandle, HTuple* SerializedItemHandle)

void HSerializedItem::FreadSerializedItem(const HFile& FileHandle)

static void HOperatorSet.FreadSerializedItem(HTuple fileHandle, out HTuple serializedItemHandle)

void HSerializedItem.FreadSerializedItem(HFile fileHandle)

Description

fread_serialized_itemfread_serialized_itemFreadSerializedItemFreadSerializedItemFreadSerializedItem reads a serialized item, that was written by fwrite_serialized_itemfwrite_serialized_itemFwriteSerializedItemFwriteSerializedItemFwriteSerializedItem from the current input file with the file handle FileHandleFileHandleFileHandleFileHandlefileHandle (see fwrite_serialized_itemfwrite_serialized_itemFwriteSerializedItemFwriteSerializedItemFwriteSerializedItem 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 SerializedItemHandleSerializedItemHandleSerializedItemHandleSerializedItemHandleserializedItemHandle. The file can be opened by the operator open_fileopen_fileOpenFileOpenFileOpenFile. Note that the file must be open in binary format. For reading more than on item from one file the operator fread_serialized_itemfread_serialized_itemFreadSerializedItemFreadSerializedItemFreadSerializedItem must be called several times.

Execution Information

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

FileHandleFileHandleFileHandleFileHandlefileHandle (input_control)  file HFile, HTupleHTupleHtuple (integer) (IntPtr) (Hlong) (Hlong)

File handle.

SerializedItemHandleSerializedItemHandleSerializedItemHandleSerializedItemHandleserializedItemHandle (output_control)  serialized_item HSerializedItem, HTupleHTupleHtuple (integer) (IntPtr) (Hlong) (Hlong)

Handle of the serialized item.

Result

If the parameters are valid, the operator fread_serialized_itemfread_serialized_itemFreadSerializedItemFreadSerializedItemFreadSerializedItem 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.

Possible Predecessors

open_fileopen_fileOpenFileOpenFileOpenFile, fwrite_serialized_itemfwrite_serialized_itemFwriteSerializedItemFwriteSerializedItemFwriteSerializedItem

Possible Successors

close_fileclose_fileCloseFileCloseFileCloseFile, get_serialized_item_ptrget_serialized_item_ptrGetSerializedItemPtrGetSerializedItemPtrGetSerializedItemPtr, deserialize_shape_modeldeserialize_shape_modelDeserializeShapeModelDeserializeShapeModelDeserializeShapeModel, deserialize_ncc_modeldeserialize_ncc_modelDeserializeNccModelDeserializeNccModelDeserializeNccModel

Module

Foundation


ClassesClasses | | Operators