The function query_reconstruct
returns whatever data is needed for its successful reconstruction
of the object. The function reconstruct
can reconstruct
the object from data that query_reconstruct
previously
returned.
This ability is mainly used for the so called auto-load objects. It is similar to the ability saveable.
Note that an object which has this ability must define the functions
query_reconstruct
and reconstruct
, since
only the object knows how to properly reconstruct itself.
The intended usage is as follows:
mixed r; r = ob->request_reconstruct(); destruct(ob); ... ob = clone_object(some_file); ob->reconstruct(r);
#include <ability.h> inherit RECONSTRUCT;
mixed query_reconstruct()
void reconstruct(mixed r)
r
that was previously returned by query_reconstruct
.