As we have just seen, wrapset objects (i.e. instances of a sub-class
<gw-wrapset>) are the most complex objects manipulated when
using G-Wrap: they aggregate a number of objects providing information
about what is to be wrapped. Consequently, the top-level code
generation methods are those that apply to wrapset themselves.
This method generates a wrapset call name, for language run-time
lang, and using basename as the base for the names of the
generated files. This is the highest-level method in G-Wrap. It will
actually lookup a registered wrapset with name name (using the
get-wrapset method which returns a
and invoke the method described below.
Generate wrapper code for the wrapset wrapset for language
run-time lang. The generated files will named using
basename as a base name: the name of C source files will be the
concatenation of basename and
".c", etc. Currently,
lang may be either
guile (when generating wrappers for
GNU Guile) or
scheme48 (when generating wrappers for the
The default implementation of
generate-wrapset will in turn
call a number of methods whose purpose is to generate the necessary
file includes, global declarations and definitions for each C file.
These methods are listed below in the order in which they are
invoked at code-generation time.
Return a tree of C code to be inserted before any
Return a tree of C code that contains global declarations needed for wrapset wrapset.
Return a tree of C code that contains global definitions needed for wrapset wrapset.
Return a tree of C code that contains declarations of local variables
for the wrapset run-time initialization function. By default, the
generated wrapset run-time initialization function is named
WRAPSET is the name
of the wrapset it initializes (actually a C-compatible representation
FIXME: To be continued.