1

I would like to define some variables and use them in .dox and plantuml in .dox. Is it possible to do that?

Currently, I defined the same variable at both places, Doxyfile and .pu to use the variable in .dox and plantuml in .dox. It is working but double work.

doxygen version: 1.10.0 (ebc57c6dd303a980bd19dd74b8b61c8f3f5180ca)

Example:

By adding ALIASES += CommInterface="I2C" in doxyfile, I can use the variable by \CommInterface in a.dox.

I can also define a variable in config.pu by !$CommInterface = "I2C". Then I can use the variable in the plantuml in a.dox.

@startuml
!includesub config.pu!Config

$CommInterface
@enduml
3
  • 1
    You could add the code you have written as an example. Also how please explain how this sharing of a variable would work? There are several crazy workaround with macro languages and preprocessors or scripts witch could be used depending on the use case. Commented Feb 20 at 5:24
  • 1
    Besides what @simon already mentioned which is essential also the version of doxygen used is of importance (the current doxygen version is 1.13.2) Commented Feb 20 at 8:29
  • 2
    This is not possible, doxygen does not know about the internal possibilities of plantuml and v.v. so doxygen commands cannot be resolved in plantuml. The only way would be to solve these kind of things in a step in e.g. cmake by translating parts of the Doxyfile in a plantuml include file. Commented Feb 23 at 11:10

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.