I have some c++ code, and I successfully export it to python module using pybind11. The code is:
class A
{
public:
A()
{
}
/**
* @brief explanation from c++
*/
int GetWidth()
{
return width;
}
private:
int width = 0;
};
PYBIND11_MODULE(module, m) {
m.doc() = "My Library Python Bindings";
py::class_<A>(m, "A")
.def(py::init<>())
.def("GetWidth", &A::GetWidth, "explanation from pybind");
}
My question is: how to read the documentation for function in pycharm?
For example, when I use opencv, I can know the input for function. For example:
But, when I import my-self module, I don't know what is the input parameter.
For pybind11, how can I add the documentation for the exported module?
In addition, I add lots of explanation for c++ function using the doxygen format. Is it possible to convert the c++ explanation to python function.
Any suggestion is appreciated~~~
