File tree 5 files changed +21
-16
lines changed
5 files changed +21
-16
lines changed Original file line number Diff line number Diff line change
1
+ C++ code
2
+ ===================
3
+
4
+ .. doxygenfile :: main.hpp
Original file line number Diff line number Diff line change 1
- Welcome to Python-CPP Example's documentation!
2
- ==============================================
1
+ Example documentation for a hybrid Python/C++ project
2
+ =====================================================
3
3
4
4
Contents:
5
5
6
6
.. toctree ::
7
7
:maxdepth: 2
8
8
9
- python_cpp_example
9
+ python_code
10
10
11
- .. doxygenfunction :: add
11
+ cpp_code
12
12
13
13
Indices and tables
14
14
==================
15
15
16
16
* :ref: `genindex `
17
- * :ref: `modindex `
18
17
* :ref: `search `
File renamed without changes.
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ namespace py = pybind11;
6
6
PYBIND11_PLUGIN (python_cpp_example)
7
7
{
8
8
py::module m (" python_cpp_example" , R"doc(
9
- Pybind11 example plugin
9
+ Python module
10
10
-----------------------
11
11
.. currentmodule:: python_cpp_example
12
12
.. autosummary::
@@ -18,19 +18,15 @@ PYBIND11_PLUGIN(python_cpp_example)
18
18
19
19
m.def (" add" , &add, R"doc(
20
20
Add two numbers
21
- Some other explanation about the add function.
21
+
22
+ Some other information about the add function.
22
23
)doc" );
23
24
24
25
m.def (" subtract" , &subtract, R"doc(
25
26
Subtract two numbers
26
- Some other explanation about the subtract function.
27
- )doc" );
28
27
29
- #ifdef VERSION_INFO
30
- m.attr (" __version__" ) = py::str (VERSION_INFO);
31
- #else
32
- m.attr (" __version__" ) = py::str (" dev" );
33
- #endif
28
+ Some other information about the subtract function.
29
+ )doc" );
34
30
35
31
return m.ptr ();
36
32
}
Original file line number Diff line number Diff line change 1
- /* ! Add two integers woo! */
1
+ /* ! Add two integers
2
+ \param i an integer
3
+ \param j another integer
4
+ */
2
5
int add (int i, int j);
3
- /* ! Subtract one integer from another */
6
+ /* ! Subtract one integer from another
7
+ \param i an integer
8
+ \param j an integer to subtract from \p i
9
+ */
4
10
int subtract (int i, int j);
You can’t perform that action at this time.
0 commit comments