--- deliantra/server/include/freezethaw.h 2010/04/15 04:18:09 1.2 +++ deliantra/server/include/freezethaw.h 2010/04/28 20:51:58 1.6 @@ -165,9 +165,14 @@ operator bool () { return !!av; } }; +// used as dir argument to object_thawer constructor +#define RESOURCE_DIR const_utf8_string (0) + INTERFACE_CLASS(object_thawer) struct object_thawer { + static bool errors_are_fatal; // true during server startup only + char *line; // current beginning of line SV *text; // text part AV *av; // perl part @@ -181,6 +186,7 @@ operator bool () const { return !!text; } object_thawer (const_utf8_string path = 0); + object_thawer (const_utf8_string dir, const_utf8_string file); object_thawer (const_utf8_string data, AV *perlav); ~object_thawer (); @@ -192,7 +198,7 @@ // parse next line, as a single value // skips initial whitespace and comments // and sets kw to KW_value on success. - MTH void next_line (); + MTH bool next_line (); // skip the current key-value (usually fetch next line, for // multiline-fields, skips till the corresponding end-kw @@ -236,6 +242,8 @@ void delayed_deref (attachable *op, object_ptr &ptr, const_utf8_string ref); MTH void resolve_delayed_derefs (bool deref = true); +private: + void new_from_path (const_utf8_string path); }; #endif