Reputation: 10767
I use doxygen to document real-time kernel written in C, and for each function I should specify at least the following:
I'd like to implement these properties of functions as a kind of badge: probably just an image, probably an image with text, or something like that.
So, I'd like to put actual doxygen markup of all possible badges (currently, just three ones) in one place, and then just "include" them in the documentation of each function. Unfortunately I can't find anything about this in doxygen docs. I see there are methods to include source file as an example: \include
, or even par or it: \snippet
, but how to include documentation snippet?
I can't believe this isn't possible.
Upvotes: 2
Views: 208
Reputation: 10767
I failed to find some straightforward way, so I ended up with hacky makefile environment variables approach:
Makefile:
define \n
endef
TN_CALL_FROM_TASK = \image html attr_call_task.png ${\n}\
\latexonly \
\includegraphics{../../images/attr_call_task.png} \
\endlatexonly \
TN_CALL_FROM_ISR = \image html attr_call_int.png ${\n} \
\latexonly \
\includegraphics{../../images/attr_call_int.png} \
\endlatexonly \
export TN_CALL_FROM_TASK
export TN_CALL_FROM_ISR
all:
doxygen tn_doxyfile
And then, in the code:
/**
* Some docs for my function
*
* $(TN_CALL_FROM_TASK)
*/
void my_func(void) { ... }
It's not particularly elegant, but works.
Note one drawback of this approach: in doxygen 1.8.8 (latest at the moment), markdown syntax doesn't work when expanded from environment variables.
Upvotes: 1