source: golgotha/src/i4/lisp/li_load.hh @ 80

Last change on this file since 80 was 80, checked in by Sam Hocevar, 12 years ago
  • Adding the Golgotha source code. Not sure what's going to be interesting in there, but since it's all public domain, there's certainly stuff to pick up.
File size: 2.0 KB
Line 
1/********************************************************************** <BR>
2  This file is part of Crack dot Com's free source code release of
3  Golgotha. <a href="http://www.crack.com/golgotha_release"> <BR> for
4  information about compiling & licensing issues visit this URL</a>
5  <PRE> If that doesn't help, contact Jonathan Clark at
6  golgotha_source@usa.net (Subject should have "GOLG" in it)
7***********************************************************************/
8
9#ifndef LI_LOAD_HH
10#define LI_LOAD_HH
11
12
13#include "lisp/li_types.hh"
14
15class i4_loader_class;
16class i4_saver_class;
17
18// returns a remap array for li_ type numbers from old to new
19// these should be freed by li_free_type_info
20li_type_number *li_load_type_info(i4_loader_class *fp, li_environment *env);
21void li_free_type_info(li_type_number *remap);
22
23// this saves the names of the types so the can be found and
24// a remap can be created on load-up
25void li_save_type_info(i4_saver_class *fp, li_environment *env);
26
27
28// loads some object from disk : if the object type no longer exist
29// it is skiped over and 0 is returned
30li_object *li_load_object(i4_loader_class *fp, li_type_number *type_remap, li_environment *env);
31
32// saves an object to disk
33void li_save_object(i4_saver_class *fp, li_object *o, li_environment *env);
34
35// if you need to save a li_type_number to disk
36void li_save_type(i4_file_class *fp, li_type_number type);
37
38// loads a li_type_number from disk
39li_type_number  li_load_type(i4_file_class *fp, li_type_number *type_remap);
40
41
42// loads an object from disk.  If the type is not the type requested, it is discarded
43// and li_new is called to create a new instance of this type
44li_object *li_load_typed_object(char *type_name, i4_loader_class *fp,
45                                li_type_number *type_remap,
46                                li_environment *env);
47
48li_object *li_load_typed_object(int type, i4_loader_class *fp, li_type_number *type_remap,
49                                li_environment *env);
50
51#endif
Note: See TracBrowser for help on using the repository browser.