You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to generate documentation for a C++ source code (file main.cpp) using Doxygen, doxyrest and Sphinx.
The source code looks like this:
/*! \file main.cpp
\brief A Documented file.
Details.
*/
/*! \def MAXIMUMSIZE
\brief A macro that returns the maximum
Details.
*/
#define MAXIMUMSIZE 20
//! A public variable.
/*!
Details.
*/
int publicVar = 3;
I have both GENERATE_HTML and GENERATE_XML enabled in Doxygen, and everything seems to be fine.
The problem is when I'm trying to generate .rst files based on my newly generated xml-dir folder. I've seen that the value of the publicVar integer is written in the rst(s), but MAXIMUMSIZE's value is not.
I need my Sphinx documentation to also provide the value of the #define, not only its name.
This is how Sphinx looks like:
And I want it to be like that:
Is there any stuff in doxyrest-config.lua I need to change in order to keep the macro values?
The text was updated successfully, but these errors were encountered:
There is indeed a simple enough workaround for this, which I use in my own projects.
You need to add a line of code to the doxyrest/frame/cfamily/utils.lua file, at line 505:
functiongetDefineDeclString(define, nameTemplate, indent)
locals="#define "s=s..fillItemNameTemplate(nameTemplate, define.name, define.id)
if#define.paramArray>0then-- no space between name and params!s=s..getParamArrayString(s, define.paramArray, false, "(", ")", indent, "\\\n")
end>s=s..'\t' ..getLinkedTextString(define.initializer, true)
returnsend
You can see the line of code in question, I put a > character at the beginning of the line.
I'm trying to generate documentation for a C++ source code (file
main.cpp
) using Doxygen, doxyrest and Sphinx.The source code looks like this:
I have both
GENERATE_HTML
andGENERATE_XML
enabled in Doxygen, and everything seems to be fine.The problem is when I'm trying to generate
.rst
files based on my newly generatedxml-dir
folder. I've seen that the value of thepublicVar
integer is written in therst
(s), butMAXIMUMSIZE
's value is not.I need my Sphinx documentation to also provide the value of the #define, not only its name.
This is how Sphinx looks like:
And I want it to be like that:
Is there any stuff in
doxyrest-config.lua
I need to change in order to keep the macro values?The text was updated successfully, but these errors were encountered: