I am trying to document my C code using doxygen. I have default values ββset as C # define macros. (I know that C has no default values, but this is just an example)
eg:.
#define DEFAULT_WIDTH 100 #define DEFAULT_HEIGHT 200
Inside doxygen, I added an alias that handles the default values ββthe way I want. Consider an example function below
//! Initializes something //! @param width The width @default DEFAULT_WIDTH //! @param height The height @default DEFAULT_HEIGHT //! @return Result of initialization char initSomething(int width,int height);
This will lead to the creation of documentation as I want, except for one important fact. DEFAULT_WIDTH and DEFAULT_HEIGHT are not expanding, I get macro names, not 100 and 200, respectively. I have MACRO_EXPANSION and ENABLE_PREPROCESSING.
What am I missing? Is there any way to achieve this with doxygen?
I am configuring doxygen with doxywizard and am currently testing on Windows.
EDIT: As ugoren points out, you can just document the macro, and then doxygen will link this documentation to them. This is how my current implementation in my project really is. But I'm trying to consider additional options - if they exist.
Lefteris
source share