GNU Dictionary Server
5.5.1 Virtual Functions
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
each element contains the name of a function, and its
the corresponding function. The defined function names and their
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.
This document was generated on September 25, 2018 using makeinfo.Verbatim copying and distribution of this entire article is permitted in any medium, provided this notice is preserved.