summaryrefslogtreecommitdiff
path: root/Examples/test-suite/doxygen_autodoc_docstring.i
blob: e590d7f949247ca4fc654645c4255a56fe353782 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
%module doxygen_autodoc_docstring

%feature("autodoc", 1);

%feature("docstring") ClassWithDocString "Class doc from docstring";
%feature("docstring") functionWithDocString "Function doc from docstring";
%feature("docstring") ClassWithDocStringAndDoxygenComment "Class doc from docstring overriding doxycomment";
%feature("docstring") functionWithDocStringAndDoxygenComment "Function doc from docstring overriding doxycomment";

%inline %{
class ClassWithoutDoxygenComment {};

void functionWithoutDoxygenComment(int number) {}

/**
 * Class doxygen comment
 */
class ClassWithDoxygenComment {};

/**
 * Function doxygen comment
 */
void functionWithDoxygenComment(int number) {}

class ClassWithDocString {};

void functionWithDocString(int number) {}

/**
 * Class doxygen comment
 */
class ClassWithDocStringAndDoxygenComment {};

/**
 * Function doxygen comment
 */
void functionWithDocStringAndDoxygenComment(int number) {}
%}


%feature("autodoc", ""); // clear autodoc

%feature("docstring") ClassWithDocStringAndDoxygenCommentNoAutodoc "Class doc from docstring overriding doxycomment (no autodoc)";
%feature("docstring") functionWithDocStringAndDoxygenCommentNoAutodoc "Function doc from docstring overriding doxycomment (no autodoc)";

%inline %{
/**
 * Class doxygen comment
 */
class ClassWithDocStringAndDoxygenCommentNoAutodoc {};

/**
 * Function doxygen comment
 */
void functionWithDocStringAndDoxygenCommentNoAutodoc(int number) {}

/**
 * Class doxygen comment 2
 */
class ClassWithDoxygenComment2 {};

/**
 * Function doxygen comment 2
 */
void functionWithDoxygenComment2(int number) {}
%}

%inline %{
#ifdef SWIGPYTHON_BUILTIN
bool is_python_builtin() { return true; }
#else
bool is_python_builtin() { return false; }
#endif
%}