Open jmirabel opened 4 years ago
typename FunctionPrototype
you meant a pointer on the function?
typename FunctionPrototype
you meant a pointer on the function?
I meant the type of this function, i.e. return_type (ClassName::*) (args)
but I realize now that it is not sufficient because the type does not include the function name... It may be necessary to use a pointer to the function.
Assuming there are no ambiguities, the idea is to use it as
.def ("func", &Class::func, doxygen_doc<&Class::func>::docstring())
If this works well, this could even become
.def (documented_method<&Class::func> ("func"))
Another issue concerns Majax equations. Do you know how to handle them?
This would be indeed a nice and expected feature.
Eventually this: https://www.ctan.org/pkg/tex2mail
I played a bit on this topic. A first working version can be found by pulling branch python_doc of https://github.com/jmirabel/hpp-fcl. To make it work, you must add my fork as remote of the submodule:
cd cmake
git remote add -f jmirabel https://github.com/jmirabel/jrl-cmakemodules
For the conversion from TeX formulas to ASCII, I found this very helpful package: https://pylatexenc.readthedocs.io/en/latest/
Although not related to CMake, I post this issue here because the problem was encountered in many packages and the best place to provide a solution is this package. This is mostly for reporting as I have no time to allocate to this at the moment.
Problem
A C++ library can be easily exposed in Python, using for instance boost python. If the C++ library is already documented using Doxygen, documenting the Python bindings in somewhat tedious as it duplicates the already written documentation.
Solution
Format using templates