I want to use doxygen to document a c-like language. I got some issues to solve keywords which are unknown in the context.
One example, I have to use a callback function called
on timer
{
//normal c- code
}
My question is now, can I adopt doxygen to accept the new keyword? I would like to add this keyword like a function or variable acc. to
/** This timer is used for something. */
on timer
{
}
or maybe
/** \ontimer This timer is used for something. */
on timer
{
}
The documentation of doxygen describes something with ALIASES or \xrefitem but as I understand I can only generate new sections for known types or am I wrong? Actually I am surrounding the unknown code with a condition block out to avoid errors in the generated output.
As I understand is "on" a keyword which doxygen cannot interpret. One solution could be to declare the keyword
on
as a predfined macro in the doxyile by using the thePREDEFINED
tag as follows:Yes, the
=
at the end is not a typo! This tells the preprocessor of doxygen to substitute the keywordon
with a empty string. Note that you have to setENABLE_PREPROCESSING
toYES
.If the
on
keyword only appears before callback functions you could alternatively set thePREDEFINED
macro tovoid
: