0

In Doxygen, how to reuse a line or a block of text?

Suppose I write the following in some file:

/**
 * \magicCommand{magicLabel}{this is some text that I want to show.}
 */

Then, when I write the following in another file,

/**
 * OK, \someRefFun{magicLabel}
 */
void f() {}

Doxygen will create the following in the html document for f():

OK, this is some text that I want to show.

I see @copydoc can do something like this, but the problem is that I would need to create some dummy function for the referred text to depend on. Can it be done without using a dummy function?

1
  • Which version of doxygen are you using? You already mentioned @copydoc but probably here the use of @snippet{doc} might be more appropriate. Commented Dec 19, 2024 at 14:07

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.