Jarkko Hietaniemi <[EMAIL PROTECTED]> writes:
> On Sun, Aug 06, 2000 at 12:41:50AM +0300, Ariel Scolnicov wrote:
[...]
> > Have you looked at the documentation that SWIG auto-generates?
>
> Nope. Can you give a quick summary?
SWIG is a tool for interfacing C (and C++ and Fortran and ...) code to
Python / Perl / TCL / ...; it uses code that looks vaguely like C
header files to tell it what to do.
Assuming you have all the typemaps needed and exactly the right
functions in your library, all you need to do is give the header:
%module Mod
Foo *MakeFoo(Bar *b); /* Frobnitz Bar canonically */
double square(double a); /* square (a circle) */
When run through SWIG, it generates this DOC file (in addition to a C
file you compile to generate the extension):
MakeFoo b
[ returns Foo * ]
Frobnitz Bar canonically
square a
[ returns double ]
square (a circle)
Options exist to tweak the generate documentation somewhat, but even
this level is very useful.
--
Ariel Scolnicov |"GCAAGAATTGAACTGTAG" | [EMAIL PROTECTED]
Compugen Ltd. |Tel: +972-2-6795059 (Jerusalem) \ We recycle all our Hz
72 Pinhas Rosen St. |Tel: +972-3-7658514 (Main office)`---------------------
Tel-Aviv 69512, ISRAEL |Fax: +972-3-7658555 http://3w.compugen.co.il/~ariels