pike.git
/
src
/
program.c
version
»
Context lines:
10
20
40
80
file
none
3
pike.git/src/program.c:153:
"`+=", "_is_type", "_sprintf", "_equal", "_m_delete", "_get_iterator", "`[..]", /* NOTE: After this point there are only fake lfuns. */ "_search", "_types",
+
"_serialize",
+
"_deserialize",
}; struct pike_string *lfun_strings[NELEM(lfun_names)]; static struct mapping *lfun_ids; /* mapping(string:type) */ static struct mapping *lfun_types; static const char *const raw_lfun_types[] = {
pike.git/src/program.c:211:
tFuncV(tZero,tZero,tMix), /* "`+=", */ tFuncV(tStr,tVoid,tInt), /* "_is_type", */ tFuncV(tInt tOr(tMap(tStr,tInt),tVoid),tVoid,tStr), /* "_sprintf", */ tFuncV(tMix,tVoid,tInt), /* "_equal", */ tFuncV(tZero,tVoid,tMix), /* "_m_delete", */ tFuncV(tNone,tVoid,tObj), /* "_get_iterator", */ tFuncV(tZero tRangeBound tZero tRangeBound, tVoid, tMix), /* "`[..]" */ /* NOTE: After this point there are only fake lfuns. */ tFuncV(tZero tOr(tZero, tVoid), tVoid, tMix), /* "_search", */ tFuncV(tNone,tVoid,tArray), /* "_types", */
+
tFuncV(tObj tZero, tVoid, tVoid), /* "_serialize", */
+
tFuncV(tObj tZero, tVoid, tVoid), /* "_deserialize", */
}; /* These two are not true LFUNs! */ static struct pike_type *lfun_getter_type_string = NULL; static struct pike_type *lfun_setter_type_string = NULL; /*! @namespace lfun:: *! *! Callback functions used to overload various builtin functions. *!
pike.git/src/program.c:1142:
*! It's assumed that this function is side-effect free. *! *! @note *! @[predef::types()] was added in Pike 7.9. *! *! @seealso *! @[predef::types()], @[lfun::_indices()], @[lfun::_values()], *! @[::_types()] */
+
/*! @decl void lfun::_serialize(object o, @
+
*! function(string, type, mixed:void) serializer)
+
*!
+
*! Dispatch function for @[Serializer.serialize()].
+
*!
+
*! @param o
+
*! Object to serialize. Always a context of the current object.
+
*!
+
*! @param serializer
+
*! Function to be called once for every variable
+
*! to serialize.
+
*!
+
*! The @[serializer] function expects to be called with three arguments:
+
*! @dl
+
*! @item
+
*! @tt{symbol@} - The symbol name.
+
*! @item
+
*! @tt{symbol_type@} - The type of the symbol.
+
*! @item
+
*! @tt{value@} - The value of the symbol.
+
*! @enddl
+
*!
+
*! @note
+
*! A default implementation of @[lfun::_serialize()] and
+
*! @[lfun::_deserialize()] is available in @[Serializer.Serializable].
+
*!
+
*! @seealso
+
*! @[lfun::_deserialize()], @[Serializer.serialize()],
+
*! @[Serializer.Serializable()->_serialize()]
+
*/
+
+
/*! @decl void lfun::_deserialize(object o, @
+
*! function(string, type, @
+
*! function(mixed:void): mixed) deserializer)
+
*!
+
*! Dispatch function for @[Serialization.deserialize()].
+
*!
+
*! @param o
+
*! Object to serialize. Always a context of the current object.
+
*!
+
*! @param deserializer
+
*! Function to be called once for every variable
+
*! to serialize.
+
*!
+
*! The @[deserializer] function expects to be called with three arguments:
+
*! @dl
+
*! @item
+
*! @tt{symbol@} - The symbol name.
+
*! @item
+
*! @tt{symbol_type@} - The type of the symbol.
+
*! @item
+
*! @tt{setter@} - Function that sets the symbol value.
+
*! @enddl
+
*!
+
*! @note
+
*! A default implementation of @[lfun::_serialize()] and
+
*! @[lfun::_deserialize()] is available in @[Serializer.Serializable].
+
*!
+
*! @seealso
+
*! @[lfun::_serialize()], @[Serializer.deserialize()],
+
*! @[Serializer.Serializable()->_deserialize()]
+
*/
+
/*! @decl mixed lfun::`symbol() *! @decl mixed lfun::`->symbol() *! *! Variable retrieval callback (aka "getter"). *! *! @note *! Note that the @expr{symbol@} in the name can be any symbol. *! *! @note *! This is not a true LFUN, since it is even more low level!