[Doxygen-develop] Suggested patch to optionally suppress XML program listing.
Brought to you by:
dimitri
From: <Pau...@Sy...> - 2003-09-23 16:37:11
|
Currently Doxygen emits a program listing in XML. This can add hugely to the XML file size and slows both the Doxygen XML generation and any subsequent XML processing. My suggestion is to make the XML program listing an optional config item "XML_PROGRAMLISTING". The change affects two files; config.cpp and xmlgen.cpp. Here are the diffs for Doxygen version 1.3.4 First config.cpp: $ diff -u original/config.cpp patched/config.cpp --- original/config.cpp 2003-09-21 20:42:50.000000000 +0100 +++ patched/config.cpp 2003-09-23 17:23:38.000000000 +0100 @@ -4012,6 +4012,13 @@ "syntax of the XML files. \n" ); cs->addDependency("GENERATE_XML"); + cb = addBool( + "XML_PROGRAMLISTING", + "If the XML_PROGRAMLISTING tag is set to YES Doxygen will \n" + "generate a <programlisting>...</programlisting in the XML output. \n", + FALSE + ); + cb->addDependency("GENERATE_XML"); //-------------------------------------------------------------------------- addInfo( "DEF","configuration options for the AutoGen Definitions output"); //-------------------------------------------------------------------------- And the diff for xmlgen.cpp: $ diff -u original/xmlgen.cpp patched/xmlgen.cpp --- original/xmlgen.cpp 2003-09-20 14:09:24.000000000 +0100 +++ patched/xmlgen.cpp 2003-09-23 17:25:52.000000000 +0100 @@ -1249,9 +1249,11 @@ t << " <detaileddescription>" << endl; writeXMLDocBlock(t,fd->docFile(),fd->docLine(),fd,0,fd->documentation()); t << " </detaileddescription>" << endl; - t << " <programlisting>" << endl; - writeXMLCodeBlock(t,fd); - t << " </programlisting>" << endl; + if (Config_getBool("XML_PROGRAMLISTING")) { + t << " <programlisting>" << endl; + writeXMLCodeBlock(t,fd); + t << " </programlisting>" << endl; + } t << " <location file=\"" << fd->getDefFileName() << "\"/>" << endl; t << " </compounddef>" << endl; t << "</doxygen>" << endl; Best regards, Paul Ross ********************************************************************** Symbian Ltd is a company registered in England and Wales with registered number 01796587 and registered office at 19 Harcourt Street, London, W1H 4HF, UK. This message is intended only for use by the named addressee and may contain privileged and/or confidential information. If you are not the named addressee you should not disseminate, copy or take any action in reliance on it. If you have received this message in error please notify pos...@sy... and delete the message and any attachments accompanying it immediately. Symbian does not accept liability for any corruption, interception, amendment, tampering or viruses occurring to this message in transit or for any message sent by its employees which is not in compliance with Symbian corporate policy. ********************************************************************** |