Breathe as a source of C++ items, with the documentation in .rst? #809
Replies: 1 comment 1 reply
-
If I understand you correctly, then I don't think this is possible at the moment. Can you elaborate a bit on the use case? If you anyway write all the documentation in the rst-files, then writing the declarations manually using the underlying Sphinx directives doesn't seem much of an overhead to me. E.g., .. cpp:function:: void MyClass::foo(int arg)
Documentation of MyClass::foo in .rst As for your concrete example, if you only want to extract a single member function I believe it should be possible: .. doxygenfunction:: MyClass::foo The "no content permitted" error is because the content is supposed to be extracted from the Doxygen XML, so the Breathe directives explicitly disable content. If there is a compelling use-case I think it should be possible to allow additional content. The "Duplicate C++ declaration" error is fundamentally because the same declaration has been extracted multiple times and put through to Sphinx. Each class, function, variable, etc. can only be documented once. I think the best strategy is to first make the rst such the output is how you like it, and if this still appears then dive into specifics. |
Beta Was this translation helpful? Give feedback.
-
I am trying to use Doxygen + Sphinx + Breathe in my probject, but I feel I am doing it wrong.
I wanted to use Breathe as a source of C++ declarations, while keeping the documentation in the .rst file itself.
So, for example, if I have a
MyClass
class with two methodsfoo
andbar
it looks like this:but there are several issues that hint me that this is not the intended approach: the documentation is not indented, I get a bunch of warnings
WARNING: Duplicate C++ declaration
and it seems overly verbose in the .rst file.Moreover, when I try to indent the documentation to match the directive, I get an error:
ERROR: Error in "doxygenclass" directive: no content permitted.
Same problem appears if I try to document free functions.
Beta Was this translation helpful? Give feedback.
All reactions