added the highly expected Robin's docstring [atch, plus some fixes and extensions. see autodoc.i

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@6291 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Marcelo Matus 2004-10-03 05:01:17 +00:00
commit 124253d698
4 changed files with 730 additions and 40 deletions

View file

@ -0,0 +1,74 @@
%module autodoc
%feature("autodoc","extended");
// especial typemap and its docs
%typemap(in) (int c, int d) "$1 =0; $2 = 0;";
%typemap(doc,name="hello",type="Tuple") (int c, int d) "hello: int tuple[2]";
%inline {
enum Hola {
hi, hello
};
struct A
{
A(int a, short b, Hola h)
{
}
int func1(int c, int d)
{
return c;
}
int func2(A* c, double d = 2)
{
return 2;
}
};
}
// deleting typemaps and docs
%typemap(in) (int c, int d) ;
%typemap(doc) (int c, int d);
// docs for some parameters
%typemap(doc) int a "a: special comment for parameter a";
%typemap(doc) int b "b: another special comment for parameter b";
%pythoncallback(1) func_cb;
%inline {
struct B
{
B(int a, int b, Hola h)
{
}
int func(int c, int d)
{
return c;
}
};
int func(int c, int d) {
return c;
}
int funcio(int *INOUT) {
return 1;
}
int func_cb(int c, int d) {
return c;
}
}