2 * Copyright 2001-2004 David Abrahams.
3 * Distributed under the Boost Software License, Version 1.0.
4 * (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
6 #ifndef MODULES_DWA10182001_H
7 #define MODULES_DWA10182001_H
12 typedef struct module_t module_t ;
17 struct hash * variables;
18 struct hash * variable_indices;
19 int num_fixed_variables;
20 LIST * * fixed_variables;
21 struct hash * imported_modules;
22 module_t * class_module;
23 struct hash * native_rules;
27 module_t * bindmodule( OBJECT * name );
28 module_t * root_module();
29 void delete_module( module_t * );
31 void import_module( LIST * module_names, module_t * target_module );
32 LIST * imported_modules( module_t * );
34 struct hash * demand_rules( module_t * );
36 void module_bind_variables( module_t * );
39 * After calling module_add_fixed_var, module_set_fixed_variables must be called
40 * before accessing any variables in the module.
42 int module_add_fixed_var( module_t *, OBJECT * name, int * n );
43 void module_set_fixed_variables( module_t *, int n );
46 * Returns the index of the variable or -1 if none exists.
48 int module_get_fixed_var( module_t *, OBJECT * name );