The wrapper code generation uses »startcommentary«, »startproc« and »endproc« to copy the comment into the generated wrapper code. See Example 9.18, “Lisp Wrapper Commented”.
The default values for the parameters are stated in the generated comment.
# Defines the project type, # and the programming language # added to the embedded examples: proc vgfile::getType {} { return "lisp"} proc vgfile::docbookLanguage {} { return lisp } # Language specific »signatures« and usage: proc dumper::docbook::generalForm t proc dumper::docbook::cgetForm t proc dumper::docbook::configureForm t proc dumper::docbook::signatureOf {t c _} proc dumper::docbook::synopsisOf t
Through getType retrieves the file extension of the project, in the case of Lisp : »lisp« for .lisp.
docbookLanguage is only being used by the DocBook generation. This procedure returns the name of the programming language; which is then used as a language attribute, to select the proper syntax highlighting. An example for Ruby is shown in Example 9.20, “Generated Ruby”
The code presented inside Example 9.19, “Customized Lisp Refentry”
is bundled in a separate package lispDocbook
implemented in module lispdocbook.tcl
.
All these alterations are to be applied on the project itself –for example inside the shell, on the Local: prompt, to alter the assumed type of a given project. Do not apply these modifications on a modified project, because the modification will be lost.
Jeszra: +- Local :package require lispDocbook
The mechanism for Ruby wrapper manual pages is identical to Lisp.
The Example 9.20, “Generated Ruby” shows the language attribute for a programlisting, as specified by: vgfile::docbookLanguage.
A separate package rubyDocbook
performs the customization on a given project.