better documented autodoc levels
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@6318 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
776f15623e
commit
9455a03257
2 changed files with 91 additions and 18 deletions
|
|
@ -1,11 +1,19 @@
|
|||
%module autodoc
|
||||
|
||||
%feature("autodoc","extended");
|
||||
%feature("autodoc");
|
||||
|
||||
// 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]";
|
||||
|
||||
// testing for different documentation levels
|
||||
%feature("autodoc","0") A::func0; // names
|
||||
%feature("autodoc","1") A::func1; // names + types
|
||||
%feature("autodoc","2") A::func2; // extended
|
||||
%feature("autodoc","3") A::func3; // extended + types
|
||||
|
||||
%feature("autodoc","just a string") A::func; // names
|
||||
|
||||
%inline {
|
||||
|
||||
enum Hola {
|
||||
|
|
@ -17,18 +25,31 @@
|
|||
A(int a, short b, Hola h)
|
||||
{
|
||||
}
|
||||
|
||||
int func1(int c, int d)
|
||||
|
||||
int func(int a)
|
||||
{
|
||||
return a;
|
||||
}
|
||||
|
||||
int func0(int c, int d)
|
||||
{
|
||||
return c;
|
||||
}
|
||||
|
||||
int func1(int c, int d)
|
||||
{
|
||||
return c;
|
||||
}
|
||||
|
||||
int func2(A* c, double d = 2)
|
||||
{
|
||||
return 2;
|
||||
}
|
||||
|
||||
|
||||
int func3(A* c, double d = 2)
|
||||
{
|
||||
return 2;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue