0

Is is possible to set up Doxygen so that the detailed function definition blocks are shown on both class and topic pages?

Say I had the following class, with Doxygen comments above the method foo(). By default, the Class Reference page for MyClass would contain a brief declaration for foo(), which would include only the \brief comment. If I click on this declaration, it would take me to the longer definition of foo(), which would be in the separate MyGroup page. This would include the \details comment and stuff like parameters etc. Is it possible to setup Doxygen so that the brief declaration and detailed definition of foo() both exist on the Class Reference page for MyClass? Then the MyGroup page would merely contain duplicates of these. I think the context-shift going from class documentation to group documentation can be a little jarring.

class MyClass {
public:
    /// \ingroup MyGroup
    /// \brief Calculate something
    /// \details The calculation implements this technique...
    void foo() {}
};

I am using Doxygen 1.13.2 running on Ubuntu 24.04.

3
  • This is not possible see for some reasoning about it: github.com/doxygen/doxygen/issues/11392#issuecomment-2636387358 Commented Feb 6 at 11:52
  • Thanks! Instead, is it possible to set up Doxygen so that the detailed definition of methods exists only on their respective class pages. Then topic pages contain brief declaration of these methods, that are linked to their detailed documentation on the class pages. From reading that thread, I think this is impossible, but I thought I would double-check. Commented Feb 6 at 12:33
  • Just splitting is not possible but some duplication is possible have a look at the \copybrief and \copydetails and also at the \snippet{doc} and \ref commands. Commented Feb 6 at 16:26

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.