1 #ifndef _newgen_database_included
2 #define _newgen_database_included
3 #define _gen_database_start 7
10 #define database_domain (_gen_database_start+0)
11 #if !defined(_newgen_database_domain_defined_)
12 #define _newgen_database_domain_defined_
13 #define DATABASE_NEWGEN_DOMAIN (database_domain)
14 #define database_NEWGEN_DOMAIN (database_domain)
18 #define resource_domain (_gen_database_start+1)
19 #if !defined(_newgen_resource_domain_defined_)
20 #define _newgen_resource_domain_defined_
21 #define RESOURCE_NEWGEN_DOMAIN (resource_domain)
22 #define resource_NEWGEN_DOMAIN (resource_domain)
26 #define status_domain (_gen_database_start+2)
27 #if !defined(_newgen_status_domain_defined_)
28 #define _newgen_status_domain_defined_
29 #define STATUS_NEWGEN_DOMAIN (status_domain)
30 #define status_NEWGEN_DOMAIN (status_domain)
36 #define DATABASE(x) ((database)((x).p))
37 #define database_CAST(x) DATABASE(x)
38 #define DATABASE_CAST(x) DATABASE(x)
39 #define DATABASE_(x) ((x).e)
40 #define DATABASE_TYPE database
41 #define database_TYPE database
42 #define database_undefined ((database)gen_chunk_undefined)
43 #define database_undefined_p(x) ((x)==database_undefined)
50 #define gen_DATABASE_cons gen_database_cons
65 #define database_domain_number(x) ((x)->_type_)
66 #define database_name_(x) database_name(x)
67 #define database_name(x) ((x)->_database_name_)
68 #define database_directory_(x) database_directory(x)
69 #define database_directory(x) ((x)->_database_directory_)
70 #define database_resources_(x) database_resources(x)
71 #define database_resources(x) ((x)->_database_resources_)
75 #define RESOURCE(x) ((resource)((x).p))
76 #define resource_CAST(x) RESOURCE(x)
77 #define RESOURCE_CAST(x) RESOURCE(x)
78 #define RESOURCE_(x) ((x).e)
79 #define RESOURCE_TYPE resource
80 #define resource_TYPE resource
81 #define resource_undefined ((resource)gen_chunk_undefined)
82 #define resource_undefined_p(x) ((x)==resource_undefined)
89 #define gen_RESOURCE_cons gen_resource_cons
106 #define resource_domain_number(x) ((x)->_type_)
107 #define resource_name_(x) resource_name(x)
108 #define resource_name(x) ((x)->_resource_name_)
109 #define resource_owner_name_(x) resource_owner_name(x)
110 #define resource_owner_name(x) ((x)->_resource_owner_name_)
111 #define resource_status_(x) resource_status(x)
112 #define resource_status(x) ((x)->_resource_status_)
113 #define resource_time_(x) resource_time(x)
114 #define resource_time(x) ((x)->_resource_time_)
115 #define resource_file_time_(x) resource_file_time(x)
116 #define resource_file_time(x) ((x)->_resource_file_time_)
120 #define STATUS(x) ((status)((x).p))
121 #define status_CAST(x) STATUS(x)
122 #define STATUS_CAST(x) STATUS(x)
123 #define STATUS_(x) ((x).e)
124 #define STATUS_TYPE status
125 #define status_TYPE status
126 #define status_undefined ((status)gen_chunk_undefined)
127 #define status_undefined_p(x) ((x)==status_undefined)
134 #define gen_STATUS_cons gen_status_cons
158 #define status_domain_number(x) ((x)->_type_)
159 #define status_tag(x) ((x)->_status_tag__)
160 #define status_memory_p(x) (status_tag(x)==is_status_memory)
161 #define status_memory_(x) status_memory(x)
162 #define status_memory(x) ((x)->_status_union_._status_memory_)
163 #define status_file_p(x) (status_tag(x)==is_status_file)
164 #define status_file_(x) status_file(x)
165 #define status_file(x) ((x)->_status_union_._status_file_)
167 #define database_spec "\
169 database = name:string x directory:string x resources:resource*;\n\
170 resource = name:string x owner_name:string x status:status x time:int x file_time:int;\n\
171 status = memory:string + file:string;\n\
status copy_status(status)
STATUS.
list gen_database_cons(database, list)
void free_resource(resource)
database make_database(string, string, list)
status make_status_file(string)
void write_resource(FILE *, resource)
void database_assign_contents(database, database)
void resource_non_recursive_free(resource)
void database_non_recursive_free(database)
string status_tag_as_string(enum status_utype)
void resource_assign_contents(resource, resource)
status make_status(enum status_utype, void *)
struct _newgen_struct_database_ * database
bool status_consistent_p(status)
bool resource_consistent_p(resource)
bool database_consistent_p(database)
void write_status(FILE *, status)
void status_assign_contents(status, status)
bool resource_defined_p(resource)
struct _newgen_struct_status_ * status
database check_database(database)
database read_database(FILE *)
list gen_status_cons(status, list)
database copy_database(database)
DATABASE.
resource read_resource(FILE *)
struct _newgen_struct_resource_ * resource
resource make_resource(string, string, status, intptr_t, intptr_t)
resource check_resource(resource)
status check_status(status)
bool status_defined_p(status)
void status_non_recursive_free(status)
resource copy_resource(resource)
RESOURCE.
void write_database(FILE *, database)
status make_status_memory(string)
void free_database(database)
bool database_defined_p(database)
list gen_resource_cons(resource, list)
status read_status(FILE *)
string _database_directory_
name:string
list _database_resources_
directory:string
string _resource_owner_name_
name:string
status _resource_status_
owner_name:string
intptr_t _resource_time_
status:status
intptr_t _resource_file_time_
time:int
enum status_utype _status_tag__
union _newgen_struct_status_::@45 _status_union_
string _status_file_
memory:string
The structure used to build lists in NewGen.