… | |
… | |
163 | utf8_string as_string (); // like strdup |
163 | utf8_string as_string (); // like strdup |
164 | |
164 | |
165 | operator bool () { return !!av; } |
165 | operator bool () { return !!av; } |
166 | }; |
166 | }; |
167 | |
167 | |
|
|
168 | // used as dir argument to object_thawer constructor |
|
|
169 | #define RESOURCE_DIR const_utf8_string (0) |
|
|
170 | |
168 | INTERFACE_CLASS(object_thawer) |
171 | INTERFACE_CLASS(object_thawer) |
169 | struct object_thawer |
172 | struct object_thawer |
170 | { |
173 | { |
171 | static bool errors_are_fatal; // true during server startup only |
174 | static bool errors_are_fatal; // true during server startup only |
172 | |
175 | |
… | |
… | |
181 | const char *name; |
184 | const char *name; |
182 | |
185 | |
183 | operator bool () const { return !!text; } |
186 | operator bool () const { return !!text; } |
184 | |
187 | |
185 | object_thawer (const_utf8_string path = 0); |
188 | object_thawer (const_utf8_string path = 0); |
|
|
189 | object_thawer (const_utf8_string dir, const_utf8_string file); |
186 | object_thawer (const_utf8_string data, AV *perlav); |
190 | object_thawer (const_utf8_string data, AV *perlav); |
187 | ~object_thawer (); |
191 | ~object_thawer (); |
188 | |
192 | |
189 | void get (attachable *obj, int oid); |
193 | void get (attachable *obj, int oid); |
190 | |
194 | |
… | |
… | |
236 | }; |
240 | }; |
237 | std::vector<delayed_ref> delrefs; |
241 | std::vector<delayed_ref> delrefs; |
238 | |
242 | |
239 | void delayed_deref (attachable *op, object_ptr &ptr, const_utf8_string ref); |
243 | void delayed_deref (attachable *op, object_ptr &ptr, const_utf8_string ref); |
240 | MTH void resolve_delayed_derefs (bool deref = true); |
244 | MTH void resolve_delayed_derefs (bool deref = true); |
|
|
245 | private: |
|
|
246 | void new_from_path (const_utf8_string path); |
241 | }; |
247 | }; |
242 | |
248 | |
243 | #endif |
249 | #endif |
244 | |
250 | |