mbed_dev
mbed_dev

Reputation: 1470

Doxygen custom tag with a placeholder

Is it somehow possible in Doxygen to create a custom tag, which creates a documentation using a placeholder tag as its input?

What I want to accomplish is to create a custom tag for requirements. As our DOORS Urls are quite long, and diverge from SW-component to SW-component, I want to create something similar to this:

@file somefile.c
@doorsdocurl <URL to DOORS document> -> this is going to be my placeholder

...
...
...


/**
* @brief somedescription
* @req{doorsdocurl: <reqID1, reqID2,...> } -> this is going to be the second custom tag
*/
void jambo()
{
}

Is this somehow achievable with Doxygen? From what I have read, one has to put his custom tags within the ALIASES variable

Upvotes: 1

Views: 791

Answers (1)

albert
albert

Reputation: 9057

In your Doxyfile you would need something like:

ALIASES = "doorsdocurl_sw_1=<URL to DOORS document>" \
          "req{2}=\1 \2<br>"

and the code would look like:

/**
* @brief somedescription
*
* @req{@doorsdocurl_sw_1,reqID1}
* @req{@doorsdocurl_sw_1,reqID2}
*/
void jambo()
{
}

The \req command can of course be extended with other commands, in this respect the command xrefitem might be useful, see the manual (http://www.doxygen.nl/manual/commands.html#cmdxrefitem)

Upvotes: 1

Related Questions