tuple_is_serializable_elemT_tuple_is_serializable_elemTupleIsSerializableElemTupleIsSerializableElemtuple_is_serializable_elem (Operator)

Name

tuple_is_serializable_elemT_tuple_is_serializable_elemTupleIsSerializableElemTupleIsSerializableElemtuple_is_serializable_elem — Test if the elements of a tuple are serializable.

Signature

tuple_is_serializable_elem( : : Tuple : IsSerializableElem)

Herror T_tuple_is_serializable_elem(const Htuple Tuple, Htuple* IsSerializableElem)

void TupleIsSerializableElem(const HTuple& Tuple, HTuple* IsSerializableElem)

HTuple HTuple::TupleIsSerializableElem() const

static void HOperatorSet.TupleIsSerializableElem(HTuple tuple, out HTuple isSerializableElem)

HTuple HTuple.TupleIsSerializableElem()

def tuple_is_serializable_elem(tuple: HTupleType) -> Sequence[int]

def tuple_is_serializable_elem_s(tuple: HTupleType) -> int

Description

tuple_is_serializabletuple_is_serializableTupleIsSerializableTupleIsSerializabletuple_is_serializable checks if the elements of TupleTupleTupletupletuple can be serialized with serialize_tupleserialize_tupleSerializeTupleSerializeTupleserialize_tuple. The output IsSerializableElemIsSerializableElemIsSerializableElemisSerializableElemis_serializable_elem has the same length as the input TupleTupleTupletupletuple and contains at each position either 0 if the corresponding entry in TupleTupleTupletupletuple cannot be serialized, or 1 if it can.

A tuple element can be serialized if it is an integer, a string, a real value or a serializable handle. Handles that are already freed cannot be serialized. To check the complete tuple for serializability, use tuple_is_serializabletuple_is_serializableTupleIsSerializableTupleIsSerializabletuple_is_serializable.

Execution Information

Parameters

TupleTupleTupletupletuple (input_control)  tuple(-array) HTupleHTupleTypeHTupleHtuple (handle / integer / real / string) (HHandle / int / long / double / string) (HHandle / Hlong / double / HString) (handle / Hlong / double / char*)

Tuple to check for serializability.

IsSerializableElemIsSerializableElemIsSerializableElemisSerializableElemis_serializable_elem (output_control)  number(-array) HTupleSequence[int]HTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Boolean value indicating if the input elements can be serialized.

Example (HDevelop)

* Serialize all serializable elements of a tuple
tuple_is_serializable_elem (Tuple, IsSerializableElem)
if (sum(IsSerializableElem[=]0)>0)
  Tuple[find(IsSerializableElem,0)] := HNULL
endif
serialize_tuple (Tuple, SerializedItem)

Result

If the parameters are valid, the operator tuple_is_serializabletuple_is_serializableTupleIsSerializableTupleIsSerializabletuple_is_serializable returns the value 2 ( H_MSG_TRUE) .

Possible Successors

serialize_tupleserialize_tupleSerializeTupleSerializeTupleserialize_tuple, write_tuplewrite_tupleWriteTupleWriteTuplewrite_tuple

Alternatives

tuple_is_serializabletuple_is_serializableTupleIsSerializableTupleIsSerializabletuple_is_serializable

See also

tuple_is_serializabletuple_is_serializableTupleIsSerializableTupleIsSerializabletuple_is_serializable, serialize_tupleserialize_tupleSerializeTupleSerializeTupleserialize_tuple, serialize_handleserialize_handleSerializeHandleSerializeHandleserialize_handle, deserialize_tupledeserialize_tupleDeserializeTupleDeserializeTupledeserialize_tuple, deserialize_handledeserialize_handleDeserializeHandleDeserializeHandledeserialize_handle, write_tuplewrite_tupleWriteTupleWriteTuplewrite_tuple

Module

Foundation