--- deliantra/server/include/cfperl.h 2006/08/28 14:05:24 1.12 +++ deliantra/server/include/cfperl.h 2006/08/30 06:06:27 1.14 @@ -85,8 +85,9 @@ void *self, *cb; // CF+ perl self and callback const char *attach; // generic extension attachment information - void clear (); // called when free'ing objects - void optimise (); // possibly save some memory by destroying unneeded data + void clear (); // called when free'ing objects + void optimise (); // possibly save some memory by destroying unneeded data + void instantiate (data_type type, void *obj); void attachable_init () { @@ -103,7 +104,13 @@ { static data_type get_dt () { - subclass::get_dt (); + return subclass::get_dt (); + } + + void instantiate () + { + if (attach) + attachable_base::instantiate (get_dt (), static_cast(this)); } }; @@ -133,7 +140,7 @@ struct object_thawer : object_freezethaw { - object_thawer (FILE *fp, const char *filename = 0); + object_thawer (const char *filename = 0); ~object_thawer (); void get (data_type type, void *obj, attachable_base *ext, int oid);