Next: Guile Initialization, Up: Guile
[Contents][Index]
A database handled by the guile
module is assigned a
virtual function table. This table is an association list which
keeps Scheme call-back functions implemented to perform
particular tasks on that database. In this list, the car
of
each element contains the name of a function, and its cdr
gives
the corresponding function. The defined function names and their
semantics are:
Open the database.
Close the database.
Return a short description of the database.
Return a full information about the database.
Define a word.
Look up a word in the database.
Output a search result.
Return number of entries in the result.
For example, the following is a valid virtual function table:
(list (cons "open" open-module) (cons "close" close-module) (cons "descr" descr) (cons "info" info) (cons "define" define-word) (cons "match" match-word) (cons "output" output) (cons "result-count" result-count))
Apart from a per-database virtual table, there is also a global virtual function table, which supplies entries missing in the former. Both tables are created during the module initialization, as described in the next subsection.
The purposes of particular virtuals functions are described in Guile API.