Commit 41e1827f authored by Dimitri van Heesch's avatar Dimitri van Heesch

Release-1.2.4-20010121

parent 583cc329
# Doxyfile 1.2.3-20001126
#---------------------------------------------------------------------------
# General configuration options
#---------------------------------------------------------------------------
PROJECT_NAME = Doxygen
PROJECT_NUMBER =
OUTPUT_DIRECTORY = doxygen_docs
OUTPUT_LANGUAGE = English
EXTRACT_ALL = YES
EXTRACT_PRIVATE = YES
EXTRACT_STATIC = YES
HIDE_UNDOC_MEMBERS = NO
HIDE_UNDOC_CLASSES = NO
BRIEF_MEMBER_DESC = YES
REPEAT_BRIEF = YES
ALWAYS_DETAILED_SEC = NO
FULL_PATH_NAMES = YES
STRIP_FROM_PATH = $(PWD)/
INTERNAL_DOCS = NO
CLASS_DIAGRAMS = YES
SOURCE_BROWSER = YES
INLINE_SOURCES = NO
STRIP_CODE_COMMENTS = YES
CASE_SENSE_NAMES = NO
HIDE_SCOPE_NAMES = NO
VERBATIM_HEADERS = YES
SHOW_INCLUDE_FILES = YES
JAVADOC_AUTOBRIEF = YES
INHERIT_DOCS = YES
INLINE_INFO = YES
SORT_MEMBER_DOCS = YES
DISTRIBUTE_GROUP_DOC = NO
TAB_SIZE = 8
ENABLED_SECTIONS =
GENERATE_TODOLIST = YES
GENERATE_TESTLIST = YES
ALIASES =
#---------------------------------------------------------------------------
# configuration options related to warning and progress messages
#---------------------------------------------------------------------------
QUIET = NO
WARNINGS = YES
WARN_IF_UNDOCUMENTED = YES
WARN_FORMAT = "$file:$line: $text"
WARN_LOGFILE =
#---------------------------------------------------------------------------
# configuration options related to the input files
#---------------------------------------------------------------------------
INPUT = src \
qtools \
$(QTDIR)/src/doc/qarray.doc \
$(QTDIR)/src/doc/qdict.doc \
$(QTDIR)/src/doc/qintdict.doc \
$(QTDIR)/src/doc/qlist.doc \
$(QTDIR)/src/doc/qptrdict.doc \
$(QTDIR)/src/doc/qsortedlist.doc \
$(QTDIR)/src/doc/qstack.doc \
$(QTDIR)/src/doc/qstrlist.doc \
$(QTDIR)/src/doc/qvector.doc \
$(QTDIR)/src/doc/qvaluelist.doc \
$(QTDIR)/src/doc/qtl.doc
FILE_PATTERNS = *.h \
*.cpp \
q*.doc
RECURSIVE = NO
EXCLUDE = src/code.cpp \
src/config.cpp \
src/ce_lex.cpp \
src/ce_parse.cpp \
src/declinfo.cpp \
src/defargs.cpp \
src/doxytag.cpp \
src/pre.cpp \
src/scanner.cpp \
src/tag.cpp \
src/doc.cpp \
src/logos.cpp
EXCLUDE_PATTERNS =
EXAMPLE_PATH =
EXAMPLE_PATTERNS =
IMAGE_PATH =
INPUT_FILTER =
FILTER_SOURCE_FILES = NO
#---------------------------------------------------------------------------
# configuration options related to the alphabetical class index
#---------------------------------------------------------------------------
ALPHABETICAL_INDEX = YES
COLS_IN_ALPHA_INDEX = 5
IGNORE_PREFIX =
#---------------------------------------------------------------------------
# configuration options related to the HTML output
#---------------------------------------------------------------------------
GENERATE_HTML = YES
HTML_OUTPUT =
HTML_HEADER =
HTML_FOOTER =
HTML_STYLESHEET =
HTML_ALIGN_MEMBERS = YES
GENERATE_HTMLHELP = NO
DISABLE_INDEX = NO
ENUM_VALUES_PER_LINE = 4
GENERATE_TREEVIEW = YES
TREEVIEW_WIDTH = 250
#---------------------------------------------------------------------------
# configuration options related to the LaTeX output
#---------------------------------------------------------------------------
GENERATE_LATEX = NO
LATEX_OUTPUT =
COMPACT_LATEX = NO
PAPER_TYPE = a4wide
EXTRA_PACKAGES =
LATEX_HEADER =
PDF_HYPERLINKS = NO
USE_PDFLATEX = NO
LATEX_BATCHMODE = NO
#---------------------------------------------------------------------------
# configuration options related to the RTF output
#---------------------------------------------------------------------------
GENERATE_RTF = NO
RTF_OUTPUT =
COMPACT_RTF = NO
RTF_HYPERLINKS = NO
RTF_STYLESHEET_FILE =
#---------------------------------------------------------------------------
# configuration options related to the man page output
#---------------------------------------------------------------------------
GENERATE_MAN = NO
MAN_OUTPUT =
MAN_EXTENSION = .3
#---------------------------------------------------------------------------
# configuration options related to the XML output
#---------------------------------------------------------------------------
GENERATE_XML = NO
#---------------------------------------------------------------------------
# Configuration options related to the preprocessor
#---------------------------------------------------------------------------
ENABLE_PREPROCESSING = YES
MACRO_EXPANSION = YES
EXPAND_ONLY_PREDEF = YES
SEARCH_INCLUDES = YES
INCLUDE_PATH =
INCLUDE_FILE_PATTERNS =
PREDEFINED =
EXPAND_AS_DEFINED =
#---------------------------------------------------------------------------
# Configuration::addtions related to external references
#---------------------------------------------------------------------------
TAGFILES =
GENERATE_TAGFILE =
ALLEXTERNALS = NO
PERL_PATH = /usr/bin/perl
#---------------------------------------------------------------------------
# Configuration options related to the dot tool
#---------------------------------------------------------------------------
HAVE_DOT = YES
CLASS_GRAPH = YES
COLLABORATION_GRAPH = YES
INCLUDE_GRAPH = YES
INCLUDED_BY_GRAPH = NO
GRAPHICAL_HIERARCHY = YES
DOT_PATH =
MAX_DOT_GRAPH_WIDTH = 2048
MAX_DOT_GRAPH_HEIGHT = 2048
GENERATE_LEGEND = YES
#---------------------------------------------------------------------------
# Configuration::addtions related to the search engine
#---------------------------------------------------------------------------
SEARCHENGINE = NO
CGI_NAME = search.cgi
CGI_URL =
DOC_URL =
DOC_ABSPATH =
BIN_ABSPATH = /usr/local/bin/
EXT_DOC_PATHS =
DOXYGEN Version 1.2.4-20010107 DOXYGEN Version 1.2.4-20010121
Please read the installation section of the manual for instructions. Please read the installation section of the manual for instructions.
-------- --------
Dimitri van Heesch (07 January 2001) Dimitri van Heesch (21 January 2001)
all: src/version.cpp configgen doxywizard #all: src/version.cpp configgen doxywizard
cd qtools ; $(MAKE) # cd qtools ; $(MAKE)
cd src ; $(MAKE) # cd src ; $(MAKE)
clean: FORCE clean: FORCE
cd examples ; $(MAKE) clean cd examples ; $(MAKE) clean
...@@ -11,6 +11,7 @@ clean: FORCE ...@@ -11,6 +11,7 @@ clean: FORCE
cd addon/configgen ; $(MAKE) clean cd addon/configgen ; $(MAKE) clean
cd addon/doxywizard ; $(MAKE) clean cd addon/doxywizard ; $(MAKE) clean
cd addon/xmlread ; $(MAKE) clean cd addon/xmlread ; $(MAKE) clean
cd addon/xmlgen ; $(MAKE) clean
-rm -f bin/doxy* -rm -f bin/doxy*
-rm -f objects/*.o -rm -f objects/*.o
...@@ -18,13 +19,17 @@ distclean: clean ...@@ -18,13 +19,17 @@ distclean: clean
cd src ; $(MAKE) distclean cd src ; $(MAKE) distclean
cd addon/configgen ; $(MAKE) distclean cd addon/configgen ; $(MAKE) distclean
cd addon/doxywizard ; $(MAKE) distclean cd addon/doxywizard ; $(MAKE) distclean
cd addon/xmlread ; $(MAKE) distclean
cd addon/xmlgen ; $(MAKE) distclean
-rm -f lib/lib*
-rm -f bin/doxy* -rm -f bin/doxy*
-rm -f html -rm -f html
-rm -f objects/*.o -rm -f objects/*.o
-rm -f src/Makefile.doxygen src/Makefile.doxytag src/Makefile.doxysearch qtools/Makefile.qtools -rm -f src/Makefile.doxygen src/Makefile.libdoxygen src/Makefile.doxytag
-rm -f src/Makefile.doxysearch qtools/Makefile.qtools
-rm -f Makefile qtools/Makefile src/Makefile examples/Makefile doc/Makefile -rm -f Makefile qtools/Makefile src/Makefile examples/Makefile doc/Makefile
-rm -f .makeconfig .tmakeconfig -rm -f .makeconfig .tmakeconfig
-rm -f src/doxygen.pro src/doxytag.pro src/doxysearch.pro qtools/qtools.pro -rm -f src/doxygen.pro src/libdoxygen.pro src/doxytag.pro src/doxysearch.pro qtools/qtools.pro
-rm -f src/version.cpp -rm -f src/version.cpp
-rm -r addon/configgen/Makefile addon/doxywizard/Makefile -rm -r addon/configgen/Makefile addon/doxywizard/Makefile
-rm -f addon/configgen/Makefile.configgen -rm -f addon/configgen/Makefile.configgen
...@@ -36,6 +41,9 @@ distclean: clean ...@@ -36,6 +41,9 @@ distclean: clean
-rm -f addon/xmlread/xmlread.pro -rm -f addon/xmlread/xmlread.pro
-rm -f addon/xmlread/Makefile addon/xmlread/Makefile.xmlread -rm -f addon/xmlread/Makefile addon/xmlread/Makefile.xmlread
-rm -f addon/xmlread/*.o -rm -f addon/xmlread/*.o
-rm -f addon/xmlgen/xmlgen.pro
-rm -f addon/xmlgen/Makefile addon/xmlgen/Makefile.xmlgen
-rm -f addon/xmlgen/*.o
install: doxywizard_install install: doxywizard_install
$(INSTTOOL) -d $(INSTALL)/bin $(INSTTOOL) -d $(INSTALL)/bin
...@@ -68,7 +76,7 @@ pdf: docs ...@@ -68,7 +76,7 @@ pdf: docs
cd latex ; $(MAKE) cd latex ; $(MAKE)
archive: clean archive: clean
tar zcvf dx`date +%y%m%d`.tgz addon tmake doc wintools examples bin objects \ tar zcvf dx`date +%y%m%d`.tgz Doxyfile addon tmake doc wintools examples bin lib objects \
qtools src configure configure.bin Makefile.in Makefile.win_nmake.in \ qtools src configure configure.bin Makefile.in Makefile.win_nmake.in \
Makefile.win_make.in INSTALL make.bat LANGUAGE.HOWTO LICENSE PLATFORMS \ Makefile.win_make.in INSTALL make.bat LANGUAGE.HOWTO LICENSE PLATFORMS \
VERSION packages VERSION packages
......
...@@ -10,11 +10,12 @@ clean: ...@@ -10,11 +10,12 @@ clean:
-del objects\*.o -del objects\*.o
distclean: clean distclean: clean
-del src\Makefile.doxygen \ -del src\Makefile.libdoxygen \
src\Makefile.doxygen \
src\Makefile.doxytag \ src\Makefile.doxytag \
src\Makefile.doxysearch src\Makefile.doxysearch
-del Makefile src\Makefile examples\Makefile doc\Makefile -del Makefile src\Makefile examples\Makefile doc\Makefile
-del src\doxygen.pro src\doxytag.pro src\doxysearch.pro -del src\libdoxygen.pro src\doxygen.pro src\doxytag.pro src\doxysearch.pro
-del src\version.cpp -del src\version.cpp
docs: docs:
......
...@@ -20,11 +20,12 @@ clean: FORCE ...@@ -20,11 +20,12 @@ clean: FORCE
-del objects\*.o -del objects\*.o
distclean: clean distclean: clean
-del src\Makefile.doxygen \ -del src\Makefile.libdoxygen \
src\Makefile.doxygen \
src\Makefile.doxytag \ src\Makefile.doxytag \
src\Makefile.doxysearch src\Makefile.doxysearch
-del Makefile src\Makefile examples\Makefile doc\Makefile -del Makefile src\Makefile examples\Makefile doc\Makefile
-del src\doxygen.pro src\doxytag.pro src\doxysearch.pro -del src\libdoxygen.pro src\doxygen.pro src\doxytag.pro src\doxysearch.pro
-del src\version.cpp -del src\version.cpp
docs: FORCE docs: FORCE
......
DOXYGEN Version 1.2.4-20010107 DOXYGEN Version 1.2.4-20010121
Please read INSTALL for compilation instructions. Please read INSTALL for compilation instructions.
...@@ -7,4 +7,4 @@ The latest version of doxygen can be obtained at ...@@ -7,4 +7,4 @@ The latest version of doxygen can be obtained at
Enjoy, Enjoy,
Dimitri van Heesch (07 January 2001) Dimitri van Heesch (21 January 2001)
1.2.4-20010107 1.2.4-20010121
...@@ -695,95 +695,6 @@ void checkConfig() ...@@ -695,95 +695,6 @@ void checkConfig()
#endif #endif
} }
// Test to see if output directory is valid
if (Config::outputDir.isEmpty())
Config::outputDir=QDir::currentDirPath();
else
{
QDir dir(Config::outputDir);
if (!dir.exists())
{
dir.setPath(QDir::currentDirPath());
if (!dir.mkdir(Config::outputDir))
{
err("Error: tag OUTPUT_DIRECTORY: Output directory `%s' does not "
"exist and cannot be created\n",Config::outputDir.data());
exit(1);
}
else if (!Config::quietFlag)
{
err("Notice: Output directory `%s' does not exist. "
"I have created it for you.\n", Config::outputDir.data());
}
dir.cd(Config::outputDir);
}
Config::outputDir=dir.absPath();
}
if (Config::htmlOutputDir.isEmpty() && Config::generateHtml)
{
Config::htmlOutputDir=Config::outputDir+"/html";
}
else if (Config::htmlOutputDir && Config::htmlOutputDir[0]!='/')
{
Config::htmlOutputDir.prepend(Config::outputDir+'/');
}
QDir htmlDir(Config::htmlOutputDir);
if (Config::generateHtml && !htmlDir.exists() &&
!htmlDir.mkdir(Config::htmlOutputDir))
{
err("Could not create output directory %s\n",Config::htmlOutputDir.data());
exit(1);
}
if (Config::latexOutputDir.isEmpty() && Config::generateLatex)
{
Config::latexOutputDir=Config::outputDir+"/latex";
}
else if (Config::latexOutputDir && Config::latexOutputDir[0]!='/')
{
Config::latexOutputDir.prepend(Config::outputDir+'/');
}
QDir latexDir(Config::latexOutputDir);
if (Config::generateLatex && !latexDir.exists() &&
!latexDir.mkdir(Config::latexOutputDir))
{
err("Could not create output directory %s\n",Config::latexOutputDir.data());
exit(1);
}
if (Config::rtfOutputDir.isEmpty() && Config::generateRTF)
{
Config::rtfOutputDir=Config::outputDir+"/rtf";
}
else if (Config::rtfOutputDir && Config::rtfOutputDir[0]!='/')
{
Config::rtfOutputDir.prepend(Config::outputDir+'/');
}
QDir rtfDir(Config::rtfOutputDir);
if (Config::generateRTF && !rtfDir.exists() &&
!rtfDir.mkdir(Config::rtfOutputDir))
{
err("Could not create output directory %s\n",Config::rtfOutputDir.data());
exit(1);
}
if (Config::manOutputDir.isEmpty() && Config::generateMan)
{
Config::manOutputDir=Config::outputDir+"/man";
}
else if (Config::manOutputDir && Config::manOutputDir[0]!='/')
{
Config::manOutputDir.prepend(Config::outputDir+'/');
}
QDir manDir(Config::manOutputDir);
if (Config::generateMan && !manDir.exists() &&
!manDir.mkdir(Config::manOutputDir))
{
err("Could not create output directory %s\n",Config::manOutputDir.data());
exit(1);
}
// expand the relative stripFromPath values // expand the relative stripFromPath values
char *sfp = Config::stripFromPath.first(); char *sfp = Config::stripFromPath.first();
while (sfp) while (sfp)
......
...@@ -1509,17 +1509,17 @@ void init() ...@@ -1509,17 +1509,17 @@ void init()
); );
addDependency("manExtension","generateMan"); addDependency("manExtension","generateMan");
//----------------------------------------------------------------------------------------------- //-----------------------------------------------------------------------------------------------
ConfigInfo::add( "XML","configuration options related to the XML output"); //ConfigInfo::add( "XML","configuration options related to the XML output");
//----------------------------------------------------------------------------------------------- //-----------------------------------------------------------------------------------------------
ConfigBool::add( "generateXML", //ConfigBool::add( "generateXML",
"GENERATE_XML", // "GENERATE_XML",
"FALSE", // "FALSE",
"generate XML output", // "generate XML output",
"If the GENERATE_XML tag is set to YES Doxygen will \n" // "If the GENERATE_XML tag is set to YES Doxygen will \n"
"generate an XML file that captures the structure of \n" // "generate an XML file that captures the structure of \n"
"the code including all documentation. Warning: This feature \n" // "the code including all documentation. Warning: This feature \n"
"is still experimental and very incomplete.\n" // "is still experimental and very incomplete.\n"
); // );
//----------------------------------------------------------------------------------------------- //-----------------------------------------------------------------------------------------------
ConfigInfo::add( "Preprocessor","Configuration options related to the preprocessor "); ConfigInfo::add( "Preprocessor","Configuration options related to the preprocessor ");
//----------------------------------------------------------------------------------------------- //-----------------------------------------------------------------------------------------------
......
all clean depend: Makefile.xmlgen
$(MAKE) -f Makefile.xmlgen $@
distclean: clean
$(RM) -f Makefile.xmlgen
tmake:
export TMAKEPATH=$(TMAKEPATH) ; $(PERL) $(TMAKE) xmlgen.pro >Makefile.xmlgen
Makefile.xmlgen: xmlgen.pro
export TMAKEPATH=$(TMAKEPATH) ; $(PERL) $(TMAKE) xmlgen.pro >Makefile.xmlgen
/******************************************************************************
*
* $Id$
*
*
* Copyright (C) 1997-2001 by Dimitri van Heesch.
*
* Permission to use, copy, modify, and distribute this software and its
* documentation under the terms of the GNU General Public License is hereby
* granted. No representations are made about the suitability of this software
* for any purpose. It is provided "as is" without express or implied warranty.
* See the GNU General Public License for more details.
*
* Documents produced by Doxygen are derivative works derived from the
* input used in their production; they are not affected by this license.
*
*/
#include "doxygen.h"
#include "message.h"
#include "xml.h"
/*! \file
* \brief main entry point for doxygen's XML generator
*
* This file contains main()
*/
/*! Main that generate XML output
*
*/
int main(int argc,char **argv)
{
initDoxygen();
readConfiguration(argc,argv);
parseInput();
msg("Generating XML output\n");
generateXML();
return 0;
}
/******************************************************************************
*
* $Id$
*
*
* Copyright (C) 1997-2001 by Dimitri van Heesch.
*
* Permission to use, copy, modify, and distribute this software and its
* documentation under the terms of the GNU General Public License is hereby
* granted. No representations are made about the suitability of this software
* for any purpose. It is provided "as is" without express or implied warranty.
* See the GNU General Public License for more details.
*
* Documents produced by Doxygen are derivative works derived from the
* input used in their production; they are not affected by this license.
*
*/
#include "qtbc.h"
#include "xml.h"
#include "doxygen.h"
#include "message.h"
#include "config.h"
#include "classlist.h"
#include "util.h"
#include "defargs.h"
#include <qdir.h>
#include <qfile.h>
#include <qtextstream.h>
const char dtd_data[]=
#include "xml_dtd.h"
;
class TextGeneratorXMLImpl : public TextGeneratorIntf
{
public:
TextGeneratorXMLImpl(QTextStream &t): m_t(t) {}
void writeString(const char *s) const
{
writeXMLString(m_t,s);
}
void writeBreak() const {}
void writeLink(const char *extRef,const char *file,
const char *anchor,const char *text
) const
{
if (extRef==0)
{ writeXMLLink(m_t,file,anchor,text); }
else // external references are not supported for XML
{ writeXMLString(m_t,text); }
}
private:
QTextStream &m_t;
};
void generateDTD()
{
QCString fileName=Config::outputDir+"/xml/doxygen.dtd";
QFile f(fileName);
if (!f.open(IO_WriteOnly))
{
err("Cannot open file %s for writing!\n",fileName.data());
return;
}
QTextStream t(&f);
t << dtd_data;
}
void writeXMLString(QTextStream &t,const char *s)
{
t << convertToXML(s);
}
void writeXMLLink(QTextStream &t,const char *compoundId,const char *memId,
const char *text)
{
if (memId==0)
{
t << "<compoundref idref=\"" << compoundId << "\">";
writeXMLString(t,text);
t << "</compoundref>";
}
else
{
t << "<memberref idref=\"" << compoundId << ":" << memId << "\">";
writeXMLString(t,text);
t << "</memberref>";
}
}
void generateXMLForMember(MemberDef *md,QTextStream &t,Definition *def)
{
if (md->memberType()==MemberDef::EnumValue) return;
QCString scopeName;
if (md->getClassDef())
scopeName=md->getClassDef()->name();
else if (md->getNamespaceDef())
scopeName=md->getNamespaceDef()->name();
t << " <";
enum { define_t,variable_t,typedef_t,enum_t,function_t } xmlType = function_t;
switch (md->memberType())
{
case MemberDef::Define: t << "definedef"; xmlType=define_t; break;
case MemberDef::EnumValue: // fall through
case MemberDef::Property: // fall through
case MemberDef::Variable: t << "variabledef"; xmlType=variable_t; break;
case MemberDef::Typedef: t << "typedef"; xmlType=typedef_t; break;
case MemberDef::Enumeration: t << "enumdef"; xmlType=enum_t; break;
case MemberDef::Function: // fall through
case MemberDef::Signal: // fall through
case MemberDef::Prototype: // fall through
case MemberDef::Friend: // fall through
case MemberDef::DCOP: // fall through
case MemberDef::Slot: t << "functiondef"; xmlType=function_t; break;
}
t << " id=\"";
t << def->getOutputFileBase()
<< "__" // can we change this to a non ID char?
// : do not seem allowed for some parsers!
<< md->anchor();
t << "\"";
if (xmlType==function_t && md->virtualness()!=Normal)
// functions has an extra "virt" attribute
{
t << " virt=\"";
switch (md->virtualness())
{
case Virtual: t << "virtual"; break;
case Pure: t << "pure-virtual"; break;
default: ASSERT(0);
}
t << "\"";
}
t << ">" << endl;
if (xmlType!=define_t && xmlType!=enum_t && // These don't have types.
(xmlType!=function_t || md->typeString()!=0) // Type is optional here.
)
{
QCString typeStr = replaceAnonymousScopes(md->typeString());
if (xmlType==typedef_t && typeStr.left(8)=="typedef ")
typeStr=typeStr.right(typeStr.length()-8);
if (xmlType==function_t && typeStr.left(8)=="virtual ")
typeStr=typeStr.right(typeStr.length()-8);
t << " <type>";
linkifyText(TextGeneratorXMLImpl(t),scopeName,md->name(),typeStr);
t << "</type>" << endl;
}
t << " <name>";
writeXMLString(t,md->name());
t << "</name>" << endl;
if (xmlType==function_t) //function
{
t << " <paramlist>" << endl;
ArgumentList *declAl = new ArgumentList;
ArgumentList *defAl = md->argumentList();
stringToArgumentList(md->argsString(),declAl);
if (declAl->count()>0)
{
ArgumentListIterator declAli(*declAl);
ArgumentListIterator defAli(*defAl);
Argument *a;
for (declAli.toFirst();(a=declAli.current());++declAli)
{
Argument *defArg = defAli.current();
t << " <param>" << endl;
if (!a->attrib.isEmpty())
{
t << " <attributes>";
writeXMLString(t,a->attrib);
t << "</attributes>" << endl;
}
if (!a->type.isEmpty())
{
t << " <type>";
linkifyText(TextGeneratorXMLImpl(t),scopeName,md->name(),a->type);
t << "</type>" << endl;
}
if (!a->name.isEmpty())
{
t << " <declname>";
writeXMLString(t,a->name);
t << "</declname>" << endl;
}
if (defArg && !defArg->name.isEmpty() && defArg->name!=a->name)
{
t << " <defname>";
writeXMLString(t,defArg->name);
t << "</defname>" << endl;
}
if (!a->array.isEmpty())
{
t << " <array>";
writeXMLString(t,a->array);
t << "</array>" << endl;
}
if (!a->defval.isEmpty())
{
t << " <defval>";
linkifyText(TextGeneratorXMLImpl(t),scopeName,md->name(),a->defval);
t << "</defval>" << endl;
}
t << " </param>" << endl;
if (defArg) ++defAli;
}
}
delete declAl;
t << " </paramlist>" << endl;
}
else if (xmlType==define_t && md->argsString()!=0) // define
{
t << " <defparamlist>" << endl;
ArgumentListIterator ali(*md->argumentList());
Argument *a;
for (ali.toFirst();(a=ali.current());++ali)
{
t << " <defarg>" << a->type << "</defarg>" << endl;
}
t << " </defparamlist>" << endl;
if (!md->initializer().isEmpty())
{
t << " <initializer>";
linkifyText(TextGeneratorXMLImpl(t),scopeName,md->name(),md->initializer());
t << "</initializer>" << endl;
}
}
else if (xmlType==enum_t) // enum
{
t << " <enumvaluelist>" << endl;
if (md->enumFieldList())
{
MemberListIterator emli(*md->enumFieldList());
MemberDef *emd;
for (emli.toFirst();(emd=emli.current());++emli)
{
t << " <enumvalue>" << endl;
t << " <name>";
writeXMLString(t,emd->name());
t << "</name>" << endl;
if (!emd->initializer().isEmpty())
{
t << " <initializer>";
writeXMLString(t,emd->initializer());
t << "</initializer>" << endl;
}
t << " </enumvalue>" << endl;
}
}
t << " </enumvaluelist>" << endl;
}
t << " </";
switch (md->memberType())
{
case MemberDef::Define: t << "definedef"; break;
case MemberDef::EnumValue: // fall through
case MemberDef::Property: // fall through
case MemberDef::Variable: t << "variabledef"; break;
case MemberDef::Typedef: t << "typedef"; break;
case MemberDef::Enumeration: t << "enumdef"; break;
case MemberDef::Function: // fall through
case MemberDef::Signal: // fall through
case MemberDef::Prototype: // fall through
case MemberDef::Friend: // fall through
case MemberDef::DCOP: // fall through
case MemberDef::Slot: t << "functiondef"; break;
}
t << ">" << endl;
}
void generateXMLClassSection(ClassDef *cd,QTextStream &t,MemberList *ml,const char *type)
{
if (ml->count()>0)
{
t << " <sectiondef type=\"" << type << "\">" << endl;
t << " <memberlist>" << endl;
MemberListIterator mli(*ml);
MemberDef *md;
for (mli.toFirst();(md=mli.current());++mli)
{
generateXMLForMember(md,t,cd);
}
t << " </memberlist>" << endl;
t << " </sectiondef>" << endl;
}
}
void generateXMLForClass(ClassDef *cd,QTextStream &t)
{
if (cd->name().find('@')!=-1) return; // skip anonymous compounds
t << " <compounddef id=\""
<< cd->getOutputFileBase() << "\" type=\""
<< cd->compoundTypeString() << "\">" << endl;
t << " <compoundname>";
writeXMLString(t,cd->name());
t << "</compoundname>" << endl;
if (cd->baseClasses()->count()>0)
{
t << " <basecompoundlist>" << endl;
BaseClassListIterator bcli(*cd->baseClasses());
BaseClassDef *bcd;
for (bcli.toFirst();(bcd=bcli.current());++bcli)
{
t << " <basecompoundref idref=\""
<< bcd->classDef->getOutputFileBase()
<< "\" prot=\"";
switch (bcd->prot)
{
case Public: t << "public"; break;
case Protected: t << "protected"; break;
case Private: t << "private"; break;
}
t << "\" virt=\"";
switch(bcd->virt)
{
case Normal: t << "non-virtual"; break;
case Virtual: t << "virtual"; break;
case Pure: t <<"pure-virtual"; break;
}
t << "\"/>" << endl;
}
t << " </basecompoundlist>" << endl;
}
if (cd->superClasses()->count()>0)
{
t << " <derivedcompoundlist>" << endl;
BaseClassListIterator bcli(*cd->superClasses());
BaseClassDef *bcd;
for (bcli.toFirst();(bcd=bcli.current());++bcli)
{
t << " <derivedcompoundref idref=\""
<< bcd->classDef->getOutputFileBase()
<< "\" prot=\"";
switch (bcd->prot)
{
case Public: t << "public"; break;
case Protected: t << "protected"; break;
case Private: t << "private"; break;
}
t << "\" virt=\"";
switch(bcd->virt)
{
case Normal: t << "non-virtual"; break;
case Virtual: t << "virtual"; break;
case Pure: t << "pure-virtual"; break;
}
t << "\"/>" << endl;
}
t << " </derivedcompoundlist>" << endl;
}
int numMembers =
cd->pubTypes.count()+cd->pubMembers.count()+cd->pubAttribs.count()+
cd->pubSlots.count()+cd->signals.count()+cd->dcopMethods.count()+
cd->pubStaticMembers.count()+
cd->pubStaticAttribs.count()+cd->proTypes.count()+cd->proMembers.count()+
cd->proAttribs.count()+cd->proSlots.count()+cd->proStaticMembers.count()+
cd->proStaticAttribs.count()+cd->priTypes.count()+cd->priMembers.count()+
cd->priAttribs.count()+cd->priSlots.count()+cd->priStaticMembers.count()+
cd->priStaticAttribs.count()+cd->friends.count()+cd->related.count();
if (numMembers>0)
{
t << " <sectionlist>" << endl;
generateXMLClassSection(cd,t,&cd->pubTypes,"public-type");
generateXMLClassSection(cd,t,&cd->pubMembers,"public-func");
generateXMLClassSection(cd,t,&cd->pubAttribs,"public-attrib");
generateXMLClassSection(cd,t,&cd->pubSlots,"public-slot");
generateXMLClassSection(cd,t,&cd->signals,"signal");
generateXMLClassSection(cd,t,&cd->dcopMethods,"dcop-func");
generateXMLClassSection(cd,t,&cd->properties,"property");
generateXMLClassSection(cd,t,&cd->pubStaticMembers,"public-static-func");
generateXMLClassSection(cd,t,&cd->pubStaticAttribs,"public-static-attrib");
generateXMLClassSection(cd,t,&cd->proTypes,"protected-type");
generateXMLClassSection(cd,t,&cd->proMembers,"protected-func");
generateXMLClassSection(cd,t,&cd->proAttribs,"protected-attrib");
generateXMLClassSection(cd,t,&cd->proSlots,"protected-slot");
generateXMLClassSection(cd,t,&cd->proStaticMembers,"protected-static-func");
generateXMLClassSection(cd,t,&cd->proStaticAttribs,"protected-static-attrib");
generateXMLClassSection(cd,t,&cd->priTypes,"private-type");
generateXMLClassSection(cd,t,&cd->priMembers,"private-func");
generateXMLClassSection(cd,t,&cd->priAttribs,"private-attrib");
generateXMLClassSection(cd,t,&cd->priSlots,"private-slot");
generateXMLClassSection(cd,t,&cd->priStaticMembers,"private-static-func");
generateXMLClassSection(cd,t,&cd->priStaticAttribs,"private-static-attrib");
generateXMLClassSection(cd,t,&cd->friends,"signal");
generateXMLClassSection(cd,t,&cd->related,"related");
t << " </sectionlist>" << endl;
}
t << " </compounddef>" << endl;
}
void generateXMLFileSection(FileDef *fd,QTextStream &t,MemberList *ml,const char *type)
{
if (ml->count()>0)
{
t << " <sectiondef type=\"" << type << "\">" << endl;
t << " <memberlist>" << endl;
MemberListIterator mli(*ml);
MemberDef *md;
for (mli.toFirst();(md=mli.current());++mli)
{
generateXMLForMember(md,t,fd);
}
t << " </memberlist>" << endl;
t << " </sectiondef>" << endl;
}
}
void generateXMLForFile(FileDef *fd,QTextStream &t)
{
t << " <compounddef id=\""
<< fd->getOutputFileBase() << "\" type=\"file\">" << endl;
t << " <compoundname>";
writeXMLString(t,fd->name());
t << "</compoundname>" << endl;
int numMembers = fd->defineMembers.count()+fd->protoMembers.count()+
fd->typedefMembers.count()+fd->enumMembers.count()+
fd->funcMembers.count()+fd->varMembers.count();
if (numMembers>0)
{
t << " <sectionlist>" << endl;
generateXMLFileSection(fd,t,&fd->defineMembers,"define");
generateXMLFileSection(fd,t,&fd->protoMembers,"prototype");
generateXMLFileSection(fd,t,&fd->typedefMembers,"typedef");
generateXMLFileSection(fd,t,&fd->enumMembers,"enum");
generateXMLFileSection(fd,t,&fd->funcMembers,"func");
generateXMLFileSection(fd,t,&fd->varMembers,"var");
t << " </sectionlist>" << endl;
}
t << " </compounddef>" << endl;
}
void generateXML()
{
if (Config::outputDir.isEmpty())
Config::outputDir=QDir::currentDirPath();
else
{
QDir dir(Config::outputDir);
if (!dir.exists())
{
dir.setPath(QDir::currentDirPath());
if (!dir.mkdir(Config::outputDir))
{
err("Error: tag OUTPUT_DIRECTORY: Output directory `%s' does not "
"exist and cannot be created\n",Config::outputDir.data());
exit(1);
}
else if (!Config::quietFlag)
{
err("Notice: Output directory `%s' does not exist. "
"I have created it for you.\n", Config::outputDir.data());
}
dir.cd(Config::outputDir);
}
Config::outputDir=dir.absPath();
}
QDir dir(Config::outputDir);
if (!dir.exists())
{
dir.setPath(QDir::currentDirPath());
if (!dir.mkdir(Config::outputDir))
{
err("Cannot create directory %s\n",Config::outputDir.data());
return;
}
}
QDir xmlDir(Config::outputDir+"/xml");
if (!xmlDir.exists() && !xmlDir.mkdir(Config::outputDir+"/xml"))
{
err("Could not create xml directory in %s\n",Config::outputDir.data());
return;
}
generateDTD();
QCString fileName=Config::outputDir+"/xml/doxygen.xml";
QFile f(fileName);
if (!f.open(IO_WriteOnly))
{
err("Cannot open file %s for writing!\n",fileName.data());
return;
}
QTextStream t(&f);
t << "<?xml version='1.0' encoding='ISO-8859-1' standalone='no'?>" << endl;
t << "<!DOCTYPE doxygen SYSTEM \"doxygen.dtd\">" << endl;
t << "<doxygen>" << endl;
if (Doxygen::classList.count()+Doxygen::inputNameList.count()>0)
{
t << " <compoundlist>" << endl;
ClassListIterator cli(Doxygen::classList);
ClassDef *cd;
for (cli.toFirst();(cd=cli.current());++cli)
{
generateXMLForClass(cd,t);
}
FileNameListIterator fnli(Doxygen::inputNameList);
FileName *fn;
for (;(fn=fnli.current());++fnli)
{
FileNameIterator fni(*fn);
FileDef *fd;
for (;(fd=fni.current());++fni)
{
generateXMLForFile(fd,t);
}
}
t << " </compoundlist>" << endl;
}
t << "</doxygen>" << endl;
}
/****************************************************************************** /******************************************************************************
* *
* * $Id$
* *
* Copyright (C) 1997-2001 by Dimitri van Heesch. * Copyright (C) 1997-2001 by Dimitri van Heesch.
* *
......
TEMPLATE = xmlgen.t
CONFIG = console warn_on $extraopt
HEADERS = xml.h xml_dtd.h
SOURCES = main.cpp xml.cpp
DEPENDPATH = ../../src
unix:LIBS += -L../../lib -ldoxygen -lqtools
win32:INCLUDEPATH += .
win32-mingw:LIBS += -L../../lib -ldoxygen -lqtools
win32-msvc:LIBS += qtools.lib doxygen.lib shell32.lib
win32-msvc:TMAKE_LFLAGS += /LIBPATH:..\..\lib
win32-borland:LIBS += qtools.lib doxygen.lib shell32.lib
win32-borland:TMAKE_LFLAGS += -L..\..\lib
win32:TMAKE_CXXFLAGS += -DQT_NODLL
INCLUDEPATH += ../../qtools ../../src
DESTDIR = ../../bin
TARGET = doxygen_xml
unix:TARGETDEPS = ../../lib/libdoxygen.a
win32:TARGETDEPS = ..\..\lib\doxygen.lib
OBJECTS_DIR = obj
#
# $Id$
#
# Copyright (C) 1997-2001 by Dimitri van Heesch.
#
# Permission to use, copy, modify, and distribute this software and its
# documentation under the terms of the GNU General Public License is hereby
# granted. No representations are made about the suitability of this software
# for any purpose. It is provided "as is" without express or implied warranty.
# See the GNU General Public License for more details.
#
# Documents produced by Doxygen are derivative works derived from the
# input used in their production; they are not affected by this license.
#!
#! doxygen.t: This is a custom template for building Doxygen
#!
#$ IncludeTemplate("app.t");
xml_dtd.h: doxygen.dtd
cat doxygen.dtd | sed -e "s/\"/\\\\\"/g" -e "s/^/\"/g" -e "s/$$/\\\\n\"/g" >xml_dtd.h
...@@ -28,6 +28,7 @@ f_insttool=install ...@@ -28,6 +28,7 @@ f_insttool=install
f_english=NO f_english=NO
f_configgen=NO f_configgen=NO
f_wizard=NO f_wizard=NO
f_xmlgen=NO
while test -n "$1"; do while test -n "$1"; do
case $1 in case $1 in
...@@ -70,6 +71,9 @@ while test -n "$1"; do ...@@ -70,6 +71,9 @@ while test -n "$1"; do
--with-doxywizard) --with-doxywizard)
f_wizard=YES f_wizard=YES
;; ;;
--with-xmlgen)
f_xmlgen=YES
;;
-h | -help | --help) -h | -help | --help)
f_help=y f_help=y
;; ;;
...@@ -87,7 +91,7 @@ if test "$f_help" = y; then ...@@ -87,7 +91,7 @@ if test "$f_help" = y; then
Usage: $0 [--help] [--shared] [--static] [--release] [--debug] Usage: $0 [--help] [--shared] [--static] [--release] [--debug]
[--perl name] [--make name] [--dot name] [--platform target] [--perl name] [--make name] [--dot name] [--platform target]
[--prefix dir] [--install name] [--english-only] [--prefix dir] [--install name] [--english-only]
[--with-configgen] [--with-doxywizard] [--with-configgen] [--with-doxywizard] [--with-xmlgen]
Options: Options:
...@@ -127,6 +131,9 @@ Options: ...@@ -127,6 +131,9 @@ Options:
--with-doxywizard Build the GUI frontend for doxygen. This --with-doxywizard Build the GUI frontend for doxygen. This
requires Qt 2.x.x requires Qt 2.x.x
--with-xmlgen Builds a separate doxygen executable that
generates XML output.
EOF EOF
test "$f_error" = y && exit 1 test "$f_error" = y && exit 1
exit 0; exit 0;
...@@ -373,7 +380,7 @@ TMAKE_CXXFLAGS += -DENGLISH_ONLY ...@@ -373,7 +380,7 @@ TMAKE_CXXFLAGS += -DENGLISH_ONLY
EOF EOF
fi fi
f_inmakefiles="Makefile.in qtools/Makefile.in src/Makefile.in examples/Makefile.in doc/Makefile.in addon/configgen/Makefile.in addon/doxywizard/Makefile.in addon/xmlread/Makefile.in" f_inmakefiles="Makefile.in addon/xmlgen/Makefile.in qtools/Makefile.in src/Makefile.in examples/Makefile.in doc/Makefile.in addon/configgen/Makefile.in addon/doxywizard/Makefile.in addon/xmlread/Makefile.in"
for i in $f_inmakefiles ; do for i in $f_inmakefiles ; do
SRC=$i SRC=$i
...@@ -385,25 +392,32 @@ for i in $f_inmakefiles ; do ...@@ -385,25 +392,32 @@ for i in $f_inmakefiles ; do
# #
EOF EOF
cat .makeconfig $SRC >> $DST cat .makeconfig >> $DST
if test $i = Makefile.in; then if test $i = Makefile.in; then
echo "configgen:" >> $DST echo "" >> $DST
echo "all: src/version.cpp " >> $DST
echo " \$(MAKE) -C qtools" >> $DST
echo " \$(MAKE) -C src" >> $DST
if test $f_configgen = YES; then if test $f_configgen = YES; then
echo " \$(MAKE) -C addon/configgen" >> $DST echo " \$(MAKE) -C addon/configgen" >> $DST
fi fi
echo "doxywizard:" >> $DST
if test $f_wizard = YES; then if test $f_wizard = YES; then
echo " \$(MAKE) -C addon/doxywizard" >> $DST echo " \$(MAKE) -C addon/doxywizard" >> $DST
fi fi
if test $f_xmlgen = YES; then
echo " \$(MAKE) -C addon/xmlgen" >> $DST
fi
echo "" >> $DST
echo "doxywizard_install:" >> $DST echo "doxywizard_install:" >> $DST
if test $f_wizard = YES; then if test $f_wizard = YES; then
echo " \$(MAKE) -C addon/doxywizard install" >> $DST echo " \$(MAKE) -C addon/doxywizard install" >> $DST
fi fi
fi fi
cat $SRC >> $DST
echo " Created $DST from $SRC..." echo " Created $DST from $SRC..."
done done
f_inprofiles="qtools/qtools.pro.in src/doxygen.pro.in src/doxytag.pro.in src/doxysearch.pro.in addon/configgen/configgen.pro.in addon/doxywizard/doxywizard.pro.in addon/xmlread/xmlread.pro.in" f_inprofiles="qtools/qtools.pro.in src/libdoxygen.pro.in src/doxygen.pro.in src/doxytag.pro.in src/doxysearch.pro.in addon/configgen/configgen.pro.in addon/doxywizard/doxywizard.pro.in addon/xmlread/xmlread.pro.in addon/xmlgen/xmlgen.pro.in"
for i in $f_inprofiles ; do for i in $f_inprofiles ; do
SRC=$i SRC=$i
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
<li>Requires very little overhead from the writer of the documentation. <li>Requires very little overhead from the writer of the documentation.
Plain text will do, but for more fancy or structured output HTML tags Plain text will do, but for more fancy or structured output HTML tags
and/or some of doxygen's special commands can be used. and/or some of doxygen's special commands can be used.
<li>Supports C++, (Corba, Microsoft, and KDE-DCOP) IDL and C sources. <li>Supports C++, (Corba, Microsoft, and KDE-DCOP) Java, IDL and C sources.
<li>Supports documentation of files, namespaces, classes, structs, unions, <li>Supports documentation of files, namespaces, classes, structs, unions,
templates, variables, functions, typedefs, enums and defines. templates, variables, functions, typedefs, enums and defines.
<li>JavaDoc (1.1), Qt-Doc, and KDOC compatible. <li>JavaDoc (1.1), Qt-Doc, and KDOC compatible.
......
...@@ -49,8 +49,8 @@ documentation. Note that all attributes of a HTML tag are ignored ...@@ -49,8 +49,8 @@ documentation. Note that all attributes of a HTML tag are ignored
<li>\c </H1> Ends an unnumberd section. <li>\c </H1> Ends an unnumberd section.
<li>\c <H2> Starts an unnumbered subsection. <li>\c <H2> Starts an unnumbered subsection.
<li>\c </H2> Ends an unnumbered subsection. <li>\c </H2> Ends an unnumbered subsection.
<li>\c <H?> Where ? is one of {3,4,5,6}, starts an unnumbered subsubsection. <li>\c <H?> Where ? is one of {3,4,5,6}, starts an unnumbered subsubsection using \c <H3> in HTML.
<li>\c </H?> Where ? is one of {3,4,5,6}, ends an unnumbered subsubsection. <li>\c </H?> Where ? is one of {3,4,5,6}, ends an unnumbered subsubsection using \c <H3> in HTML.
<li>\c <I> Starts a piece of text displayed in an italic font. <li>\c <I> Starts a piece of text displayed in an italic font.
<li>\c <INPUT> Does not generated any output. <li>\c <INPUT> Does not generated any output.
<li>\c </I> Ends a \c <I> section. <li>\c </I> Ends a \c <I> section.
......
...@@ -45,7 +45,7 @@ Documents produced by Doxygen are derivative works derived from the ...@@ -45,7 +45,7 @@ Documents produced by Doxygen are derivative works derived from the
input used in their production; they are not affected by this license. input used in their production; they are not affected by this license.
<h2>Introduction</h2> <h2>Introduction</h2>
Doxygen is a documentation system for C++, IDL Doxygen is a documentation system for C++, Java, IDL
(Corba, Microsoft and KDE-DCOP flavors) and C. (Corba, Microsoft and KDE-DCOP flavors) and C.
It can help you in three ways: It can help you in three ways:
......
...@@ -78,26 +78,31 @@ If you are trying Doxygen let me know what you think of it (do you ...@@ -78,26 +78,31 @@ If you are trying Doxygen let me know what you think of it (do you
miss certain features?). Even if you decide not to use it, please let me miss certain features?). Even if you decide not to use it, please let me
know why. know why.
Furthermore, I would appreciate a mail if you have found
a bug, or if you have ideas (or even better some code or a patch)
how to fix existing bugs and limitations. For patches please use
"diff -u"
<h2>How to report a bug</h2> <h2>How to report a bug</h2>
If you think you have found a bug in doxygen, please report it so I can I would appreciate an e-mail if you have found
fix it. a bug, or if you have ideas (or even better some code or a patch)
how to fix existing bugs and limitations. For patches please use
"diff -u" or include the files you modified. If you send more than
one file please tar or zip everything, so I only have to save and download
one file.
Always include the following information in your bug report: Always try to include the following information in your bug report:
- The version of doxygen you are using. - The version of doxygen you are using (for instance 1.2.4).
- The name and version number of your operating system - The name and version number of your operating system (for instance
SuSE Linux 6.4)
- It is usually a good idea to send along the configuation file as well,
but please use doxygen with the <code>-s</code> flag while generating it
to keep it small.
- The easiest way for me to solve bugs is if you can send me a small example
demonstrating the problem you have. Please make sure the example is valid
source code (could potentially compile) and that the problem is really
captured by the example (I often get examples that do not trigger the
actual bug!).
The easiest way for me to solve bugs is if you can send me a small example If you send only a (vague) description of a bug, you are usually not very
demonstrating the problem you have. Please make sure the example is valid helpful and will costs me much more time to figure out what you mean.
source code (try compiling it) and if the problem is really captured by In the worst-case your bug report may even be completely ignored by me!
the example.
It is usually a good idea to send along the configuation file as well,
but please use doxygen with the <code>-s</code> flag while generating it.
My e-mail address: <a href="mailto:dimitri@stack.nl">dimitri@stack.nl</a> My e-mail address: <a href="mailto:dimitri@stack.nl">dimitri@stack.nl</a>
*/ */
......
...@@ -29,6 +29,7 @@ type doc\Makefile.win_%MAKE%.in >>doc\Makefile ...@@ -29,6 +29,7 @@ type doc\Makefile.win_%MAKE%.in >>doc\Makefile
REM build in release or debug mode REM build in release or debug mode
type qtools\qtools.pro.in | sed "s/\$extraopts/%MODE%/g" >qtools\qtools.pro type qtools\qtools.pro.in | sed "s/\$extraopts/%MODE%/g" >qtools\qtools.pro
type src\libdoxygen.pro.in | sed "s/\$extraopts/%MODE%/g" >src\libdoxygen.pro
type src\doxygen.pro.in | sed "s/\$extraopts/%MODE%/g" >src\doxygen.pro type src\doxygen.pro.in | sed "s/\$extraopts/%MODE%/g" >src\doxygen.pro
type src\doxytag.pro.in | sed "s/\$extraopts/%MODE%/g" >src\doxytag.pro type src\doxytag.pro.in | sed "s/\$extraopts/%MODE%/g" >src\doxytag.pro
type src\doxysearch.pro.in | sed "s/\$extraopts/%MODE%/g" >src\doxysearch.pro type src\doxysearch.pro.in | sed "s/\$extraopts/%MODE%/g" >src\doxysearch.pro
......
Name: doxygen Name: doxygen
Version: 1.2.4-20010107 Version: 1.2.4-20010121
Summary: documentation system for C, C++ and IDL Summary: documentation system for C, C++ and IDL
Release: 1 Release: 1
Source0: doxygen-%{version}.src.tar.gz Source0: doxygen-%{version}.src.tar.gz
......
...@@ -75,3 +75,4 @@ INCLUDEPATH = . ...@@ -75,3 +75,4 @@ INCLUDEPATH = .
TMAKE_CXXFLAGS = -DQT_NO_CODECS -DQT_LITE_UNICODE TMAKE_CXXFLAGS = -DQT_NO_CODECS -DQT_LITE_UNICODE
win32:TMAKE_CXXFLAGS += -DQT_NODLL win32:TMAKE_CXXFLAGS += -DQT_NODLL
OBJECTS_DIR = ../objects OBJECTS_DIR = ../objects
DESTDIR = ../lib
...@@ -14,12 +14,16 @@ ...@@ -14,12 +14,16 @@
# input used in their production; they are not affected by this license. # input used in their production; they are not affected by this license.
# #
all: Makefile.doxygen Makefile.doxytag Makefile.doxysearch Makefile all: Makefile.libdoxygen Makefile.doxygen Makefile.doxytag Makefile.doxysearch Makefile
$(MAKE) -f Makefile.libdoxygen $@
$(MAKE) -f Makefile.doxygen $@ $(MAKE) -f Makefile.doxygen $@
$(MAKE) -f Makefile.doxytag $@ $(MAKE) -f Makefile.doxytag $@
$(MAKE) -f Makefile.doxysearch $@ $(MAKE) -f Makefile.doxysearch $@
Makefile.doxygen: doxygen.pro doxygen.t Makefile.libdoxygen: libdoxygen.pro libdoxygen.t
$(ENV) $(PERL) $(TMAKE) libdoxygen.pro >Makefile.libdoxygen
Makefile.doxygen: doxygen.pro
$(ENV) $(PERL) $(TMAKE) doxygen.pro >Makefile.doxygen $(ENV) $(PERL) $(TMAKE) doxygen.pro >Makefile.doxygen
Makefile.doxytag: doxytag.pro doxytag.t Makefile.doxytag: doxytag.pro doxytag.t
...@@ -29,11 +33,13 @@ Makefile.doxysearch: doxysearch.pro ...@@ -29,11 +33,13 @@ Makefile.doxysearch: doxysearch.pro
$(ENV) $(PERL) $(TMAKE) doxysearch.pro >Makefile.doxysearch $(ENV) $(PERL) $(TMAKE) doxysearch.pro >Makefile.doxysearch
tmake: tmake:
$(ENV) $(PERL) $(TMAKE) libdoxygen.pro >Makefile.libdoxygen
$(ENV) $(PERL) $(TMAKE) doxygen.pro >Makefile.doxygen $(ENV) $(PERL) $(TMAKE) doxygen.pro >Makefile.doxygen
$(ENV) $(PERL) $(TMAKE) doxytag.pro >Makefile.doxytag $(ENV) $(PERL) $(TMAKE) doxytag.pro >Makefile.doxytag
$(ENV) $(PERL) $(TMAKE) doxysearch.pro >Makefile.doxysearch $(ENV) $(PERL) $(TMAKE) doxysearch.pro >Makefile.doxysearch
clean: Makefile.doxygen Makefile.doxytag Makefile.doxysearch clean: Makefile.libdoxygen Makefile.doxygen Makefile.doxytag Makefile.doxysearch
$(MAKE) -f Makefile.libdoxygen clean
$(MAKE) -f Makefile.doxygen clean $(MAKE) -f Makefile.doxygen clean
$(MAKE) -f Makefile.doxytag clean $(MAKE) -f Makefile.doxytag clean
$(MAKE) -f Makefile.doxysearch clean $(MAKE) -f Makefile.doxysearch clean
......
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
#include "example.h" #include "example.h"
#include "outputlist.h" #include "outputlist.h"
#include "dot.h" #include "dot.h"
#include "xml.h" //#include "xml.h"
static QCString stripExtension(const char *fName) static QCString stripExtension(const char *fName)
{ {
...@@ -155,8 +155,8 @@ void ClassDef::addMemberListToGroup(MemberList *ml) ...@@ -155,8 +155,8 @@ void ClassDef::addMemberListToGroup(MemberList *ml)
int groupId=md->getMemberGroupId(); int groupId=md->getMemberGroupId();
if (groupId!=-1) if (groupId!=-1)
{ {
QCString *pGrpHeader = memberHeaderDict[groupId]; QCString *pGrpHeader = Doxygen::memberHeaderDict[groupId];
QCString *pDocs = memberDocDict[groupId]; QCString *pDocs = Doxygen::memberDocDict[groupId];
if (pGrpHeader) if (pGrpHeader)
{ {
MemberGroup *mg = memberGroupDict->find(groupId); MemberGroup *mg = memberGroupDict->find(groupId);
...@@ -721,10 +721,10 @@ void ClassDef::writeDocumentation(OutputList &ol) ...@@ -721,10 +721,10 @@ void ClassDef::writeDocumentation(OutputList &ol)
if (!Config::genTagFile.isEmpty()) if (!Config::genTagFile.isEmpty())
{ {
tagFile << " <compound kind=\"" << compoundTypeString(); Doxygen::tagFile << " <compound kind=\"" << compoundTypeString();
tagFile << "\">" << endl; Doxygen::tagFile << "\">" << endl;
tagFile << " <name>" << convertToXML(name()) << "</name>" << endl; Doxygen::tagFile << " <name>" << convertToXML(name()) << "</name>" << endl;
tagFile << " <filename>" << convertToXML(fileName) << ".html</filename>" << endl; Doxygen::tagFile << " <filename>" << convertToXML(fileName) << ".html</filename>" << endl;
} }
...@@ -754,20 +754,20 @@ void ClassDef::writeDocumentation(OutputList &ol) ...@@ -754,20 +754,20 @@ void ClassDef::writeDocumentation(OutputList &ol)
{ {
if (!Config::genTagFile.isEmpty()) if (!Config::genTagFile.isEmpty())
{ {
tagFile << " <base"; Doxygen::tagFile << " <base";
if (bcd->prot==Protected) if (bcd->prot==Protected)
{ {
tagFile << " protection=\"protected\""; Doxygen::tagFile << " protection=\"protected\"";
} }
else if (bcd->prot==Private) else if (bcd->prot==Private)
{ {
tagFile << " protection=\"private\""; Doxygen::tagFile << " protection=\"private\"";
} }
if (bcd->virt==Virtual) if (bcd->virt==Virtual)
{ {
tagFile << " virtualness=\"virtual\""; Doxygen::tagFile << " virtualness=\"virtual\"";
} }
tagFile << ">" << convertToXML(cd->name()) << "</base>" << endl; Doxygen::tagFile << ">" << convertToXML(cd->name()) << "</base>" << endl;
} }
ol.writeObjectLink(cd->getReference(),cd->getOutputFileBase(),0,cd->name()+bcd->templSpecifiers); ol.writeObjectLink(cd->getReference(),cd->getOutputFileBase(),0,cd->name()+bcd->templSpecifiers);
} }
...@@ -1121,7 +1121,7 @@ void ClassDef::writeDocumentation(OutputList &ol) ...@@ -1121,7 +1121,7 @@ void ClassDef::writeDocumentation(OutputList &ol)
while (file) while (file)
{ {
bool ambig; bool ambig;
FileDef *fd=findFileDef(inputNameDict,file,ambig); FileDef *fd=findFileDef(Doxygen::inputNameDict,file,ambig);
if (fd) if (fd)
{ {
if (first) if (first)
...@@ -1169,7 +1169,8 @@ void ClassDef::writeDocumentation(OutputList &ol) ...@@ -1169,7 +1169,8 @@ void ClassDef::writeDocumentation(OutputList &ol)
if (!Config::genTagFile.isEmpty()) if (!Config::genTagFile.isEmpty())
{ {
tagFile << " </compound>" << endl; writeDocAnchorsToTagFile();
Doxygen::tagFile << " </compound>" << endl;
} }
endFile(ol); endFile(ol);
...@@ -1254,7 +1255,9 @@ void ClassDef::writeMemberList(OutputList &ol) ...@@ -1254,7 +1255,9 @@ void ClassDef::writeMemberList(OutputList &ol)
// generate link to the class instead. // generate link to the class instead.
{ {
ol.writeListItem(); ol.writeListItem();
ol.writeBoldString(md->name()); ol.startBold();
ol.docify(md->name());
ol.endBold();
if ( md->isFunction() || md->isSignal() || md->isSlot() ) if ( md->isFunction() || md->isSignal() || md->isSlot() )
ol.docify(md->argsString()); ol.docify(md->argsString());
else if (md->isEnumerate()) else if (md->isEnumerate())
...@@ -1271,7 +1274,9 @@ void ClassDef::writeMemberList(OutputList &ol) ...@@ -1271,7 +1274,9 @@ void ClassDef::writeMemberList(OutputList &ol)
} }
else else
{ {
ol.writeBoldString(cd->name()); ol.startBold();
ol.docify(cd->name());
ol.endBold();
} }
ol.writeString(")"); ol.writeString(")");
memberWritten=TRUE; memberWritten=TRUE;
...@@ -1851,126 +1856,6 @@ void ClassDef::determineIntfUsageRelation() ...@@ -1851,126 +1856,6 @@ void ClassDef::determineIntfUsageRelation()
} }
#endif #endif
void ClassDef::generateXMLSection(QTextStream &t,MemberList *ml,const char *type)
{
if (ml->count()>0)
{
t << " <sectiondef type=\"" << type << "\">" << endl;
t << " <memberlist>" << endl;
MemberListIterator mli(*ml);
MemberDef *md;
for (mli.toFirst();(md=mli.current());++mli)
{
md->generateXML(t,this);
}
t << " </memberlist>" << endl;
t << " </sectiondef>" << endl;
}
}
void ClassDef::generateXML(QTextStream &t)
{
if (name().find('@')!=-1) return; // skip anonymous compounds
t << " <compounddef id=\""
<< getOutputFileBase() << "\" type=\""
<< compoundTypeString() << "\">" << endl;
t << " <compoundname>";
writeXMLString(t,name());
t << "</compoundname>" << endl;
if (inherits->count()>0)
{
t << " <basecompoundlist>" << endl;
BaseClassListIterator bcli(*inherits);
BaseClassDef *bcd;
for (bcli.toFirst();(bcd=bcli.current());++bcli)
{
t << " <basecompoundref idref=\""
<< bcd->classDef->getOutputFileBase()
<< "\" prot=\"";
switch (bcd->prot)
{
case Public: t << "public"; break;
case Protected: t << "protected"; break;
case Private: t << "private"; break;
}
t << "\" virt=\"";
switch(bcd->virt)
{
case Normal: t << "non-virtual"; break;
case Virtual: t << "virtual"; break;
case Pure: t <<"pure-virtual"; break;
}
t << "\"/>" << endl;
}
t << " </basecompoundlist>" << endl;
}
if (inheritedBy->count()>0)
{
t << " <derivedcompoundlist>" << endl;
BaseClassListIterator bcli(*inheritedBy);
BaseClassDef *bcd;
for (bcli.toFirst();(bcd=bcli.current());++bcli)
{
t << " <derivedcompoundref idref=\""
<< bcd->classDef->getOutputFileBase()
<< "\" prot=\"";
switch (bcd->prot)
{
case Public: t << "public"; break;
case Protected: t << "protected"; break;
case Private: t << "private"; break;
}
t << "\" virt=\"";
switch(bcd->virt)
{
case Normal: t << "non-virtual"; break;
case Virtual: t << "virtual"; break;
case Pure: t << "pure-virtual"; break;
}
t << "\"/>" << endl;
}
t << " </derivedcompoundlist>" << endl;
}
int numMembers =
pubTypes.count()+pubMembers.count()+pubAttribs.count()+
pubSlots.count()+signals.count()+dcopMethods.count()+
pubStaticMembers.count()+
pubStaticAttribs.count()+proTypes.count()+proMembers.count()+
proAttribs.count()+proSlots.count()+proStaticMembers.count()+
proStaticAttribs.count()+priTypes.count()+priMembers.count()+
priAttribs.count()+priSlots.count()+priStaticMembers.count()+
priStaticAttribs.count()+friends.count()+related.count();
if (numMembers>0)
{
t << " <sectionlist>" << endl;
generateXMLSection(t,&pubTypes,"public-type");
generateXMLSection(t,&pubMembers,"public-func");
generateXMLSection(t,&pubAttribs,"public-attrib");
generateXMLSection(t,&pubSlots,"public-slot");
generateXMLSection(t,&signals,"signal");
generateXMLSection(t,&dcopMethods,"dcop-func");
generateXMLSection(t,&properties,"property");
generateXMLSection(t,&pubStaticMembers,"public-static-func");
generateXMLSection(t,&pubStaticAttribs,"public-static-attrib");
generateXMLSection(t,&proTypes,"protected-type");
generateXMLSection(t,&proMembers,"protected-func");
generateXMLSection(t,&proAttribs,"protected-attrib");
generateXMLSection(t,&proSlots,"protected-slot");
generateXMLSection(t,&proStaticMembers,"protected-static-func");
generateXMLSection(t,&proStaticAttribs,"protected-static-attrib");
generateXMLSection(t,&priTypes,"private-type");
generateXMLSection(t,&priMembers,"private-func");
generateXMLSection(t,&priAttribs,"private-attrib");
generateXMLSection(t,&priSlots,"private-slot");
generateXMLSection(t,&priStaticMembers,"private-static-func");
generateXMLSection(t,&priStaticAttribs,"private-static-attrib");
generateXMLSection(t,&friends,"signal");
generateXMLSection(t,&related,"related");
t << " </sectionlist>" << endl;
}
t << " </compounddef>" << endl;
}
PackageDef *ClassDef::packageDef() const PackageDef *ClassDef::packageDef() const
{ {
return fileDef ? fileDef->packageDef() : 0; return fileDef ? fileDef->packageDef() : 0;
......
...@@ -126,25 +126,11 @@ class ClassDef : public Definition ...@@ -126,25 +126,11 @@ class ClassDef : public Definition
void addMembersToMemberGroup(); void addMembersToMemberGroup();
void distributeMemberGroupDocumentation(); void distributeMemberGroupDocumentation();
void generateXML(QTextStream &t); //void generateXML(QTextStream &t);
void generateXMLSection(QTextStream &t,MemberList *ml,const char *type); //void generateXMLSection(QTextStream &t,MemberList *ml,const char *type);
PackageDef *packageDef() const; PackageDef *packageDef() const;
protected:
void addUsedInterfaceClasses(MemberDef *md,const char *typeStr);
void addMemberListToGroup(MemberList *);
private:
QCString fileName; // HTML containing the class docs
IncludeInfo *incInfo; // header file to refer to
QCString incName; // alternative include file name
QCString memListFileName;
QCString scopelessName; // name without any scopes
BaseClassList *inherits;
BaseClassList *inheritedBy;
NamespaceDef *nspace; // the namespace this class is in
/* member lists by protection */ /* member lists by protection */
MemberList pubMembers; MemberList pubMembers;
MemberList proMembers; MemberList proMembers;
...@@ -180,6 +166,21 @@ class ClassDef : public Definition ...@@ -180,6 +166,21 @@ class ClassDef : public Definition
MemberList variableMembers; MemberList variableMembers;
MemberList propertyMembers; MemberList propertyMembers;
protected:
void addUsedInterfaceClasses(MemberDef *md,const char *typeStr);
void addMemberListToGroup(MemberList *);
private:
QCString fileName; // HTML containing the class docs
IncludeInfo *incInfo; // header file to refer to
QCString incName; // alternative include file name
QCString memListFileName;
QCString scopelessName; // name without any scopes
BaseClassList *inherits;
BaseClassList *inheritedBy;
NamespaceDef *nspace; // the namespace this class is in
/* user defined member groups */ /* user defined member groups */
MemberGroupList *memberGroupList; MemberGroupList *memberGroupList;
MemberGroupDict *memberGroupDict; MemberGroupDict *memberGroupDict;
......
...@@ -80,7 +80,7 @@ void ClassList::writeDeclaration(OutputList &ol,const ClassDef::CompoundType *fi ...@@ -80,7 +80,7 @@ void ClassList::writeDeclaration(OutputList &ol,const ClassDef::CompoundType *fi
} }
if (!Config::genTagFile.isEmpty()) if (!Config::genTagFile.isEmpty())
{ {
tagFile << " <class kind=\"" << cd->compoundTypeString() Doxygen::tagFile << " <class kind=\"" << cd->compoundTypeString()
<< "\">" << convertToXML(cd->name()) << "</class>" << endl; << "\">" << convertToXML(cd->name()) << "</class>" << endl;
} }
ol.startMemberItem(FALSE); ol.startMemberItem(FALSE);
...@@ -102,6 +102,25 @@ void ClassList::writeDeclaration(OutputList &ol,const ClassDef::CompoundType *fi ...@@ -102,6 +102,25 @@ void ClassList::writeDeclaration(OutputList &ol,const ClassDef::CompoundType *fi
ol.endBold(); ol.endBold();
} }
ol.endMemberItem(FALSE); ol.endMemberItem(FALSE);
if (!cd->briefDescription().isEmpty())
{
ol.startMemberDescription();
parseDoc(ol,cd->getDefFileName(),cd->getDefLine(),cd->name(),0,cd->briefDescription());
if ((!cd->briefDescription().isEmpty() && Config::repeatBriefFlag) ||
!cd->documentation().isEmpty())
{
ol.pushGeneratorState();
ol.disableAllBut(OutputGenerator::Html);
ol.endEmphasis();
ol.docify(" ");
ol.startTextLink(cd->getOutputFileBase(),"_details");
parseText(ol,theTranslator->trMore());
ol.endTextLink();
ol.startEmphasis();
ol.popGeneratorState();
}
ol.endMemberDescription();
}
} }
} }
cd=next(); cd=next();
......
...@@ -21,10 +21,10 @@ ...@@ -21,10 +21,10 @@
#include "qtbc.h" #include "qtbc.h"
#include <stdio.h> #include <stdio.h>
class OutputList; class OutputDocInterface;
class FileDef; class FileDef;
extern void parseCode(OutputList &,const char *,const QCString &, extern void parseCode(OutputDocInterface &,const char *,const QCString &,
bool ,const char *,FileDef *fd=0, bool ,const char *,FileDef *fd=0,
int startLine=-1,int endLine=-1,bool inlineFragment=FALSE); int startLine=-1,int endLine=-1,bool inlineFragment=FALSE);
extern void initParseCodeContext(); extern void initParseCodeContext();
......
...@@ -85,6 +85,7 @@ typedef QList<CodeVarDef> CodeVarList; ...@@ -85,6 +85,7 @@ typedef QList<CodeVarDef> CodeVarList;
* statics * statics
*/ */
static OutputDocInterface * g_code;
static CodeClassList g_codeClassList; static CodeClassList g_codeClassList;
static CodeClassDict g_codeClassDict(1009); static CodeClassDict g_codeClassDict(1009);
static CodeVarList g_codeVarList; static CodeVarList g_codeVarList;
...@@ -109,7 +110,6 @@ static bool g_inClass; ...@@ -109,7 +110,6 @@ static bool g_inClass;
static QCString g_classScope; static QCString g_classScope;
static QCString g_realScope; static QCString g_realScope;
static QStack<void> g_scopeStack; // 1 if bracket starts a scope, 2 for internal blocks static QStack<void> g_scopeStack; // 1 if bracket starts a scope, 2 for internal blocks
static OutputList * g_code;
static CodeClassDef g_ccd; static CodeClassDef g_ccd;
static CodeVarDef g_cvd; static CodeVarDef g_cvd;
static bool g_exampleBlock; static bool g_exampleBlock;
...@@ -268,7 +268,7 @@ static void codifyLines(char *text) ...@@ -268,7 +268,7 @@ static void codifyLines(char *text)
* line numbers for each line. If \a text contains newlines, the link will be * line numbers for each line. If \a text contains newlines, the link will be
* split into multiple links with the same destination, one for each line. * split into multiple links with the same destination, one for each line.
*/ */
static void writeMultiLineCodeLink(OutputList &ol, static void writeMultiLineCodeLink(OutputDocInterface &ol,
const char *ref,const char *file, const char *ref,const char *file,
const char *anchor,const char *text) const char *anchor,const char *text)
{ {
...@@ -379,7 +379,7 @@ static void addParameter() ...@@ -379,7 +379,7 @@ static void addParameter()
} }
} }
static void generateClassLink(OutputList &ol,char *clName,int *clNameLen=0) static void generateClassLink(OutputDocInterface &ol,char *clName,int *clNameLen=0)
{ {
int i=0; int i=0;
QCString className=clName; QCString className=clName;
...@@ -450,7 +450,7 @@ static ClassDef *stripClassName(const char *s) ...@@ -450,7 +450,7 @@ static ClassDef *stripClassName(const char *s)
} }
static bool getLink(const char *className, static bool getLink(const char *className,
const char *memberName,OutputList &result, const char *memberName,OutputDocInterface &result,
const char *text=0) const char *text=0)
{ {
MemberDef *md; MemberDef *md;
...@@ -505,10 +505,10 @@ static bool getLink(const char *className, ...@@ -505,10 +505,10 @@ static bool getLink(const char *className,
return FALSE; return FALSE;
} }
static bool generateClassMemberLink(OutputList &ol,ClassDef *mcd,const char *memName) static bool generateClassMemberLink(OutputDocInterface &ol,ClassDef *mcd,const char *memName)
{ {
//printf("generateClassMemberLink(%s,%s)\n",mcd->name().data(),memName); //printf("generateClassMemberLink(%s,%s)\n",mcd->name().data(),memName);
MemberName *mmn=memberNameDict[memName]; MemberName *mmn=Doxygen::memberNameDict[memName];
if (mmn) if (mmn)
{ {
MemberNameIterator mmni(*mmn); MemberNameIterator mmni(*mmn);
...@@ -548,7 +548,7 @@ static bool generateClassMemberLink(OutputList &ol,ClassDef *mcd,const char *mem ...@@ -548,7 +548,7 @@ static bool generateClassMemberLink(OutputList &ol,ClassDef *mcd,const char *mem
return FALSE; return FALSE;
} }
static void generateMemberLink(OutputList &ol,const char *varName, static void generateMemberLink(OutputDocInterface &ol,const char *varName,
char *memName) char *memName)
{ {
//printf("generateMemberLink(object=%s,mem=%s) classScope=%s\n", //printf("generateMemberLink(object=%s,mem=%s) classScope=%s\n",
...@@ -567,21 +567,23 @@ static void generateMemberLink(OutputList &ol,const char *varName, ...@@ -567,21 +567,23 @@ static void generateMemberLink(OutputList &ol,const char *varName,
if (ccd) if (ccd)
{ {
//printf("Class found!\n"); //printf("Class found!\n");
OutputList result(&ol); OutputDocInterface *result = ol.clone();
if (getLink(ccd->name,memName,result)) if (getLink(ccd->name,memName,*result))
{ {
//printf("Found result!\n"); //printf("Found result!\n");
ol+=result; ol.append(result);
delete result;
return; return;
} }
char *s=ccd->bases.first(); char *s=ccd->bases.first();
while (s) while (s)
{ {
OutputList result(&ol); OutputDocInterface *result = ol.clone();
if (getLink(s,memName,result)) if (getLink(s,memName,*result))
{ {
//printf("Found result!\n"); //printf("Found result!\n");
ol+=result; ol.append(result);
delete result;
return; return;
} }
s=ccd->bases.next(); s=ccd->bases.next();
...@@ -590,16 +592,17 @@ static void generateMemberLink(OutputList &ol,const char *varName, ...@@ -590,16 +592,17 @@ static void generateMemberLink(OutputList &ol,const char *varName,
else else
{ {
//printf("Class not found!\n"); //printf("Class not found!\n");
OutputList result(&ol); OutputDocInterface *result = ol.clone();
//printf("cvd->type=`%s'\n",cvd->type.data()); //printf("cvd->type=`%s'\n",cvd->type.data());
if (getLink(cvd->type,memName,result)) if (getLink(cvd->type,memName,*result))
{ {
ol+=result; ol.append(result);
} }
else else
{ {
codifyLines(memName); codifyLines(memName);
} }
delete result;
return; return;
} }
} }
...@@ -609,7 +612,7 @@ static void generateMemberLink(OutputList &ol,const char *varName, ...@@ -609,7 +612,7 @@ static void generateMemberLink(OutputList &ol,const char *varName,
if (vcd && vcd->isLinkable()) if (vcd && vcd->isLinkable())
{ {
//printf("Found class %s for variable `%s'\n",g_classScope.data(),varName); //printf("Found class %s for variable `%s'\n",g_classScope.data(),varName);
MemberName *vmn=memberNameDict[varName]; MemberName *vmn=Doxygen::memberNameDict[varName];
if (vmn==0) if (vmn==0)
{ {
int vi; int vi;
...@@ -619,7 +622,7 @@ static void generateMemberLink(OutputList &ol,const char *varName, ...@@ -619,7 +622,7 @@ static void generateMemberLink(OutputList &ol,const char *varName,
{ {
ClassDef *jcd = getClass(vn.left(vi)); ClassDef *jcd = getClass(vn.left(vi));
vn=vn.right(vn.length()-vi-2); vn=vn.right(vn.length()-vi-2);
vmn=memberNameDict[vn]; vmn=Doxygen::memberNameDict[vn];
//printf("Trying name `%s' scope=%s\n",vn.data(),scope.data()); //printf("Trying name `%s' scope=%s\n",vn.data(),scope.data());
if (vmn) if (vmn)
{ {
...@@ -666,9 +669,9 @@ static void generateMemberLink(OutputList &ol,const char *varName, ...@@ -666,9 +669,9 @@ static void generateMemberLink(OutputList &ol,const char *varName,
return; return;
} }
static void generateFunctionLink(OutputList &ol,char *funcName) static void generateFunctionLink(OutputDocInterface &ol,char *funcName)
{ {
OutputList result(&ol); OutputDocInterface *result = ol.clone();
CodeClassDef *ccd=0; CodeClassDef *ccd=0;
QCString locScope=g_classScope.copy(); QCString locScope=g_classScope.copy();
QCString locFunc=removeRedundantWhiteSpace(funcName); QCString locFunc=removeRedundantWhiteSpace(funcName);
...@@ -693,22 +696,24 @@ static void generateFunctionLink(OutputList &ol,char *funcName) ...@@ -693,22 +696,24 @@ static void generateFunctionLink(OutputList &ol,char *funcName)
char *s=ccd->bases.first(); char *s=ccd->bases.first();
while (s) while (s)
{ {
if (getLink(s,locFunc,result,funcName)) if (getLink(s,locFunc,*result,funcName))
{ {
ol+=result; ol.append(result);
delete result;
return; return;
} }
s=ccd->bases.next(); s=ccd->bases.next();
} }
} }
if (getLink(locScope,locFunc,result,funcName)) if (getLink(locScope,locFunc,*result,funcName))
{ {
ol+=result; ol.append(result);
} }
else else
{ {
codifyLines(funcName); codifyLines(funcName);
} }
delete result;
return; return;
} }
...@@ -808,7 +813,7 @@ TYPEKW ("bool"|"char"|"double"|"float"|"int"|"long"|"short"|"signed"|"unsigned" ...@@ -808,7 +813,7 @@ TYPEKW ("bool"|"char"|"double"|"float"|"int"|"long"|"short"|"signed"|"unsigned"
//FileInfo *f; //FileInfo *f;
bool ambig; bool ambig;
FileDef *fd; FileDef *fd;
if ((fd=findFileDef(inputNameDict,yytext,ambig)) && if ((fd=findFileDef(Doxygen::inputNameDict,yytext,ambig)) &&
fd->isLinkable()) fd->isLinkable())
{ {
g_code->writeCodeLink(fd->getReference(),fd->getOutputFileBase(),0,yytext); g_code->writeCodeLink(fd->getReference(),fd->getOutputFileBase(),0,yytext);
...@@ -1561,12 +1566,12 @@ void initParseCodeContext() ...@@ -1561,12 +1566,12 @@ void initParseCodeContext()
g_anchorCount = 0; g_anchorCount = 0;
} }
void parseCode(OutputList &ol,const char *className,const QCString &s, void parseCode(OutputDocInterface &od,const char *className,const QCString &s,
bool exBlock, const char *exName,FileDef *fd, bool exBlock, const char *exName,FileDef *fd,
int startLine,int endLine,bool inlineFragment) int startLine,int endLine,bool inlineFragment)
{ {
if (s.isEmpty()) return; if (s.isEmpty()) return;
g_code = new OutputList(&ol); g_code = od.clone();
g_inputString = s; g_inputString = s;
g_inputPosition = 0; g_inputPosition = 0;
g_currentFontClass = 0; g_currentFontClass = 0;
...@@ -1606,7 +1611,7 @@ void parseCode(OutputList &ol,const char *className,const QCString &s, ...@@ -1606,7 +1611,7 @@ void parseCode(OutputList &ol,const char *className,const QCString &s,
BEGIN( Body ); BEGIN( Body );
codeYYlex(); codeYYlex();
endFontClass(); endFontClass();
ol+=*g_code; od.append(g_code);
delete g_code; delete g_code;
return; return;
} }
......
/* This file was generated by configgen on Sun Dec 3 18:27:54 2000 /* This file was generated by configgen on Sun Jan 14 14:24:47 2001
* from config_templ.h * from config_templ.h
* *
* DO NOT EDIT! * DO NOT EDIT!
......
/* This file was generated by configgen on Fri Dec 15 14:00:31 2000 /* This file was generated by configgen on Sun Jan 14 14:24:47 2001
* from config_templ.l * from config_templ.l
* *
* DO NOT EDIT! * DO NOT EDIT!
...@@ -2657,95 +2657,6 @@ void checkConfig() ...@@ -2657,95 +2657,6 @@ void checkConfig()
#endif #endif
} }
// Test to see if output directory is valid
if (Config::outputDir.isEmpty())
Config::outputDir=QDir::currentDirPath();
else
{
QDir dir(Config::outputDir);
if (!dir.exists())
{
dir.setPath(QDir::currentDirPath());
if (!dir.mkdir(Config::outputDir))
{
err("Error: tag OUTPUT_DIRECTORY: Output directory `%s' does not "
"exist and cannot be created\n",Config::outputDir.data());
exit(1);
}
else if (!Config::quietFlag)
{
err("Notice: Output directory `%s' does not exist. "
"I have created it for you.\n", Config::outputDir.data());
}
dir.cd(Config::outputDir);
}
Config::outputDir=dir.absPath();
}
if (Config::htmlOutputDir.isEmpty() && Config::generateHtml)
{
Config::htmlOutputDir=Config::outputDir+"/html";
}
else if (Config::htmlOutputDir && Config::htmlOutputDir[0]!='/')
{
Config::htmlOutputDir.prepend(Config::outputDir+'/');
}
QDir htmlDir(Config::htmlOutputDir);
if (Config::generateHtml && !htmlDir.exists() &&
!htmlDir.mkdir(Config::htmlOutputDir))
{
err("Could not create output directory %s\n",Config::htmlOutputDir.data());
exit(1);
}
if (Config::latexOutputDir.isEmpty() && Config::generateLatex)
{
Config::latexOutputDir=Config::outputDir+"/latex";
}
else if (Config::latexOutputDir && Config::latexOutputDir[0]!='/')
{
Config::latexOutputDir.prepend(Config::outputDir+'/');
}
QDir latexDir(Config::latexOutputDir);
if (Config::generateLatex && !latexDir.exists() &&
!latexDir.mkdir(Config::latexOutputDir))
{
err("Could not create output directory %s\n",Config::latexOutputDir.data());
exit(1);
}
if (Config::rtfOutputDir.isEmpty() && Config::generateRTF)
{
Config::rtfOutputDir=Config::outputDir+"/rtf";
}
else if (Config::rtfOutputDir && Config::rtfOutputDir[0]!='/')
{
Config::rtfOutputDir.prepend(Config::outputDir+'/');
}
QDir rtfDir(Config::rtfOutputDir);
if (Config::generateRTF && !rtfDir.exists() &&
!rtfDir.mkdir(Config::rtfOutputDir))
{
err("Could not create output directory %s\n",Config::rtfOutputDir.data());
exit(1);
}
if (Config::manOutputDir.isEmpty() && Config::generateMan)
{
Config::manOutputDir=Config::outputDir+"/man";
}
else if (Config::manOutputDir && Config::manOutputDir[0]!='/')
{
Config::manOutputDir.prepend(Config::outputDir+'/');
}
QDir manDir(Config::manOutputDir);
if (Config::generateMan && !manDir.exists() &&
!manDir.mkdir(Config::manOutputDir))
{
err("Could not create output directory %s\n",Config::manOutputDir.data());
exit(1);
}
// expand the relative stripFromPath values // expand the relative stripFromPath values
char *sfp = Config::stripFromPath.first(); char *sfp = Config::stripFromPath.first();
while (sfp) while (sfp)
......
...@@ -229,7 +229,7 @@ void parseFuncDecl(const QCString &decl,QCString &cl,QCString &ctl,QCString &t, ...@@ -229,7 +229,7 @@ void parseFuncDecl(const QCString &decl,QCString &cl,QCString &ctl,QCString &t,
// type.data(),scope.data(),name.data(),args.data()); // type.data(),scope.data(),name.data(),args.data());
int nb = name.findRev('['); int nb = name.findRev('[');
if (nb!=-1) // correct for [] in name ambigity (due to Java return type allowing []) if (nb!=-1 && args.isEmpty()) // correct for [] in name ambigity (due to Java return type allowing [])
{ {
args.prepend(name.right(name.length()-nb)); args.prepend(name.right(name.length()-nb));
name=name.left(nb); name=name.left(nb);
......
...@@ -249,8 +249,7 @@ ID [a-z_A-Z][a-z_A-Z0-9]* ...@@ -249,8 +249,7 @@ ID [a-z_A-Z][a-z_A-Z0-9]*
BEGIN( ReadDocBlock ); BEGIN( ReadDocBlock );
} }
<ReadFuncArgType,ReadFuncArgDef>[,)>] { <ReadFuncArgType,ReadFuncArgDef>[,)>] {
g_curArgTypeName=removeRedundantWhiteSpace( g_curArgTypeName=removeRedundantWhiteSpace(g_curArgTypeName);
g_curArgTypeName.simplifyWhiteSpace());
g_curArgDefValue=g_curArgDefValue.stripWhiteSpace(); g_curArgDefValue=g_curArgDefValue.stripWhiteSpace();
int l=g_curArgTypeName.length(); int l=g_curArgTypeName.length();
if (l>0) if (l>0)
......
...@@ -35,7 +35,7 @@ Definition::Definition(const char *df,int dl, ...@@ -35,7 +35,7 @@ Definition::Definition(const char *df,int dl,
n=name; n=name;
brief=b; brief=b;
doc=d; doc=d;
sectionList=0, sectionDict=0,
startBodyLine=endBodyLine=-1, startBodyLine=endBodyLine=-1,
bodyDef=0; bodyDef=0;
sourceRefList=0; sourceRefList=0;
...@@ -46,7 +46,7 @@ Definition::Definition(const char *df,int dl, ...@@ -46,7 +46,7 @@ Definition::Definition(const char *df,int dl,
Definition::~Definition() Definition::~Definition()
{ {
delete sectionList; delete sectionDict;
delete sourceRefList; delete sourceRefList;
delete sourceRefDict; delete sourceRefDict;
} }
...@@ -90,18 +90,39 @@ void Definition::addSectionsToDefinition(QList<QCString> *anchorList) ...@@ -90,18 +90,39 @@ void Definition::addSectionsToDefinition(QList<QCString> *anchorList)
while (s) while (s)
{ {
SectionInfo *si=0; SectionInfo *si=0;
if (!s->isEmpty() && (si=sectionDict[*s])) if (!s->isEmpty() && (si=Doxygen::sectionDict[*s]))
{ {
//printf("Add section `%s' to definition `%s'\n", //printf("Add section `%s' to definition `%s'\n",
// si->label.data(),n.data()); // si->label.data(),n.data());
if (sectionList==0) sectionList = new SectionList; if (sectionDict==0)
sectionList->append(si); {
sectionDict = new SectionDict(17);
}
if (sectionDict->find(*s)==0)
{
sectionDict->insert(*s,si);
}
si->definition = this; si->definition = this;
} }
s=anchorList->next(); s=anchorList->next();
} }
} }
void Definition::writeDocAnchorsToTagFile()
{
if (!Config::genTagFile.isEmpty() && sectionDict)
{
QDictIterator<SectionInfo> sdi(*sectionDict);
SectionInfo *si;
for (;(si=sdi.current());++sdi)
{
if (definitionType()==TypeMember) Doxygen::tagFile << " ";
Doxygen::tagFile << " <docanchor>" << si->label << "</docanchor>" << endl;
}
}
}
void Definition::setBriefDescription(const char *b) void Definition::setBriefDescription(const char *b)
{ {
brief=QCString(b).stripWhiteSpace(); brief=QCString(b).stripWhiteSpace();
...@@ -177,32 +198,34 @@ static bool readCodeFragment(const char *fileName, ...@@ -177,32 +198,34 @@ static bool readCodeFragment(const char *fileName,
} }
if (found) if (found)
{ {
// full the line with spaces until the right column // fill the line with spaces until the right column
int i; QCString spaces;
for (i=0;i<col;i++) result+=' '; spaces.fill(' ',col);
result+=spaces;
// copy until end of line // copy until end of line
result+=c; result+=c;
if (c==':') result+=cn; if (c==':') result+=cn;
startLine=lineNr; startLine=lineNr;
const int maxLineLength=4096; const int maxLineLength=4096;
char lineStr[maxLineLength]; char lineStr[maxLineLength];
char *p=lineStr; do
while ((c=f.getch())!='\n' && c!=-1) *p++=c;
//printf("First line str=`%s' atEnd=%d lineNr=%d endLine=%d\n",lineStr.data(),f.atEnd(),lineNr,endLine);
*p++='\n';
*p++='\0';
while (lineNr<endLine && !f.atEnd())
{ {
//printf("adding line=`%s' lineNr=%d\n",lineStr.data(),lineNr); int size_read;
result+=lineStr; do {
f.readLine(lineStr,maxLineLength); // read up to maxLineLength-1 bytes, the last byte being zero
size_read = f.readLine(lineStr, maxLineLength);
result+=lineStr;
} while (size_read == (maxLineLength-1));
lineNr++; lineNr++;
} while (lineNr<endLine && !f.atEnd());
int charIndex = result.findRev('}');
if (charIndex > 0)
{
result.truncate(charIndex+1);
result+='\n';
} }
p=lineStr+strlen(lineStr);
while (--p>=lineStr && *p!='}') /* skip */;
*(++p)='\n';
*(++p)='\0';
result+=lineStr;
endLine=lineNr; endLine=lineNr;
return TRUE; return TRUE;
} }
...@@ -395,8 +418,6 @@ void Definition::writeSourceRefs(OutputList &ol,const char *scopeName) ...@@ -395,8 +418,6 @@ void Definition::writeSourceRefs(OutputList &ol,const char *scopeName)
ol.popGeneratorState(); ol.popGeneratorState();
} }
bool Definition::hasDocumentation() bool Definition::hasDocumentation()
{ {
return !doc.isEmpty() || // has detailed docs return !doc.isEmpty() || // has detailed docs
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
class FileDef; class FileDef;
class OutputList; class OutputList;
class SectionList; class SectionDict;
class MemberList; class MemberList;
class MemberDict; class MemberDict;
class MemberDef; class MemberDef;
...@@ -93,6 +93,7 @@ class Definition ...@@ -93,6 +93,7 @@ class Definition
* documentation. * documentation.
*/ */
void addSectionsToDefinition(QList<QCString> *anchorList); void addSectionsToDefinition(QList<QCString> *anchorList);
void writeDocAnchorsToTagFile();
// source references // source references
void setBodySegment(int bls,int ble) void setBodySegment(int bls,int ble)
...@@ -136,7 +137,7 @@ class Definition ...@@ -136,7 +137,7 @@ class Definition
QCString brief; // brief description QCString brief; // brief description
QCString doc; // detailed description QCString doc; // detailed description
QCString ref; // reference to external documentation QCString ref; // reference to external documentation
SectionList *sectionList; // list of all sections SectionDict *sectionDict; // dictionary of all sections
MemberList *sourceRefList; // list of entities that refer to this MemberList *sourceRefList; // list of entities that refer to this
// entity in their definition // entity in their definition
MemberDict *sourceRefDict; MemberDict *sourceRefDict;
......
...@@ -158,13 +158,13 @@ static void writeMapArea(QTextStream &t,ClassDef *cd,int x,int y,int w,int h) ...@@ -158,13 +158,13 @@ static void writeMapArea(QTextStream &t,ClassDef *cd,int x,int y,int w,int h)
if (!ref.isEmpty()) if (!ref.isEmpty())
{ {
t << "doxygen=\"" << ref << ":"; t << "doxygen=\"" << ref << ":";
if ((dest=tagDestinationDict[ref])) t << *dest << "/"; if ((dest=Doxygen::tagDestinationDict[ref])) t << *dest << "/";
t << "\" "; t << "\" ";
} }
t << "href=\""; t << "href=\"";
if (!ref.isEmpty()) if (!ref.isEmpty())
{ {
if ((dest=tagDestinationDict[ref])) t << *dest << "/"; if ((dest=Doxygen::tagDestinationDict[ref])) t << *dest << "/";
} }
t << cd->getOutputFileBase() << ".html\" "; t << cd->getOutputFileBase() << ".html\" ";
t << "alt=\"" << cd->name(); t << "alt=\"" << cd->name();
...@@ -916,7 +916,7 @@ void TreeDiagram::drawConnectors(QTextStream &t,Image *image, ...@@ -916,7 +916,7 @@ void TreeDiagram::drawConnectors(QTextStream &t,Image *image,
void clearVisitFlags() void clearVisitFlags()
{ {
ClassListIterator cli(classList); ClassListIterator cli(Doxygen::classList);
ClassDef *cd; ClassDef *cd;
for (;(cd=cli.current());++cli) for (;(cd=cli.current());++cli)
{ {
......
...@@ -20,14 +20,14 @@ ...@@ -20,14 +20,14 @@
#include "qtbc.h" #include "qtbc.h"
class OutputList; class OutputDocInterface;
extern void parseDoc(OutputList &ol, extern void parseDoc(OutputDocInterface &ol,
const char *fileName,int startLine, const char *fileName,int startLine,
const char *clName, const char *memName, const char *clName, const char *memName,
const QCString &docString); const QCString &docString);
extern void parseExample(OutputList &ol,const QCString &docString, extern void parseExample(OutputDocInterface &ol,const QCString &docString,
const char *fileName); const char *fileName);
extern void parseText(OutputList &ol,const QCString &txtString); extern void parseText(OutputDocInterface &ol,const QCString &txtString);
#endif #endif
...@@ -51,10 +51,10 @@ ...@@ -51,10 +51,10 @@
* *
* scanner's state variables * scanner's state variables
*/ */
static OutputDocInterface * outDoc;
static bool insideArgumentList; static bool insideArgumentList;
static QCString className; static QCString className;
static QCString memberName; static QCString memberName;
static OutputList * outDoc;
static QCString linkRef; static QCString linkRef;
static QCString linkText; static QCString linkText;
static QCString codeBlock; static QCString codeBlock;
...@@ -150,10 +150,10 @@ class TableElem ...@@ -150,10 +150,10 @@ class TableElem
~TableElem(); ~TableElem();
int getRow() { return row; } int getRow() { return row; }
int getCol() { return col; } int getCol() { return col; }
OutputList *outputList() { return ol; } OutputDocInterface *outputDocInterface() { return od; }
private: private:
OutputList *ol; OutputDocInterface *od;
int row; int row;
int col; int col;
}; };
...@@ -161,8 +161,8 @@ class TableElem ...@@ -161,8 +161,8 @@ class TableElem
TableElem::TableElem(int r,int c) TableElem::TableElem(int r,int c)
{ {
//printf("TableElem::TableElem(%d,%d)\n",r,c); //printf("TableElem::TableElem(%d,%d)\n",r,c);
ol=new OutputList(outDoc); od=outDoc->clone();
outDoc=ol; outDoc=od;
row=r; row=r;
col=c; col=c;
} }
...@@ -170,7 +170,7 @@ TableElem::TableElem(int r,int c) ...@@ -170,7 +170,7 @@ TableElem::TableElem(int r,int c)
TableElem::~TableElem() TableElem::~TableElem()
{ {
//printf("TableElem::~TableElem(%d,%d)\n",row,col); //printf("TableElem::~TableElem(%d,%d)\n",row,col);
delete ol; ol=0; delete od; od=0;
} }
class Table class Table
...@@ -182,7 +182,7 @@ class Table ...@@ -182,7 +182,7 @@ class Table
void newElem(); void newElem();
private: private:
OutputList *parentDoc; OutputDocInterface *parentDoc;
QList<TableElem> *elemList; QList<TableElem> *elemList;
int curRow; int curRow;
int curCol; int curCol;
...@@ -219,7 +219,7 @@ Table::~Table() ...@@ -219,7 +219,7 @@ Table::~Table()
{ {
parentDoc->nextTableColumn(); parentDoc->nextTableColumn();
} }
*parentDoc+=*e->outputList(); parentDoc->append(e->outputDocInterface());
parentDoc->endTableColumn(); parentDoc->endTableColumn();
} }
e=elemList->next(); e=elemList->next();
...@@ -286,30 +286,31 @@ static void endArgumentList() ...@@ -286,30 +286,31 @@ static void endArgumentList()
} }
} }
static void includeFile(OutputList &ol,const char *fileName,bool quiet) static void includeFile(OutputDocInterface &od,const char *fileName,bool quiet)
{ {
bool ambig; bool ambig;
FileDef *fd; FileDef *fd;
if ((fd=findFileDef(exampleNameDict,fileName,ambig))) if ((fd=findFileDef(Doxygen::exampleNameDict,fileName,ambig)))
{ {
currentIncludeFile=fileToString(fd->absFilePath()); currentIncludeFile=fileToString(fd->absFilePath());
includeFileOffset=0; includeFileOffset=0;
includeFileLength=currentIncludeFile.length(); includeFileLength=currentIncludeFile.length();
OutputList codeFrag(&ol); OutputDocInterface *codeFrag = od.clone();
parseCode(codeFrag,0,currentIncludeFile,exampleDoc,exampleName); parseCode(*codeFrag,0,currentIncludeFile,exampleDoc,exampleName);
if (!quiet) if (!quiet)
{ {
ol.startCodeFragment(); od.startCodeFragment();
ol+=codeFrag; od.append(codeFrag);
ol.endCodeFragment(); od.endCodeFragment();
} }
delete codeFrag;
} }
else if (ambig) else if (ambig)
{ {
QCString text; QCString text;
text.sprintf("Include file name %s is ambigious.\n",fileName); text.sprintf("Include file name %s is ambigious.\n",fileName);
text+="Possible candidates:\n"; text+="Possible candidates:\n";
text+=showFileDefMatches(exampleNameDict,fileName); text+=showFileDefMatches(Doxygen::exampleNameDict,fileName);
warn(yyFileName,yyLineNr,text); warn(yyFileName,yyLineNr,text);
} }
else else
...@@ -321,22 +322,22 @@ static void includeFile(OutputList &ol,const char *fileName,bool quiet) ...@@ -321,22 +322,22 @@ static void includeFile(OutputList &ol,const char *fileName,bool quiet)
} }
} }
static void verbIncludeFile(OutputList &ol,const char *name) static void verbIncludeFile(OutputDocInterface &od,const char *name)
{ {
bool ambig; bool ambig;
FileDef *fd; FileDef *fd;
if ((fd=findFileDef(exampleNameDict,name,ambig))) if ((fd=findFileDef(Doxygen::exampleNameDict,name,ambig)))
{ {
ol.startCodeFragment(); od.startCodeFragment();
ol.codify(fileToString(fd->absFilePath())); od.codify(fileToString(fd->absFilePath()));
ol.endCodeFragment(); od.endCodeFragment();
} }
else if (ambig) else if (ambig)
{ {
QCString text; QCString text;
text.sprintf("Include file name %s is ambigious.\n",name); text.sprintf("Include file name %s is ambigious.\n",name);
text+=("Possible candidates:\n"); text+=("Possible candidates:\n");
text+=showFileDefMatches(exampleNameDict,name); text+=showFileDefMatches(Doxygen::exampleNameDict,name);
warn(yyFileName,yyLineNr,text); warn(yyFileName,yyLineNr,text);
} }
else else
...@@ -369,7 +370,7 @@ static QCString stripKnownExtensions(const char *text) ...@@ -369,7 +370,7 @@ static QCString stripKnownExtensions(const char *text)
return result; return result;
} }
static void skipLine(OutputList &ol,const char *key) static void skipLine(OutputDocInterface &od,const char *key)
{ {
bool found=FALSE; bool found=FALSE;
while (!found) while (!found)
...@@ -382,9 +383,9 @@ static void skipLine(OutputList &ol,const char *key) ...@@ -382,9 +383,9 @@ static void skipLine(OutputList &ol,const char *key)
if (s.find(key)!=-1) if (s.find(key)!=-1)
{ {
found=TRUE; found=TRUE;
ol.writeString(" "); od.writeString(" ");
parseCode(ol,className,s,exampleDoc,exampleName); parseCode(od,className,s,exampleDoc,exampleName);
ol.writeString("\n"); od.writeString("\n");
} }
else if (includeFileOffset==includeFileLength) found=TRUE; else if (includeFileOffset==includeFileLength) found=TRUE;
} }
...@@ -412,7 +413,7 @@ static void skipUntil(const char *key) ...@@ -412,7 +413,7 @@ static void skipUntil(const char *key)
} }
} }
static void showLine(OutputList &ol,const char *key) static void showLine(OutputDocInterface &od,const char *key)
{ {
QCString s; QCString s;
char c; char c;
...@@ -427,13 +428,13 @@ static void showLine(OutputList &ol,const char *key) ...@@ -427,13 +428,13 @@ static void showLine(OutputList &ol,const char *key)
} }
if (s.find(key)!=-1) if (s.find(key)!=-1)
{ {
ol.writeString(" "); od.writeString(" ");
parseCode(ol,className,s,exampleDoc,exampleName); parseCode(od,className,s,exampleDoc,exampleName);
ol.writeString("\n"); od.writeString("\n");
} }
} }
static void showUntil(OutputList &ol,const char *key) static void showUntil(OutputDocInterface &od,const char *key)
{ {
bool found=FALSE; bool found=FALSE;
while (!found) while (!found)
...@@ -445,9 +446,9 @@ static void showUntil(OutputList &ol,const char *key) ...@@ -445,9 +446,9 @@ static void showUntil(OutputList &ol,const char *key)
) s+=c; ) s+=c;
if (!s.stripWhiteSpace().isEmpty()) if (!s.stripWhiteSpace().isEmpty())
{ {
ol.writeString(" "); od.writeString(" ");
parseCode(ol,className,s,exampleDoc,exampleName); parseCode(od,className,s,exampleDoc,exampleName);
ol.writeString("\n"); od.writeString("\n");
if (s.find(key)!=-1) found=TRUE; if (s.find(key)!=-1) found=TRUE;
} }
if (includeFileOffset==includeFileLength) found=TRUE; if (includeFileOffset==includeFileLength) found=TRUE;
...@@ -630,7 +631,7 @@ static QCString findAndCopyImage(const char *fileName,ImageTypes type) ...@@ -630,7 +631,7 @@ static QCString findAndCopyImage(const char *fileName,ImageTypes type)
bool ambig; bool ambig;
FileDef *fd; FileDef *fd;
//printf("Search for %s\n",fileName); //printf("Search for %s\n",fileName);
if ((fd=findFileDef(imageNameDict,fileName,ambig))) if ((fd=findFileDef(Doxygen::imageNameDict,fileName,ambig)))
{ {
QFile inImage(QString(fd->absFilePath().data())); QFile inImage(QString(fd->absFilePath().data()));
if (inImage.open(IO_ReadOnly)) if (inImage.open(IO_ReadOnly))
...@@ -678,7 +679,7 @@ static QCString findAndCopyImage(const char *fileName,ImageTypes type) ...@@ -678,7 +679,7 @@ static QCString findAndCopyImage(const char *fileName,ImageTypes type)
QCString text; QCString text;
text.sprintf("Warning: image file name %s is ambigious.\n",fileName); text.sprintf("Warning: image file name %s is ambigious.\n",fileName);
text+="Possible candidates:\n"; text+="Possible candidates:\n";
text+=showFileDefMatches(imageNameDict,fileName); text+=showFileDefMatches(Doxygen::imageNameDict,fileName);
warn(yyFileName,yyLineNr,text); warn(yyFileName,yyLineNr,text);
} }
else else
...@@ -806,6 +807,12 @@ UL [uU][lL] ...@@ -806,6 +807,12 @@ UL [uU][lL]
VAR [vV][aA][rR] VAR [vV][aA][rR]
BLOCKQUOTE [bB][lL][oO][cC][kK][qQ][uU][oO][tT][eE] BLOCKQUOTE [bB][lL][oO][cC][kK][qQ][uU][oO][tT][eE]
DOCPARAM ([a-z_A-Z0-9:\<\>\=\.\-]+)|("\"".*"\"") DOCPARAM ([a-z_A-Z0-9:\<\>\=\.\-]+)|("\"".*"\"")
OPNEW {B}+"new"({B}*"[]")?
OPDEL {B}+"delete"({B}*"[]")?
OPARG "("[a-z_A-Z0-9,\<\> \t\*\&]*")"
OPNORM {OPNEW}|{OPDEL}|"+"|"-"|"*"|"/"|"%"|"^"|"&"|"|"|"~"|"!"|"="|"<"|">"|"+="|"-="|"*="|"/="|"%="|"^="|"&="|"|="|"<<"|">>"|"<<="|">>="|"=="|"!="|"<="|">="|"&&"|"||"|"++"|"--"|","|"->*"|"->"|"[]"|"()"
OPCAST {B}+[^(\r\n.,]+
OPMASK ({B}*{OPNORM}({OPARG}?))|({OPCAST}{OPARG})
%option noyywrap %option noyywrap
...@@ -885,23 +892,20 @@ DOCPARAM ([a-z_A-Z0-9:\<\>\=\.\-]+)|("\"".*"\"") ...@@ -885,23 +892,20 @@ DOCPARAM ([a-z_A-Z0-9:\<\>\=\.\-]+)|("\"".*"\"")
outDoc->docify(getenv(envvar)); outDoc->docify(getenv(envvar));
} }
<DocScan>{CMD}"htmlonly"/[^a-z_A-Z0-9] { <DocScan>{CMD}"htmlonly"/[^a-z_A-Z0-9] {
outDoc->pushGeneratorState(); /*storeOutputListState();*/ outDoc->pushGeneratorState();
outDoc->disableAllBut(OutputGenerator::Html); outDoc->disableAllBut(OutputGenerator::Html);
BEGIN(DocHtmlScan); BEGIN(DocHtmlScan);
} }
<DocHtmlScan>{CMD}"endhtmlonly"/[^a-z_A-Z0-9] { <DocHtmlScan>{CMD}"endhtmlonly"/[^a-z_A-Z0-9] {
/*restoreOutputListState();*/
outDoc->popGeneratorState(); outDoc->popGeneratorState();
BEGIN(DocScan); BEGIN(DocScan);
} }
<DocScan>{CMD}"latexonly"/[^a-z_A-Z0-9] { <DocScan>{CMD}"latexonly"/[^a-z_A-Z0-9] {
/*storeOutputListState();*/
outDoc->pushGeneratorState(); outDoc->pushGeneratorState();
outDoc->disableAllBut(OutputGenerator::Latex); outDoc->disableAllBut(OutputGenerator::Latex);
BEGIN(DocLatexScan); BEGIN(DocLatexScan);
} }
<DocLatexScan>{CMD}"endlatexonly"/[^a-z_A-Z0-9] { <DocLatexScan>{CMD}"endlatexonly"/[^a-z_A-Z0-9] {
/*restoreOutputListState();*/
outDoc->popGeneratorState(); outDoc->popGeneratorState();
BEGIN(DocScan); BEGIN(DocScan);
} }
...@@ -914,17 +918,17 @@ DOCPARAM ([a-z_A-Z0-9:\<\>\=\.\-]+)|("\"".*"\"") ...@@ -914,17 +918,17 @@ DOCPARAM ([a-z_A-Z0-9:\<\>\=\.\-]+)|("\"".*"\"")
outDoc->writeString(c); outDoc->writeString(c);
} }
<DocScan>"\\postheader"/{BN} <DocScan>"\\postheader"/{BN}
<DocScan>"\\functionindex"/{BN} { writeMemberList(*outDoc,FALSE); } <DocScan>"\\functionindex"/{BN} { /* writeMemberList(*outDoc,FALSE);*/ }
<DocScan>"\\classhierarchy"/{BN} { writeClassHierarchy(*outDoc); } <DocScan>"\\classhierarchy"/{BN} { /* writeClassHierarchy(*outDoc); */ }
<DocScan>"\\annotatedclasslist"/{BN} { writeAnnotatedClassList(*outDoc); } <DocScan>"\\annotatedclasslist"/{BN} { /* writeAnnotatedClassList(*outDoc); */ }
<DocScan>"\\headerfilelist"/{BN} { /*TODO: fix this writeHeaderFileList(*outDoc); */ } <DocScan>"\\headerfilelist"/{BN} { /* writeHeaderFileList(*outDoc); */ }
<DocScan>"\\header"/{BN} { BEGIN( DocSkipWord ); } <DocScan>"\\header"/{BN} { BEGIN( DocSkipWord ); }
<DocScan>"\\define"/{BN} { BEGIN( DocSkipWord ); } <DocScan>"\\define"/{BN} { BEGIN( DocSkipWord ); }
<DocScan>{CMD}"verbinclude"/{BN} { BEGIN( DocVerbInc ); } <DocScan>{CMD}"verbinclude"/{BN} { BEGIN( DocVerbInc ); }
<DocVerbInc>{FILE} { <DocVerbInc>{FILE} {
verbIncludeFile(*outDoc,stripQuotes(yytext)); verbIncludeFile(*outDoc,stripQuotes(yytext));
BEGIN( DocScan ); BEGIN( DocScan );
} }
<DocScan>{CMD}"verbatim"/[^a-z_A-Z0-9] { <DocScan>{CMD}"verbatim"/[^a-z_A-Z0-9] {
outDoc->startCodeFragment(); outDoc->startCodeFragment();
insideVerbatim=TRUE; insideVerbatim=TRUE;
...@@ -1000,7 +1004,7 @@ DOCPARAM ([a-z_A-Z0-9:\<\>\=\.\-]+)|("\"".*"\"") ...@@ -1000,7 +1004,7 @@ DOCPARAM ([a-z_A-Z0-9:\<\>\=\.\-]+)|("\"".*"\"")
BEGIN(DocIndexWord); BEGIN(DocIndexWord);
} }
<DocScan>"\\form#"[0-9]+ { <DocScan>"\\form#"[0-9]+ {
Formula *formula=formulaNameDict[yytext]; Formula *formula=Doxygen::formulaNameDict[yytext];
if (formula) if (formula)
{ {
QCString formName; QCString formName;
...@@ -1501,7 +1505,7 @@ DOCPARAM ([a-z_A-Z0-9:\<\>\=\.\-]+)|("\"".*"\"") ...@@ -1501,7 +1505,7 @@ DOCPARAM ([a-z_A-Z0-9:\<\>\=\.\-]+)|("\"".*"\"")
secName=secName.left(secName.length()-1); // remove \n secName=secName.left(secName.length()-1); // remove \n
//printf("SectionName %s found\n",secName.data()); //printf("SectionName %s found\n",secName.data());
SectionInfo *sec; SectionInfo *sec;
if ((sec=sectionDict[secName])) if ((sec=Doxygen::sectionDict[secName]))
{ {
//printf("Title %s\n",sec->title.data()); //printf("Title %s\n",sec->title.data());
outDoc->startSection(sec->label,sec->title, outDoc->startSection(sec->label,sec->title,
...@@ -1515,7 +1519,7 @@ DOCPARAM ([a-z_A-Z0-9:\<\>\=\.\-]+)|("\"".*"\"") ...@@ -1515,7 +1519,7 @@ DOCPARAM ([a-z_A-Z0-9:\<\>\=\.\-]+)|("\"".*"\"")
QCString secName=&yytext[8]; QCString secName=&yytext[8];
secName=secName.left(secName.length()-1); secName=secName.left(secName.length()-1);
SectionInfo *sec; SectionInfo *sec;
if ((sec=sectionDict[secName])) if ((sec=Doxygen::sectionDict[secName]))
{ {
//printf("writeAnchor %s_%s\n",sec->fileName.data(),sec->label.data()); //printf("writeAnchor %s_%s\n",sec->fileName.data(),sec->label.data());
outDoc->writeAnchor(sec->fileName,sec->label); outDoc->writeAnchor(sec->fileName,sec->label);
...@@ -1576,7 +1580,7 @@ DOCPARAM ([a-z_A-Z0-9:\<\>\=\.\-]+)|("\"".*"\"") ...@@ -1576,7 +1580,7 @@ DOCPARAM ([a-z_A-Z0-9:\<\>\=\.\-]+)|("\"".*"\"")
<DocRefName>{SCOPENAME}|{FILE} { <DocRefName>{SCOPENAME}|{FILE} {
QCString ref=yytext; QCString ref=yytext;
SectionInfo *sec; SectionInfo *sec;
if ((sec=sectionDict[ref])) if ((sec=Doxygen::sectionDict[ref]))
{ {
QCString text; QCString text;
if (sec->title.isEmpty()) if (sec->title.isEmpty())
...@@ -1585,19 +1589,21 @@ DOCPARAM ([a-z_A-Z0-9:\<\>\=\.\-]+)|("\"".*"\"") ...@@ -1585,19 +1589,21 @@ DOCPARAM ([a-z_A-Z0-9:\<\>\=\.\-]+)|("\"".*"\"")
text=sec->title; text=sec->title;
if (sec->type==SectionInfo::Anchor) if (sec->type==SectionInfo::Anchor)
{ {
outDoc->writeObjectLink(0,sec->fileName,sec->label,text); outDoc->writeObjectLink(sec->ref,sec->fileName,sec->label,text);
writePageRef(*outDoc,sec->label,0); if (sec->ref.isEmpty())
{
writePageRef(*outDoc,sec->label,0);
}
} }
else else
{ {
//printf(" ref sec=%p sec->fileName=%s text=%s\n",sec,sec->fileName.data(),text.data()); //printf(" ref sec=%p sec->fileName=%s text=%s\n",sec,sec->fileName.data(),text.data());
outDoc->writeSectionRef(sec->fileName,sec->label,text); outDoc->writeSectionRef(sec->fileName,sec->label,text,sec->ref);
} }
} }
else if (!generateLink(*outDoc,className,yytext,TRUE,0)) else if (!generateLink(*outDoc,className,yytext,TRUE,0))
{ {
warn(yyFileName,yyLineNr,"Warning: reference to unknown section %s in the documentation of this entity!",yytext); warn(yyFileName,yyLineNr,"Warning: reference to unknown section %s in the documentation of this entity!",yytext);
//outDoc->writeBoldString(" unknown reference! ");
} }
BEGIN(DocScan); BEGIN(DocScan);
} }
...@@ -1613,24 +1619,27 @@ DOCPARAM ([a-z_A-Z0-9:\<\>\=\.\-]+)|("\"".*"\"") ...@@ -1613,24 +1619,27 @@ DOCPARAM ([a-z_A-Z0-9:\<\>\=\.\-]+)|("\"".*"\"")
yytext[yyleng-1]='\0'; yytext[yyleng-1]='\0';
QCString text=substitute(yytext,"\\\\","\\"); QCString text=substitute(yytext,"\\\\","\\");
SectionInfo *sec; SectionInfo *sec;
if ((sec=sectionDict[sectionRef])) if ((sec=Doxygen::sectionDict[sectionRef]))
{ {
if (sec->type==SectionInfo::Anchor) if (sec->type==SectionInfo::Anchor)
{ {
//outDoc->writeSectionRefAnchor(sec->fileName,sec->label,text); outDoc->writeObjectLink(sec->ref,sec->fileName,sec->label,text);
outDoc->writeObjectLink(0,sec->fileName,sec->label,text); if (sec->ref.isEmpty())
//printf("Writing page ref `%s'\n",sec->label.data()); {
writePageRef(*outDoc,sec->label,0); writePageRef(*outDoc,sec->label,0);
}
} }
else else
{ {
outDoc->writeSectionRef(sec->fileName,sec->label,text); outDoc->writeSectionRef(sec->fileName,sec->label,text,sec->ref);
} }
} }
else if (!generateLink(*outDoc,className,sectionRef,TRUE,text)) else if (!generateLink(*outDoc,className,sectionRef,TRUE,text))
{ {
warn(yyFileName,yyLineNr,"Warning: reference to unknown section %s in the documentation of this entity!",sectionRef.data()); warn(yyFileName,yyLineNr,"Warning: reference to unknown section %s in the documentation of this entity!",sectionRef.data());
outDoc->writeBoldString(" unknown reference! "); outDoc->startBold();
outDoc->writeString(" unknown reference! ");
outDoc->endBold();
} }
BEGIN(DocScan); BEGIN(DocScan);
} }
...@@ -1641,14 +1650,16 @@ DOCPARAM ([a-z_A-Z0-9:\<\>\=\.\-]+)|("\"".*"\"") ...@@ -1641,14 +1650,16 @@ DOCPARAM ([a-z_A-Z0-9:\<\>\=\.\-]+)|("\"".*"\"")
<DocRefItemName>.*/"\n" { <DocRefItemName>.*/"\n" {
SectionInfo *sec; SectionInfo *sec;
QCString text=yytext; QCString text=yytext;
if ((sec=sectionDict[sectionRef])) if ((sec=Doxygen::sectionDict[sectionRef]))
{ {
outDoc->writeSectionRefItem(sec->fileName,sec->label,text.stripWhiteSpace()); outDoc->writeSectionRefItem(sec->fileName,sec->label,text.stripWhiteSpace());
} }
else else
{ {
warn(yyFileName,yyLineNr,"Warning: reference to unknown section %s in the documentation of this entity!",sectionRef.data()); warn(yyFileName,yyLineNr,"Warning: reference to unknown section %s in the documentation of this entity!",sectionRef.data());
outDoc->writeBoldString(" unknown reference! "); outDoc->startBold();
outDoc->writeString(" unknown reference! ");
outDoc->endBold();
} }
BEGIN(DocScan); BEGIN(DocScan);
} }
...@@ -2212,12 +2223,12 @@ void internalParseDocument(const char *s) ...@@ -2212,12 +2223,12 @@ void internalParseDocument(const char *s)
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
void parseDocument(OutputList &ol,const QCString &docString) void parseDocument(OutputDocInterface &od,const QCString &docString)
{ {
//inParamBlock=inSeeBlock=inReturnBlock=FALSE; //inParamBlock=inSeeBlock=inReturnBlock=FALSE;
curTable = 0; curTable = 0;
depthIf = 0; depthIf = 0;
outDoc = new OutputList(&ol); outDoc = od.clone();
currentIncludeFile.resize(0); currentIncludeFile.resize(0);
includeFileOffset=0; includeFileOffset=0;
includeFileLength=0; includeFileLength=0;
...@@ -2268,14 +2279,14 @@ void parseDocument(OutputList &ol,const QCString &docString) ...@@ -2268,14 +2279,14 @@ void parseDocument(OutputList &ol,const QCString &docString)
"Warning: file ended inside a \\verbatim block!" "Warning: file ended inside a \\verbatim block!"
); );
} }
ol+=*outDoc; od.append(outDoc);
delete outDoc; outDoc=0; delete outDoc; outDoc=0;
return; return;
} }
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
void parseDoc(OutputList &ol,const char *fileName,int startLine, void parseDoc(OutputDocInterface &od,const char *fileName,int startLine,
const char *clName,const char *memName,const QCString &docString) const char *clName,const char *memName,const QCString &docString)
{ {
//printf("parseDoc(file=`%s',line=%d)\n",fileName,startLine); //printf("parseDoc(file=`%s',line=%d)\n",fileName,startLine);
...@@ -2286,29 +2297,29 @@ void parseDoc(OutputList &ol,const char *fileName,int startLine, ...@@ -2286,29 +2297,29 @@ void parseDoc(OutputList &ol,const char *fileName,int startLine,
memberName=memName; memberName=memName;
strcpy(yyFileName,fileName); strcpy(yyFileName,fileName);
yyLineNr = startLine; yyLineNr = startLine;
parseDocument(ol,docString); parseDocument(od,docString);
} }
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
void parseText(OutputList &ol,const QCString &txtString) void parseText(OutputDocInterface &od,const QCString &txtString)
{ {
if (txtString.isEmpty()) return; if (txtString.isEmpty()) return;
inputString = txtString; inputString = txtString;
outDoc = new OutputList(&ol); outDoc = od.clone();
inputPosition = 0; inputPosition = 0;
docYYrestart( docYYin ); docYYrestart( docYYin );
BEGIN( Text ); BEGIN( Text );
docYYlex(); docYYlex();
ol+=*outDoc; od.append(outDoc);
delete outDoc; outDoc=0; delete outDoc; outDoc=0;
return; return;
} }
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
void parseExample(OutputList &ol,const QCString &docString, void parseExample(OutputDocInterface &od,const QCString &docString,
const char *fileName) const char *fileName)
{ {
initParser(); initParser();
...@@ -2316,7 +2327,7 @@ void parseExample(OutputList &ol,const QCString &docString, ...@@ -2316,7 +2327,7 @@ void parseExample(OutputList &ol,const QCString &docString,
exampleDoc=TRUE; // cross reference with member docs exampleDoc=TRUE; // cross reference with member docs
exampleName=fileName; exampleName=fileName;
strcpy(yyFileName,fileName); strcpy(yyFileName,fileName);
parseDocument(ol,docString); parseDocument(od,docString);
} }
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
......
...@@ -87,13 +87,13 @@ static bool convertMapFile(QTextStream &t,const char *mapName) ...@@ -87,13 +87,13 @@ static bool convertMapFile(QTextStream &t,const char *mapName)
if (*refPtr!='\0') if (*refPtr!='\0')
{ {
t << "doxygen=\"" << refPtr << ":"; t << "doxygen=\"" << refPtr << ":";
if ((dest=tagDestinationDict[refPtr])) t << *dest << "/"; if ((dest=Doxygen::tagDestinationDict[refPtr])) t << *dest << "/";
t << "\" "; t << "\" ";
} }
t << "href=\""; t << "href=\"";
if (*refPtr!='\0') if (*refPtr!='\0')
{ {
if ((dest=tagDestinationDict[refPtr])) t << *dest << "/"; if ((dest=Doxygen::tagDestinationDict[refPtr])) t << *dest << "/";
} }
t << urlPtr << "\" shape=\"rect\" coords=\"" t << urlPtr << "\" shape=\"rect\" coords=\""
<< x1 << "," << y1 << "," << x2 << "," << y2 << "\">" << endl; << x1 << "," << y1 << "," << x2 << "," << y2 << "\">" << endl;
...@@ -693,8 +693,8 @@ DotGfxHierarchyTable::DotGfxHierarchyTable() ...@@ -693,8 +693,8 @@ DotGfxHierarchyTable::DotGfxHierarchyTable()
// build a graph with each class as a node and the inheritance relations // build a graph with each class as a node and the inheritance relations
// as edges // as edges
initClassHierarchy(&classList); initClassHierarchy(&Doxygen::classList);
ClassListIterator cli(classList); ClassListIterator cli(Doxygen::classList);
ClassDef *cd; ClassDef *cd;
for (cli.toLast();(cd=cli.current());--cli) for (cli.toLast();(cd=cli.current());--cli)
{ {
......
...@@ -54,7 +54,7 @@ ...@@ -54,7 +54,7 @@
#include "ftvhelp.h" #include "ftvhelp.h"
#include "defargs.h" #include "defargs.h"
#include "rtfgen.h" #include "rtfgen.h"
#include "xml.h" //#include "xml.h"
#include "reflist.h" #include "reflist.h"
#include "page.h" #include "page.h"
#include "packagedef.h" #include "packagedef.h"
...@@ -65,140 +65,131 @@ ...@@ -65,140 +65,131 @@
#define pclose _pclose #define pclose _pclose
#endif #endif
// lists ClassList Doxygen::classList; // all documented classes
ClassList classList; // all documented classes ClassDict Doxygen::classDict(1009);
NamespaceList namespaceList; // all namespaces
MemberNameList memberNameList; // class member + related functions NamespaceList Doxygen::namespaceList; // all namespaces
MemberNameList functionNameList; // all unrelated functions NamespaceDict Doxygen::namespaceDict(257);
FileNameList inputNameList; // all input files
StringList inputFiles; MemberNameList Doxygen::memberNameList; // class member + related functions
GroupList groupList; // all groups MemberNameDict Doxygen::memberNameDict(10007);
FormulaList formulaList; // all formulas
MemberNameList Doxygen::functionNameList; // all global function/namespace members
// dictionaries MemberNameDict Doxygen::functionNameDict(10007);
PageSDict *pageSDict = new PageSDict(1009); // all doc pages
PageSDict *exampleSDict = new PageSDict(1009); // all examples FileNameList Doxygen::inputNameList; // all input files
ClassDict classDict(1009); // all documented classes FileNameDict *Doxygen::inputNameDict;
NamespaceDict namespaceDict(257); // all documented namespaces
MemberNameDict memberNameDict(10007); // all class member names GroupList Doxygen::groupList; // all groups
MemberNameDict functionNameDict(10007); // all functions GroupDict Doxygen::groupDict(257);
//StringDict substituteDict(1009); // class name substitutes
SectionDict sectionDict(257); // all page sections FormulaList Doxygen::formulaList; // all formulas
StringDict excludeNameDict(1009); // sections FormulaDict Doxygen::formulaDict(1009); // all formulas
StringDict aliasDict(257); // aliases FormulaDict Doxygen::formulaNameDict(1009); // the label name of all formulas
FileNameDict *inputNameDict; // sections
FileNameDict *includeNameDict; // include names PackageSDict Doxygen::packageDict(257); // java packages
FileNameDict *exampleNameDict; // examples
FileNameDict *imageNameDict; // images PageSDict *Doxygen::pageSDict = new PageSDict(1009); // all doc pages
StringDict typedefDict(1009); // all typedefs PageSDict *Doxygen::exampleSDict = new PageSDict(1009); // all examples
StringDict namespaceAliasDict(257); // all namespace aliases SectionDict Doxygen::sectionDict(257); // all page sections
GroupDict groupDict(257); // all groups StringDict Doxygen::aliasDict(257); // aliases
FormulaDict formulaDict(1009); // all formulas FileNameDict *Doxygen::includeNameDict; // include names
FormulaDict formulaNameDict(1009); // the label name of all formulas FileNameDict *Doxygen::exampleNameDict; // examples
StringDict tagDestinationDict(257); // all tag locations FileNameDict *Doxygen::imageNameDict; // images
StringDict Doxygen::typedefDict(1009); // all typedefs
StringDict Doxygen::namespaceAliasDict(257); // all namespace aliases
StringDict Doxygen::tagDestinationDict(257); // all tag locations
// a member group // a member group
QDict<void> compoundKeywordDict(7); // keywords recognised as compounds QDict<void> Doxygen::expandAsDefinedDict(257); // all macros that should be expanded
QDict<void> expandAsDefinedDict(257); // all macros that should be expanded
OutputList *outputList = 0; // list of output generating objects
PageInfo *mainPage = 0; QIntDict<QCString> Doxygen::memberHeaderDict(1009); // dictionary of the member groups heading
QIntDict<QCString> memberHeaderDict(1009); // dictionary of the member groups heading QIntDict<QCString> Doxygen::memberDocDict(1009); // dictionary of the member groups heading
QIntDict<QCString> memberDocDict(1009); // dictionary of the member groups heading
PackageSDict packageDict(257); // java packages PageInfo *Doxygen::mainPage = 0;
QTextStream Doxygen::tagFile;
static StringList inputFiles;
static StringDict excludeNameDict(1009); // sections
static QDict<void> compoundKeywordDict(7); // keywords recognised as compounds
static OutputList *outputList = 0; // list of output generating objects
void clearAll() void clearAll()
{ {
classList.clear();
namespaceList.clear();
pageSDict->clear();
exampleSDict->clear();
memberNameList.clear();
functionNameList.clear();
inputNameList.clear();
inputFiles.clear(); inputFiles.clear();
groupList.clear();
formulaList.clear();
classDict.clear();
namespaceDict.clear();
memberNameDict.clear();
functionNameDict.clear();
sectionDict.clear();
inputNameDict->clear();
excludeNameDict.clear(); excludeNameDict.clear();
includeNameDict->clear();
exampleNameDict->clear();
imageNameDict->clear();
typedefDict.clear();
groupDict.clear();
formulaDict.clear();
formulaNameDict.clear();
tagDestinationDict.clear();
delete outputList; outputList=0; delete outputList; outputList=0;
delete mainPage; mainPage=0;
Doxygen::classList.clear();
Doxygen::namespaceList.clear();
Doxygen::pageSDict->clear();
Doxygen::exampleSDict->clear();
Doxygen::memberNameList.clear();
Doxygen::functionNameList.clear();
Doxygen::inputNameList.clear();
Doxygen::groupList.clear();
Doxygen::formulaList.clear();
Doxygen::classDict.clear();
Doxygen::namespaceDict.clear();
Doxygen::memberNameDict.clear();
Doxygen::functionNameDict.clear();
Doxygen::sectionDict.clear();
Doxygen::inputNameDict->clear();
Doxygen::includeNameDict->clear();
Doxygen::exampleNameDict->clear();
Doxygen::imageNameDict->clear();
Doxygen::typedefDict.clear();
Doxygen::groupDict.clear();
Doxygen::formulaDict.clear();
Doxygen::formulaNameDict.clear();
Doxygen::tagDestinationDict.clear();
delete Doxygen::mainPage; Doxygen::mainPage=0;
} }
void statistics() void statistics()
{ {
fprintf(stderr,"--- inputNameDict stats ----\n"); fprintf(stderr,"--- inputNameDict stats ----\n");
inputNameDict->statistics(); Doxygen::inputNameDict->statistics();
fprintf(stderr,"--- includeNameDict stats ----\n"); fprintf(stderr,"--- includeNameDict stats ----\n");
includeNameDict->statistics(); Doxygen::includeNameDict->statistics();
fprintf(stderr,"--- exampleNameDict stats ----\n"); fprintf(stderr,"--- exampleNameDict stats ----\n");
exampleNameDict->statistics(); Doxygen::exampleNameDict->statistics();
fprintf(stderr,"--- imageNameDict stats ----\n"); fprintf(stderr,"--- imageNameDict stats ----\n");
imageNameDict->statistics(); Doxygen::imageNameDict->statistics();
fprintf(stderr,"--- classDict stats ----\n"); fprintf(stderr,"--- classDict stats ----\n");
classDict.statistics(); Doxygen::classDict.statistics();
fprintf(stderr,"--- namespaceDict stats ----\n"); fprintf(stderr,"--- namespaceDict stats ----\n");
namespaceDict.statistics(); Doxygen::namespaceDict.statistics();
fprintf(stderr,"--- memberNameDict stats ----\n"); fprintf(stderr,"--- memberNameDict stats ----\n");
memberNameDict.statistics(); Doxygen::memberNameDict.statistics();
fprintf(stderr,"--- functionNameDict stats ----\n"); fprintf(stderr,"--- functionNameDict stats ----\n");
functionNameDict.statistics(); Doxygen::functionNameDict.statistics();
fprintf(stderr,"--- sectionDict stats ----\n");
sectionDict.statistics();
fprintf(stderr,"--- excludeNameDict stats ----\n"); fprintf(stderr,"--- excludeNameDict stats ----\n");
excludeNameDict.statistics(); excludeNameDict.statistics();
fprintf(stderr,"--- aliasDict stats ----\n"); fprintf(stderr,"--- aliasDict stats ----\n");
aliasDict.statistics(); Doxygen::aliasDict.statistics();
fprintf(stderr,"--- typedefDict stats ----\n"); fprintf(stderr,"--- typedefDict stats ----\n");
typedefDict.statistics(); Doxygen::typedefDict.statistics();
fprintf(stderr,"--- namespaceAliasDict stats ----\n"); fprintf(stderr,"--- namespaceAliasDict stats ----\n");
namespaceAliasDict.statistics(); Doxygen::namespaceAliasDict.statistics();
fprintf(stderr,"--- groupDict stats ----\n"); fprintf(stderr,"--- groupDict stats ----\n");
groupDict.statistics(); Doxygen::groupDict.statistics();
fprintf(stderr,"--- formulaDict stats ----\n"); fprintf(stderr,"--- formulaDict stats ----\n");
formulaDict.statistics(); Doxygen::formulaDict.statistics();
fprintf(stderr,"--- formulaNameDict stats ----\n"); fprintf(stderr,"--- formulaNameDict stats ----\n");
formulaNameDict.statistics(); Doxygen::formulaNameDict.statistics();
fprintf(stderr,"--- tagDestinationDict stats ----\n"); fprintf(stderr,"--- tagDestinationDict stats ----\n");
tagDestinationDict.statistics(); Doxygen::tagDestinationDict.statistics();
fprintf(stderr,"--- compoundKeywordDict stats ----\n"); fprintf(stderr,"--- compoundKeywordDict stats ----\n");
compoundKeywordDict.statistics(); compoundKeywordDict.statistics();
fprintf(stderr,"--- expandAsDefinedDict stats ----\n"); fprintf(stderr,"--- expandAsDefinedDict stats ----\n");
expandAsDefinedDict.statistics(); Doxygen::expandAsDefinedDict.statistics();
fprintf(stderr,"--- memberHeaderDict stats ----\n"); fprintf(stderr,"--- memberHeaderDict stats ----\n");
memberHeaderDict.statistics(); Doxygen::memberHeaderDict.statistics();
fprintf(stderr,"--- memberDocDict stats ----\n"); fprintf(stderr,"--- memberDocDict stats ----\n");
memberDocDict.statistics(); Doxygen::memberDocDict.statistics();
} }
int annotatedClasses;
int hierarchyClasses;
int documentedFunctions;
int documentedMembers;
int documentedHtmlFiles;
int documentedFiles;
int documentedGroups;
int documentedNamespaces;
int documentedNamespaceMembers;
int documentedIncludeFiles;
int documentedPages;
int documentedPackages;
QTextStream tagFile;
static void addMemberDocs(Entry *root,MemberDef *md, const char *funcDecl, static void addMemberDocs(Entry *root,MemberDef *md, const char *funcDecl,
ArgumentList *al,bool over_load,NamespaceList *nl=0); ArgumentList *al,bool over_load,NamespaceList *nl=0);
...@@ -206,27 +197,17 @@ static void addMemberDocs(Entry *root,MemberDef *md, const char *funcDecl, ...@@ -206,27 +197,17 @@ static void addMemberDocs(Entry *root,MemberDef *md, const char *funcDecl,
const char idMask[] = "[A-Za-z_][A-Za-z_0-9]*"; const char idMask[] = "[A-Za-z_][A-Za-z_0-9]*";
QCString spaces; QCString spaces;
//----------------------------------------------------------------------
// Returns the standard string that is generated when the \overload
// command is used.
const char *getOverloadDocs()
{
return "This is an overloaded member function, "
"provided for convenience. It differs from the above "
"function only in what argument(s) it accepts.";
}
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
static void addRelatedPage(const char *name,const QCString &ptitle, static void addRelatedPage(const char *name,const QCString &ptitle,
const QCString &doc,QList<QCString> *anchors, const QCString &doc,QList<QCString> *anchors,
const char *fileName,int startLine, const char *fileName,int startLine,
int todoId,int testId,GroupDef *gd=0 int todoId,int testId,GroupDef *gd=0,
TagInfo *tagInfo=0
) )
{ {
PageInfo *pi=0; PageInfo *pi=0;
if ((pi=pageSDict->find(name))) if ((pi=Doxygen::pageSDict->find(name)))
{ {
// append documentation block to the page. // append documentation block to the page.
pi->doc+="\n\n"+doc; pi->doc+="\n\n"+doc;
...@@ -238,19 +219,26 @@ static void addRelatedPage(const char *name,const QCString &ptitle, ...@@ -238,19 +219,26 @@ static void addRelatedPage(const char *name,const QCString &ptitle,
baseName=baseName.left(baseName.length()-4); baseName=baseName.left(baseName.length()-4);
else if (baseName.right(5)==".html") else if (baseName.right(5)==".html")
baseName=baseName.left(baseName.length()-5); baseName=baseName.left(baseName.length()-5);
QCString title=ptitle.stripWhiteSpace(); QCString title=ptitle.stripWhiteSpace();
pi=new PageInfo(fileName,startLine,baseName,doc,title); pi=new PageInfo(fileName,startLine,baseName,doc,title);
pi->todoId=todoId; pi->todoId=todoId;
pi->testId=testId; pi->testId=testId;
if (tagInfo)
{
pi->reference = tagInfo->tagName;
}
QCString pageName; QCString pageName;
if (Config::caseSensitiveNames) if (Config::caseSensitiveNames)
pageName=pi->name.copy(); pageName=pi->name.copy();
else else
pageName=pi->name.lower(); pageName=pi->name.lower();
setFileNameForSections(anchors,pageName); //setFileNameForSections(anchors,pageName,pi);
pi->fileName = pageName;
pi->addSections(anchors);
pageSDict->append(baseName,pi); Doxygen::pageSDict->append(baseName,pi);
if (gd) gd->addPage(pi); if (gd) gd->addPage(pi);
...@@ -260,7 +248,7 @@ static void addRelatedPage(const char *name,const QCString &ptitle, ...@@ -260,7 +248,7 @@ static void addRelatedPage(const char *name,const QCString &ptitle,
// a page name is a label as well! // a page name is a label as well!
SectionInfo *si=new SectionInfo( SectionInfo *si=new SectionInfo(
pi->name,pi->title,SectionInfo::Section); pi->name,pi->title,SectionInfo::Section,pi->reference);
if (gd) if (gd)
{ {
si->fileName=gd->getOutputFileBase(); si->fileName=gd->getOutputFileBase();
...@@ -271,7 +259,7 @@ static void addRelatedPage(const char *name,const QCString &ptitle, ...@@ -271,7 +259,7 @@ static void addRelatedPage(const char *name,const QCString &ptitle,
} }
//printf(" SectionInfo: sec=%p sec->fileName=%s\n",si,si->fileName.data()); //printf(" SectionInfo: sec=%p sec->fileName=%s\n",si,si->fileName.data());
//printf("Adding section info %s\n",pi->name.data()); //printf("Adding section info %s\n",pi->name.data());
sectionDict.insert(pageName,si); Doxygen::sectionDict.insert(pageName,si);
} }
} }
} }
...@@ -283,10 +271,10 @@ static void addRelatedPage(Entry *root) ...@@ -283,10 +271,10 @@ static void addRelatedPage(Entry *root)
QCString *s; QCString *s;
for (;(s=sli.current());++sli) for (;(s=sli.current());++sli)
{ {
if (!s->isEmpty() && (gd=groupDict[*s])) break; if (!s->isEmpty() && (gd=Doxygen::groupDict[*s])) break;
} }
addRelatedPage(root->name,root->args,root->doc,root->anchors, addRelatedPage(root->name,root->args,root->doc,root->anchors,
root->fileName,root->startLine,root->todoId,root->testId,gd root->fileName,root->startLine,root->todoId,root->testId,gd,root->tagInfo
); );
} }
...@@ -322,6 +310,7 @@ static void addRefItem(int todoId,int testId,const char *prefix, ...@@ -322,6 +310,7 @@ static void addRefItem(int todoId,int testId,const char *prefix,
doc += "</dt>\n<dd>"; doc += "</dt>\n<dd>";
doc += item->text; doc += item->text;
doc += "</dd></dl>\n"; doc += "</dd></dl>\n";
//printf("Todo page: %s\n",doc.data());
addRelatedPage("todo",theTranslator->trTodoList(),doc,0,"generated",1,0,0); addRelatedPage("todo",theTranslator->trTodoList(),doc,0,"generated",1,0,0);
item->written=TRUE; item->written=TRUE;
...@@ -368,7 +357,7 @@ static void buildGroupList(Entry *root) ...@@ -368,7 +357,7 @@ static void buildGroupList(Entry *root)
GroupDef *gd; GroupDef *gd;
if ((gd=groupDict[root->name])) if ((gd=Doxygen::groupDict[root->name]))
{ {
warn(root->fileName,root->startLine, warn(root->fileName,root->startLine,
"Warning: group %s already documented. " "Warning: group %s already documented. "
...@@ -385,8 +374,8 @@ static void buildGroupList(Entry *root) ...@@ -385,8 +374,8 @@ static void buildGroupList(Entry *root)
gd->setBriefDescription(root->brief); gd->setBriefDescription(root->brief);
gd->setDocumentation(root->doc); gd->setDocumentation(root->doc);
gd->addSectionsToDefinition(root->anchors); gd->addSectionsToDefinition(root->anchors);
groupList.append(gd); Doxygen::groupList.append(gd);
groupDict.insert(root->name,gd); Doxygen::groupDict.insert(root->name,gd);
addGroupToGroups(root,gd); addGroupToGroups(root,gd);
gd->setRefItems(root->todoId,root->testId); gd->setRefItems(root->todoId,root->testId);
} }
...@@ -401,37 +390,6 @@ static void buildGroupList(Entry *root) ...@@ -401,37 +390,6 @@ static void buildGroupList(Entry *root)
//---------------------------------------------------------------------- //----------------------------------------------------------------------
//void computeGroupRelations(Entry *root)
//{
// if (root->section==Entry::GROUPDOC_SEC && !root->name.isEmpty())
// {
// GroupDef *gd;
//
// if ((gd=groupDict[root->name]))
// {
// QListIterator<QCString> sli(*root->groups);
// QCString *s;
// for (;(s=sli.current());++sli)
// {
// GroupDef *pgd;
// if (!s->isEmpty() && (pgd=groupDict[*s]))
// {
// pgd->addGroup(gd);
// printf("Group %s: in group %s\n",gd->groupName(),s->data());
// }
// }
// }
// }
// EntryListIterator eli(*root->sublist);
// Entry *e;
// for (;(e=eli.current());++eli)
// {
// computeGroupRelations(e);
// }
//}
//----------------------------------------------------------------------
static void buildFileList(Entry *root) static void buildFileList(Entry *root)
{ {
if (((root->section==Entry::FILEDOC_SEC) || if (((root->section==Entry::FILEDOC_SEC) ||
...@@ -440,7 +398,7 @@ static void buildFileList(Entry *root) ...@@ -440,7 +398,7 @@ static void buildFileList(Entry *root)
) )
{ {
bool ambig; bool ambig;
FileDef *fd=findFileDef(inputNameDict,root->name,ambig); FileDef *fd=findFileDef(Doxygen::inputNameDict,root->name,ambig);
if (fd && !ambig) if (fd && !ambig)
{ {
if ((!root->doc.isEmpty() && !fd->documentation().isEmpty()) || if ((!root->doc.isEmpty() && !fd->documentation().isEmpty()) ||
...@@ -467,7 +425,7 @@ static void buildFileList(Entry *root) ...@@ -467,7 +425,7 @@ static void buildFileList(Entry *root)
for (;(s=sli.current());++sli) for (;(s=sli.current());++sli)
{ {
GroupDef *gd=0; GroupDef *gd=0;
if (!s->isEmpty() && (gd=groupDict[*s])) if (!s->isEmpty() && (gd=Doxygen::groupDict[*s]))
{ {
gd->addFile(fd); gd->addFile(fd);
//printf("File %s: in group %s\n",fd->name().data(),s->data()); //printf("File %s: in group %s\n",fd->name().data(),s->data());
...@@ -486,7 +444,7 @@ static void buildFileList(Entry *root) ...@@ -486,7 +444,7 @@ static void buildFileList(Entry *root)
if (ambig) // name is ambigious if (ambig) // name is ambigious
{ {
text+="matches the following input files:\n"; text+="matches the following input files:\n";
text+=showFileDefMatches(inputNameDict,root->name); text+=showFileDefMatches(Doxygen::inputNameDict,root->name);
text+="Please use a more specific name by " text+="Please use a more specific name by "
"including a (larger) part of the path!"; "including a (larger) part of the path!";
} }
...@@ -521,7 +479,7 @@ static void addIncludeFile(ClassDef *cd,FileDef *ifd,Entry *root) ...@@ -521,7 +479,7 @@ static void addIncludeFile(ClassDef *cd,FileDef *ifd,Entry *root)
// see if we need to include a verbatim copy of the header file // see if we need to include a verbatim copy of the header file
//printf("root->includeFile=%s\n",root->includeFile.data()); //printf("root->includeFile=%s\n",root->includeFile.data());
if (!root->includeFile.isEmpty() && if (!root->includeFile.isEmpty() &&
(fd=findFileDef(inputNameDict,root->includeFile,ambig))==0 (fd=findFileDef(Doxygen::inputNameDict,root->includeFile,ambig))==0
) )
{ // explicit request { // explicit request
QCString text; QCString text;
...@@ -532,7 +490,7 @@ static void addIncludeFile(ClassDef *cd,FileDef *ifd,Entry *root) ...@@ -532,7 +490,7 @@ static void addIncludeFile(ClassDef *cd,FileDef *ifd,Entry *root)
if (ambig) // name is ambigious if (ambig) // name is ambigious
{ {
text+="matches the following input files:\n"; text+="matches the following input files:\n";
text+=showFileDefMatches(inputNameDict,root->includeFile); text+=showFileDefMatches(Doxygen::inputNameDict,root->includeFile);
text+="Please use a more specific name by " text+="Please use a more specific name by "
"including a (larger) part of the path!"; "including a (larger) part of the path!";
} }
...@@ -635,7 +593,7 @@ static void buildClassList(Entry *root) ...@@ -635,7 +593,7 @@ static void buildClassList(Entry *root)
bool ambig; bool ambig;
ClassDef *cd; ClassDef *cd;
//printf("findFileDef(%s)\n",root->fileName.data()); //printf("findFileDef(%s)\n",root->fileName.data());
FileDef *fd=findFileDef(inputNameDict,root->fileName,ambig); FileDef *fd=findFileDef(Doxygen::inputNameDict,root->fileName,ambig);
if ((cd=getClass(fullName))) if ((cd=getClass(fullName)))
{ {
...@@ -679,7 +637,7 @@ static void buildClassList(Entry *root) ...@@ -679,7 +637,7 @@ static void buildClassList(Entry *root)
if (root->bodyLine!=-1 && cd->getStartBodyLine()==-1) if (root->bodyLine!=-1 && cd->getStartBodyLine()==-1)
{ {
cd->setBodySegment(root->bodyLine,root->endBodyLine); cd->setBodySegment(root->bodyLine,root->endBodyLine);
cd->setBodyDef(findFileDef(inputNameDict,root->fileName,ambig)); cd->setBodyDef(findFileDef(Doxygen::inputNameDict,root->fileName,ambig));
} }
cd->addSectionsToDefinition(root->anchors); cd->addSectionsToDefinition(root->anchors);
cd->setName(fullName); // change name to match docs cd->setName(fullName); // change name to match docs
...@@ -790,10 +748,10 @@ static void buildClassList(Entry *root) ...@@ -790,10 +748,10 @@ static void buildClassList(Entry *root)
// add class to the list // add class to the list
classList.inSort(cd); Doxygen::classList.inSort(cd);
//printf("ClassDict.insert(%s)\n",resolveDefines(fullName).data()); //printf("ClassDict.insert(%s)\n",resolveDefines(fullName).data());
//classDict.insert(resolveDefines(fullName),cd); //classDict.insert(resolveDefines(fullName),cd);
classDict.insert(fullName,cd); Doxygen::classDict.insert(fullName,cd);
} }
} }
} }
...@@ -822,7 +780,7 @@ static void buildNamespaceList(Entry *root) ...@@ -822,7 +780,7 @@ static void buildNamespaceList(Entry *root)
//printf("Found namespace %s in %s at line %d\n",root->name.data(), //printf("Found namespace %s in %s at line %d\n",root->name.data(),
// root->fileName.data(), root->startLine); // root->fileName.data(), root->startLine);
NamespaceDef *nd; NamespaceDef *nd;
if ((nd=namespaceDict[fullName])) if ((nd=Doxygen::namespaceDict[fullName]))
{ {
if (!root->doc.isEmpty() || !root->brief.isEmpty()) // block contains docs if (!root->doc.isEmpty() || !root->brief.isEmpty()) // block contains docs
{ {
...@@ -857,7 +815,7 @@ static void buildNamespaceList(Entry *root) ...@@ -857,7 +815,7 @@ static void buildNamespaceList(Entry *root)
bool ambig; bool ambig;
// file definition containing the namespace nd // file definition containing the namespace nd
FileDef *fd=findFileDef(inputNameDict,root->fileName,ambig); FileDef *fd=findFileDef(Doxygen::inputNameDict,root->fileName,ambig);
// insert the namespace in the file definition // insert the namespace in the file definition
if (fd) fd->insertNamespace(nd); if (fd) fd->insertNamespace(nd);
addNamespaceToGroups(root,nd); addNamespaceToGroups(root,nd);
...@@ -885,7 +843,7 @@ static void buildNamespaceList(Entry *root) ...@@ -885,7 +843,7 @@ static void buildNamespaceList(Entry *root)
bool ambig; bool ambig;
// file definition containing the namespace nd // file definition containing the namespace nd
FileDef *fd=findFileDef(inputNameDict,root->fileName,ambig); FileDef *fd=findFileDef(Doxygen::inputNameDict,root->fileName,ambig);
// insert the namespace in the file definition // insert the namespace in the file definition
if (fd) fd->insertNamespace(nd); if (fd) fd->insertNamespace(nd);
...@@ -895,8 +853,8 @@ static void buildNamespaceList(Entry *root) ...@@ -895,8 +853,8 @@ static void buildNamespaceList(Entry *root)
nd->setBodySegment(root->bodyLine,root->endBodyLine); nd->setBodySegment(root->bodyLine,root->endBodyLine);
nd->setBodyDef(fd); nd->setBodyDef(fd);
// add class to the list // add class to the list
namespaceList.inSort(nd); Doxygen::namespaceList.inSort(nd);
namespaceDict.insert(fullName,nd); Doxygen::namespaceDict.insert(fullName,nd);
} }
} }
...@@ -922,7 +880,7 @@ static void findUsingDirectives(Entry *root) ...@@ -922,7 +880,7 @@ static void findUsingDirectives(Entry *root)
{ {
NamespaceDef *usingNd = 0; NamespaceDef *usingNd = 0;
NamespaceDef *nd = 0; NamespaceDef *nd = 0;
FileDef *fd = findFileDef(inputNameDict,root->fileName,ambig); FileDef *fd = findFileDef(Doxygen::inputNameDict,root->fileName,ambig);
QCString nsName; QCString nsName;
// see if the using statement was found inside a namespace or inside // see if the using statement was found inside a namespace or inside
...@@ -986,13 +944,13 @@ static void findUsingDirectives(Entry *root) ...@@ -986,13 +944,13 @@ static void findUsingDirectives(Entry *root)
for (;(s=sli.current());++sli) for (;(s=sli.current());++sli)
{ {
GroupDef *gd=0; GroupDef *gd=0;
if (!s->isEmpty() && (gd=groupDict[*s])) if (!s->isEmpty() && (gd=Doxygen::groupDict[*s]))
gd->addNamespace(nd); gd->addNamespace(nd);
} }
bool ambig; bool ambig;
// file definition containing the namespace nd // file definition containing the namespace nd
FileDef *fd=findFileDef(inputNameDict,root->fileName,ambig); FileDef *fd=findFileDef(Doxygen::inputNameDict,root->fileName,ambig);
// insert the namespace in the file definition // insert the namespace in the file definition
if (fd) if (fd)
{ {
...@@ -1004,8 +962,8 @@ static void findUsingDirectives(Entry *root) ...@@ -1004,8 +962,8 @@ static void findUsingDirectives(Entry *root)
nd->setBriefDescription(root->brief); nd->setBriefDescription(root->brief);
nd->insertUsedFile(root->fileName); nd->insertUsedFile(root->fileName);
// add class to the list // add class to the list
namespaceList.inSort(nd); Doxygen::namespaceList.inSort(nd);
namespaceDict.insert(root->name,nd); Doxygen::namespaceDict.insert(root->name,nd);
nd->setRefItems(root->todoId,root->testId); nd->setRefItems(root->todoId,root->testId);
} }
} }
...@@ -1031,7 +989,7 @@ static void findUsingDeclarations(Entry *root) ...@@ -1031,7 +989,7 @@ static void findUsingDeclarations(Entry *root)
{ {
ClassDef *usingCd = 0; ClassDef *usingCd = 0;
NamespaceDef *nd = 0; NamespaceDef *nd = 0;
FileDef *fd = findFileDef(inputNameDict,root->fileName,ambig); FileDef *fd = findFileDef(Doxygen::inputNameDict,root->fileName,ambig);
QCString scName; QCString scName;
// see if the using statement was found inside a namespace or inside // see if the using statement was found inside a namespace or inside
...@@ -1160,7 +1118,7 @@ static MemberDef *addVariableToClass( ...@@ -1160,7 +1118,7 @@ static MemberDef *addVariableToClass(
// see if the member is already found in the same scope // see if the member is already found in the same scope
// (this may be the case for a static member that is initialized // (this may be the case for a static member that is initialized
// outside the class) // outside the class)
MemberName *mn=memberNameDict[name]; MemberName *mn=Doxygen::memberNameDict[name];
if (mn) if (mn)
{ {
MemberNameIterator mni(*mn); MemberNameIterator mni(*mn);
...@@ -1207,7 +1165,7 @@ static MemberDef *addVariableToClass( ...@@ -1207,7 +1165,7 @@ static MemberDef *addVariableToClass(
// md->setMemberGroup(memberGroupDict[root->mGrpId]); // md->setMemberGroup(memberGroupDict[root->mGrpId]);
// //
bool ambig; bool ambig;
md->setBodyDef(findFileDef(inputNameDict,root->fileName,ambig)); md->setBodyDef(findFileDef(Doxygen::inputNameDict,root->fileName,ambig));
// add the member to the global list // add the member to the global list
if (mn) if (mn)
...@@ -1219,8 +1177,8 @@ static MemberDef *addVariableToClass( ...@@ -1219,8 +1177,8 @@ static MemberDef *addVariableToClass(
mn = new MemberName(name); mn = new MemberName(name);
mn->append(md); mn->append(md);
//printf("Adding memberName=%s\n",mn->memberName()); //printf("Adding memberName=%s\n",mn->memberName());
memberNameDict.insert(name,mn); Doxygen::memberNameDict.insert(name,mn);
memberNameList.append(mn); Doxygen::memberNameList.append(mn);
// add the member to the class // add the member to the class
} }
cd->insertMember(md); cd->insertMember(md);
...@@ -1253,7 +1211,7 @@ static MemberDef *addVariableToFile( ...@@ -1253,7 +1211,7 @@ static MemberDef *addVariableToFile(
); );
bool ambig; bool ambig;
FileDef *fd = findFileDef(inputNameDict,root->fileName,ambig); FileDef *fd = findFileDef(Doxygen::inputNameDict,root->fileName,ambig);
// see if the function is inside a namespace // see if the function is inside a namespace
NamespaceDef *nd = 0; NamespaceDef *nd = 0;
...@@ -1297,7 +1255,7 @@ static MemberDef *addVariableToFile( ...@@ -1297,7 +1255,7 @@ static MemberDef *addVariableToFile(
} }
if (def.left(7)=="static ") def=def.right(def.length()-7); if (def.left(7)=="static ") def=def.right(def.length()-7);
MemberName *mn=functionNameDict[name]; MemberName *mn=Doxygen::functionNameDict[name];
if (mn) if (mn)
{ {
QCString nscope=removeAnonymousScopes(scope); QCString nscope=removeAnonymousScopes(scope);
...@@ -1325,7 +1283,7 @@ static MemberDef *addVariableToFile( ...@@ -1325,7 +1283,7 @@ static MemberDef *addVariableToFile(
// merge ingroup specifiers // merge ingroup specifiers
if (md->getGroupDef()==0 && root->groups->first()) if (md->getGroupDef()==0 && root->groups->first())
{ {
GroupDef *gd=groupDict[root->groups->first()->data()]; GroupDef *gd=Doxygen::groupDict[root->groups->first()->data()];
md->setGroupDef(gd); md->setGroupDef(gd);
} }
else if (md->getGroupDef()!=0 && root->groups->count()==0) else if (md->getGroupDef()!=0 && root->groups->count()==0)
...@@ -1391,8 +1349,8 @@ static MemberDef *addVariableToFile( ...@@ -1391,8 +1349,8 @@ static MemberDef *addVariableToFile(
{ {
mn = new MemberName(name); mn = new MemberName(name);
mn->append(md); mn->append(md);
functionNameDict.insert(name,mn); Doxygen::functionNameDict.insert(name,mn);
functionNameList.append(mn); Doxygen::functionNameList.append(mn);
} }
return md; return md;
} }
...@@ -1699,7 +1657,7 @@ static void buildMemberList(Entry *root) ...@@ -1699,7 +1657,7 @@ static void buildMemberList(Entry *root)
md->setMemberSpecifiers(root->memSpec); md->setMemberSpecifiers(root->memSpec);
md->setMemberGroupId(root->mGrpId); md->setMemberGroupId(root->mGrpId);
bool ambig; bool ambig;
md->setBodyDef(findFileDef(inputNameDict,root->fileName,ambig)); md->setBodyDef(findFileDef(Doxygen::inputNameDict,root->fileName,ambig));
//md->setScopeTemplateArguments(root->tArgList); //md->setScopeTemplateArguments(root->tArgList);
md->addSectionsToDefinition(root->anchors); md->addSectionsToDefinition(root->anchors);
QCString def; QCString def;
...@@ -1770,7 +1728,7 @@ static void buildMemberList(Entry *root) ...@@ -1770,7 +1728,7 @@ static void buildMemberList(Entry *root)
// add member to the global list of all members // add member to the global list of all members
MemberName *mn; MemberName *mn;
if ((mn=memberNameDict[name])) if ((mn=Doxygen::memberNameDict[name]))
{ {
mn->append(md); mn->append(md);
} }
...@@ -1779,8 +1737,8 @@ static void buildMemberList(Entry *root) ...@@ -1779,8 +1737,8 @@ static void buildMemberList(Entry *root)
mn = new MemberName(name); mn = new MemberName(name);
mn->append(md); mn->append(md);
//printf("Adding memberName=%s\n",mn->memberName()); //printf("Adding memberName=%s\n",mn->memberName());
memberNameDict.insert(name,mn); Doxygen::memberNameDict.insert(name,mn);
memberNameList.append(mn); Doxygen::memberNameList.append(mn);
} }
// add member to the class cd // add member to the class cd
...@@ -1806,7 +1764,7 @@ static void buildMemberList(Entry *root) ...@@ -1806,7 +1764,7 @@ static void buildMemberList(Entry *root)
bool found=FALSE; bool found=FALSE;
MemberName *mn; MemberName *mn;
//MemberDef *fmd; //MemberDef *fmd;
if ((mn=functionNameDict[rname])) if ((mn=Doxygen::functionNameDict[rname]))
{ {
//printf("--> function %s already found!\n",rname.data()); //printf("--> function %s already found!\n",rname.data());
MemberNameIterator mni(*mn); MemberNameIterator mni(*mn);
...@@ -1854,14 +1812,14 @@ static void buildMemberList(Entry *root) ...@@ -1854,14 +1812,14 @@ static void buildMemberList(Entry *root)
{ {
md->setBodySegment(root->bodyLine,root->endBodyLine); md->setBodySegment(root->bodyLine,root->endBodyLine);
bool ambig; bool ambig;
md->setBodyDef(findFileDef(inputNameDict,root->fileName,ambig)); md->setBodyDef(findFileDef(Doxygen::inputNameDict,root->fileName,ambig));
} }
md->addSectionsToDefinition(root->anchors); md->addSectionsToDefinition(root->anchors);
// merge ingroup specifiers // merge ingroup specifiers
if (md->getGroupDef()==0 && root->groups->first()) if (md->getGroupDef()==0 && root->groups->first())
{ {
GroupDef *gd=groupDict[root->groups->first()->data()]; GroupDef *gd=Doxygen::groupDict[root->groups->first()->data()];
md->setGroupDef(gd); md->setGroupDef(gd);
} }
else if (md->getGroupDef()!=0 && root->groups->count()==0) else if (md->getGroupDef()!=0 && root->groups->count()==0)
...@@ -1896,7 +1854,7 @@ static void buildMemberList(Entry *root) ...@@ -1896,7 +1854,7 @@ static void buildMemberList(Entry *root)
//md->setBody(root->body); //md->setBody(root->body);
md->setBodySegment(root->bodyLine,root->endBodyLine); md->setBodySegment(root->bodyLine,root->endBodyLine);
bool ambig; bool ambig;
FileDef *fd=findFileDef(inputNameDict,root->fileName,ambig); FileDef *fd=findFileDef(Doxygen::inputNameDict,root->fileName,ambig);
md->setBodyDef(fd); md->setBodyDef(fd);
md->addSectionsToDefinition(root->anchors); md->addSectionsToDefinition(root->anchors);
md->setMemberSpecifiers(root->memSpec); md->setMemberSpecifiers(root->memSpec);
...@@ -1969,7 +1927,7 @@ static void buildMemberList(Entry *root) ...@@ -1969,7 +1927,7 @@ static void buildMemberList(Entry *root)
// add member to the list of file members // add member to the list of file members
MemberName *mn; MemberName *mn;
if ((mn=functionNameDict[name])) if ((mn=Doxygen::functionNameDict[name]))
{ {
mn->append(md); mn->append(md);
} }
...@@ -1977,8 +1935,8 @@ static void buildMemberList(Entry *root) ...@@ -1977,8 +1935,8 @@ static void buildMemberList(Entry *root)
{ {
mn = new MemberName(name); mn = new MemberName(name);
mn->append(md); mn->append(md);
functionNameDict.insert(name,mn); Doxygen::functionNameDict.insert(name,mn);
functionNameList.append(mn); Doxygen::functionNameList.append(mn);
} }
addMemberToGroups(root,md); addMemberToGroups(root,md);
} }
...@@ -2011,13 +1969,13 @@ static void buildMemberList(Entry *root) ...@@ -2011,13 +1969,13 @@ static void buildMemberList(Entry *root)
static void findFriends() static void findFriends()
{ {
//printf("findFriends()\n"); //printf("findFriends()\n");
MemberNameListIterator fnli(functionNameList); MemberNameListIterator fnli(Doxygen::functionNameList);
MemberName *fn; MemberName *fn;
for (;(fn=fnli.current());++fnli) // for each global function name for (;(fn=fnli.current());++fnli) // for each global function name
{ {
//printf("Function name=`%s'\n",fn->memberName()); //printf("Function name=`%s'\n",fn->memberName());
MemberName *mn; MemberName *mn;
if ((mn=memberNameDict[fn->memberName()])) if ((mn=Doxygen::memberNameDict[fn->memberName()]))
{ // there are members with the same name { // there are members with the same name
//printf("Function name is also a member name\n"); //printf("Function name is also a member name\n");
MemberNameIterator fni(*fn); MemberNameIterator fni(*fn);
...@@ -2074,7 +2032,7 @@ static void transferFunctionDocumentation() ...@@ -2074,7 +2032,7 @@ static void transferFunctionDocumentation()
//printf("transferFunctionDocumentation()\n"); //printf("transferFunctionDocumentation()\n");
// find matching function declaration and definitions. // find matching function declaration and definitions.
MemberNameListIterator mnli(functionNameList); MemberNameListIterator mnli(Doxygen::functionNameList);
MemberName *mn; MemberName *mn;
for (;(mn=mnli.current());++mnli) for (;(mn=mnli.current());++mnli)
{ {
...@@ -2153,7 +2111,7 @@ static void transferRelatedFunctionDocumentation() ...@@ -2153,7 +2111,7 @@ static void transferRelatedFunctionDocumentation()
{ {
// find match between function declaration and definition for // find match between function declaration and definition for
// related functions // related functions
MemberNameListIterator mnli(functionNameList); MemberNameListIterator mnli(Doxygen::functionNameList);
MemberName *mn; MemberName *mn;
for (mnli.toFirst();(mn=mnli.current());++mnli) for (mnli.toFirst();(mn=mnli.current());++mnli)
{ {
...@@ -2164,7 +2122,7 @@ static void transferRelatedFunctionDocumentation() ...@@ -2164,7 +2122,7 @@ static void transferRelatedFunctionDocumentation()
{ {
//printf(" Function `%s'\n",md->name().data()); //printf(" Function `%s'\n",md->name().data());
MemberName *rmn; MemberName *rmn;
if ((rmn=memberNameDict[md->name()])) // check if there is a member with the same name if ((rmn=Doxygen::memberNameDict[md->name()])) // check if there is a member with the same name
{ {
//printf(" Member name found\n"); //printf(" Member name found\n");
MemberDef *rmd; MemberDef *rmd;
...@@ -2191,7 +2149,7 @@ static void replaceNamespaceAliases(QCString &scope,int i) ...@@ -2191,7 +2149,7 @@ static void replaceNamespaceAliases(QCString &scope,int i)
//printf("replaceNamespaceAliases(%s,%d)\n",scope.data(),i); //printf("replaceNamespaceAliases(%s,%d)\n",scope.data(),i);
while (i>0) while (i>0)
{ {
QCString *s = namespaceAliasDict[scope.left(i)]; QCString *s = Doxygen::namespaceAliasDict[scope.left(i)];
if (s) if (s)
{ {
scope=*s+scope.right(scope.length()-i); scope=*s+scope.right(scope.length()-i);
...@@ -2396,10 +2354,10 @@ static bool findBaseClassRelation(Entry *root,ClassDef *cd, ...@@ -2396,10 +2354,10 @@ static bool findBaseClassRelation(Entry *root,ClassDef *cd,
baseClass->insertUsedFile(root->fileName); baseClass->insertUsedFile(root->fileName);
// add class to the list // add class to the list
//classList.inSort(baseClass); //classList.inSort(baseClass);
classList.inSort(baseClass); Doxygen::classList.inSort(baseClass);
//printf("ClassDict.insert(%s)\n",resolveDefines(fullName).data()); //printf("ClassDict.insert(%s)\n",resolveDefines(fullName).data());
//classDict.insert(resolveDefines(bi->name),baseClass); //classDict.insert(resolveDefines(bi->name),baseClass);
classDict.insert(baseClassName,baseClass); Doxygen::classDict.insert(baseClassName,baseClass);
return TRUE; return TRUE;
} }
else else
...@@ -2503,13 +2461,13 @@ static void computeClassRelations(Entry *root) ...@@ -2503,13 +2461,13 @@ static void computeClassRelations(Entry *root)
static void computeMemberReferences() static void computeMemberReferences()
{ {
ClassDef *cd=classList.first(); ClassDef *cd=Doxygen::classList.first();
while (cd) while (cd)
{ {
cd->computeAnchors(); cd->computeAnchors();
cd=classList.next(); cd=Doxygen::classList.next();
} }
FileName *fn=inputNameList.first(); FileName *fn=Doxygen::inputNameList.first();
while (fn) while (fn)
{ {
FileDef *fd=fn->first(); FileDef *fd=fn->first();
...@@ -2518,19 +2476,19 @@ static void computeMemberReferences() ...@@ -2518,19 +2476,19 @@ static void computeMemberReferences()
fd->computeAnchors(); fd->computeAnchors();
fd=fn->next(); fd=fn->next();
} }
fn=inputNameList.next(); fn=Doxygen::inputNameList.next();
} }
NamespaceDef *nd=namespaceList.first(); NamespaceDef *nd=Doxygen::namespaceList.first();
while (nd) while (nd)
{ {
nd->computeAnchors(); nd->computeAnchors();
nd=namespaceList.next(); nd=Doxygen::namespaceList.next();
} }
GroupDef *gd=groupList.first(); GroupDef *gd=Doxygen::groupList.first();
while (gd) while (gd)
{ {
gd->computeAnchors(); gd->computeAnchors();
gd=groupList.next(); gd=Doxygen::groupList.next();
} }
} }
...@@ -2538,13 +2496,13 @@ static void computeMemberReferences() ...@@ -2538,13 +2496,13 @@ static void computeMemberReferences()
static void addTodoTestReferences() static void addTodoTestReferences()
{ {
ClassDef *cd=classList.first(); ClassDef *cd=Doxygen::classList.first();
while (cd) while (cd)
{ {
addRefItem(cd->todoId(),cd->testId(),"class",cd->getOutputFileBase(),cd->name()); addRefItem(cd->todoId(),cd->testId(),"class",cd->getOutputFileBase(),cd->name());
cd=classList.next(); cd=Doxygen::classList.next();
} }
FileName *fn=inputNameList.first(); FileName *fn=Doxygen::inputNameList.first();
while (fn) while (fn)
{ {
FileDef *fd=fn->first(); FileDef *fd=fn->first();
...@@ -2553,27 +2511,27 @@ static void addTodoTestReferences() ...@@ -2553,27 +2511,27 @@ static void addTodoTestReferences()
addRefItem(fd->todoId(),fd->testId(),"file",fd->getOutputFileBase(),fd->name()); addRefItem(fd->todoId(),fd->testId(),"file",fd->getOutputFileBase(),fd->name());
fd=fn->next(); fd=fn->next();
} }
fn=inputNameList.next(); fn=Doxygen::inputNameList.next();
} }
NamespaceDef *nd=namespaceList.first(); NamespaceDef *nd=Doxygen::namespaceList.first();
while (nd) while (nd)
{ {
addRefItem(nd->todoId(),nd->testId(),"namespace",nd->getOutputFileBase(),nd->name()); addRefItem(nd->todoId(),nd->testId(),"namespace",nd->getOutputFileBase(),nd->name());
nd=namespaceList.next(); nd=Doxygen::namespaceList.next();
} }
GroupDef *gd=groupList.first(); GroupDef *gd=Doxygen::groupList.first();
while (gd) while (gd)
{ {
addRefItem(gd->todoId(),gd->testId(),"group",gd->getOutputFileBase(),gd->name()); addRefItem(gd->todoId(),gd->testId(),"group",gd->getOutputFileBase(),gd->name());
gd=groupList.next(); gd=Doxygen::groupList.next();
} }
PageSDictIterator pdi(*pageSDict); PageSDictIterator pdi(*Doxygen::pageSDict);
PageInfo *pi=0; PageInfo *pi=0;
for (pdi.toFirst();(pi=pdi.current());++pdi) for (pdi.toFirst();(pi=pdi.current());++pdi)
{ {
addRefItem(pi->todoId,pi->testId,"page",pi->name,pi->title); addRefItem(pi->todoId,pi->testId,"page",pi->name,pi->title);
} }
MemberNameListIterator mnli(memberNameList); MemberNameListIterator mnli(Doxygen::memberNameList);
MemberName *mn=0; MemberName *mn=0;
for (mnli.toFirst();(mn=mnli.current());++mnli) for (mnli.toFirst();(mn=mnli.current());++mnli)
{ {
...@@ -2592,7 +2550,7 @@ static void addTodoTestReferences() ...@@ -2592,7 +2550,7 @@ static void addTodoTestReferences()
} }
} }
} }
MemberNameListIterator fnli(functionNameList); MemberNameListIterator fnli(Doxygen::functionNameList);
for (fnli.toFirst();(mn=fnli.current());++fnli) for (fnli.toFirst();(mn=fnli.current());++fnli)
{ {
MemberNameIterator mni(*mn); MemberNameIterator mni(*mn);
...@@ -2706,7 +2664,7 @@ static void addMemberDocs(Entry *root, ...@@ -2706,7 +2664,7 @@ static void addMemberDocs(Entry *root,
// md->setBody(root->body); // md->setBody(root->body);
//} //}
bool ambig; bool ambig;
FileDef *fd=findFileDef(inputNameDict,root->fileName,ambig); FileDef *fd=findFileDef(Doxygen::inputNameDict,root->fileName,ambig);
if (fd) if (fd)
{ {
...@@ -2854,10 +2812,10 @@ static bool findUnrelatedFunction(Entry *root, ...@@ -2854,10 +2812,10 @@ static bool findUnrelatedFunction(Entry *root,
Debug::print(Debug::FindMembers,0, Debug::print(Debug::FindMembers,0,
"2. findUnrelatedFunction(namespace=%s,name=%s,tempArg=%s,decl=%s)\n", "2. findUnrelatedFunction(namespace=%s,name=%s,tempArg=%s,decl=%s)\n",
namespaceName.data(),name,tempArg,decl); namespaceName.data(),name,tempArg,decl);
MemberName *mn=functionNameDict[n+tempArg]; // look in function dictionary MemberName *mn=Doxygen::functionNameDict[n+tempArg]; // look in function dictionary
if (mn==0) if (mn==0)
{ {
mn=functionNameDict[n]; // try without template arguments mn=Doxygen::functionNameDict[n]; // try without template arguments
} }
if (mn) // function name defined if (mn) // function name defined
{ {
...@@ -2872,7 +2830,7 @@ static bool findUnrelatedFunction(Entry *root, ...@@ -2872,7 +2830,7 @@ static bool findUnrelatedFunction(Entry *root,
NamespaceDef *nd=md->getNamespaceDef(); NamespaceDef *nd=md->getNamespaceDef();
//printf("Namespace namespaceName=%s nd=%s\n", //printf("Namespace namespaceName=%s nd=%s\n",
// namespaceName.data(),nd ? nd->name().data() : "<none>"); // namespaceName.data(),nd ? nd->name().data() : "<none>");
FileDef *fd=findFileDef(inputNameDict,root->fileName,ambig); FileDef *fd=findFileDef(Doxygen::inputNameDict,root->fileName,ambig);
//printf("File %s\n",fd ? fd->name().data() : "<none>"); //printf("File %s\n",fd ? fd->name().data() : "<none>");
NamespaceList *nl = fd ? fd->getUsedNamespaces() : 0; NamespaceList *nl = fd ? fd->getUsedNamespaces() : 0;
//printf("NamespaceList %p\n",nl); //printf("NamespaceList %p\n",nl);
...@@ -3355,11 +3313,11 @@ static void findMember(Entry *root,QCString funcDecl,QCString related,bool overl ...@@ -3355,11 +3313,11 @@ static void findMember(Entry *root,QCString funcDecl,QCString related,bool overl
"1. funcName=`%s'\n",funcName.data()); "1. funcName=`%s'\n",funcName.data());
if (!funcTempList.isEmpty()) // try with member specialization if (!funcTempList.isEmpty()) // try with member specialization
{ {
mn=memberNameDict[funcName+funcTempList]; mn=Doxygen::memberNameDict[funcName+funcTempList];
} }
if (mn==0) // try without specialization if (mn==0) // try without specialization
{ {
mn=memberNameDict[funcName]; mn=Doxygen::memberNameDict[funcName];
} }
if (!isRelated && mn) // function name already found if (!isRelated && mn) // function name already found
{ {
...@@ -3379,7 +3337,7 @@ static void findMember(Entry *root,QCString funcDecl,QCString related,bool overl ...@@ -3379,7 +3337,7 @@ static void findMember(Entry *root,QCString funcDecl,QCString related,bool overl
ClassDef *tcd=0; ClassDef *tcd=0;
bool ambig; bool ambig;
FileDef *fd=findFileDef(inputNameDict,root->fileName,ambig); FileDef *fd=findFileDef(Doxygen::inputNameDict,root->fileName,ambig);
NamespaceDef *nd=0; NamespaceDef *nd=0;
if (!namespaceName.isEmpty()) nd=getResolvedNamespace(namespaceName); if (!namespaceName.isEmpty()) nd=getResolvedNamespace(namespaceName);
tcd = findClassDefinition(fd,nd,scopeName,classTempList); tcd = findClassDefinition(fd,nd,scopeName,classTempList);
...@@ -3463,7 +3421,7 @@ static void findMember(Entry *root,QCString funcDecl,QCString related,bool overl ...@@ -3463,7 +3421,7 @@ static void findMember(Entry *root,QCString funcDecl,QCString related,bool overl
// TODO: match loop for all possible scopes // TODO: match loop for all possible scopes
bool ambig; bool ambig;
FileDef *fd=findFileDef(inputNameDict,root->fileName,ambig); FileDef *fd=findFileDef(Doxygen::inputNameDict,root->fileName,ambig);
// list of namespaces using in the file that this member definition is part of // list of namespaces using in the file that this member definition is part of
NamespaceList *nl = fd ? fd->getUsedNamespaces() : 0; NamespaceList *nl = fd ? fd->getUsedNamespaces() : 0;
...@@ -3580,7 +3538,7 @@ static void findMember(Entry *root,QCString funcDecl,QCString related,bool overl ...@@ -3580,7 +3538,7 @@ static void findMember(Entry *root,QCString funcDecl,QCString related,bool overl
md->addSectionsToDefinition(root->anchors); md->addSectionsToDefinition(root->anchors);
md->setBodySegment(root->bodyLine,root->endBodyLine); md->setBodySegment(root->bodyLine,root->endBodyLine);
bool ambig; bool ambig;
FileDef *fd=findFileDef(inputNameDict,root->fileName,ambig); FileDef *fd=findFileDef(Doxygen::inputNameDict,root->fileName,ambig);
md->setBodyDef(fd); md->setBodyDef(fd);
md->setMemberSpecifiers(root->memSpec); md->setMemberSpecifiers(root->memSpec);
md->setMemberGroupId(root->mGrpId); md->setMemberGroupId(root->mGrpId);
...@@ -3609,7 +3567,7 @@ static void findMember(Entry *root,QCString funcDecl,QCString related,bool overl ...@@ -3609,7 +3567,7 @@ static void findMember(Entry *root,QCString funcDecl,QCString related,bool overl
{ {
bool newMember=TRUE; // assume we have a new member bool newMember=TRUE; // assume we have a new member
bool newMemberName=FALSE; bool newMemberName=FALSE;
if ((mn=memberNameDict[funcName])==0) if ((mn=Doxygen::memberNameDict[funcName])==0)
{ {
mn=new MemberName(funcName); mn=new MemberName(funcName);
newMemberName=TRUE; // we create a new member name newMemberName=TRUE; // we create a new member name
...@@ -3662,7 +3620,7 @@ static void findMember(Entry *root,QCString funcDecl,QCString related,bool overl ...@@ -3662,7 +3620,7 @@ static void findMember(Entry *root,QCString funcDecl,QCString related,bool overl
bool found=FALSE; bool found=FALSE;
if (root->bodyLine==-1) if (root->bodyLine==-1)
{ {
MemberName *rmn=functionNameDict[funcName]; MemberName *rmn=Doxygen::functionNameDict[funcName];
if (rmn) if (rmn)
{ {
MemberDef *rmd=rmn->first(); MemberDef *rmd=rmn->first();
...@@ -3691,7 +3649,7 @@ static void findMember(Entry *root,QCString funcDecl,QCString related,bool overl ...@@ -3691,7 +3649,7 @@ static void findMember(Entry *root,QCString funcDecl,QCString related,bool overl
{ {
md->setBodySegment(root->bodyLine,root->endBodyLine); md->setBodySegment(root->bodyLine,root->endBodyLine);
bool ambig; bool ambig;
FileDef *fd=findFileDef(inputNameDict,root->fileName,ambig); FileDef *fd=findFileDef(Doxygen::inputNameDict,root->fileName,ambig);
md->setBodyDef(fd); md->setBodyDef(fd);
} }
...@@ -3715,8 +3673,8 @@ static void findMember(Entry *root,QCString funcDecl,QCString related,bool overl ...@@ -3715,8 +3673,8 @@ static void findMember(Entry *root,QCString funcDecl,QCString related,bool overl
if (newMemberName) if (newMemberName)
{ {
//printf("Adding memberName=%s\n",mn->memberName()); //printf("Adding memberName=%s\n",mn->memberName());
memberNameList.append(mn); Doxygen::memberNameList.append(mn);
memberNameDict.insert(funcName,mn); Doxygen::memberNameDict.insert(funcName,mn);
} }
} }
} }
...@@ -3896,22 +3854,22 @@ static void findEnums(Entry *root) ...@@ -3896,22 +3854,22 @@ static void findEnums(Entry *root)
{ {
//printf("Enum `%s'::`%s'\n",cd->name(),name.data()); //printf("Enum `%s'::`%s'\n",cd->name(),name.data());
fd=0; fd=0;
mnd=&memberNameDict; mnd=&Doxygen::memberNameDict;
mnl=&memberNameList; mnl=&Doxygen::memberNameList;
isGlobal=FALSE; isGlobal=FALSE;
} }
else if (nd && !nd->name().isEmpty() && nd->name().at(0)!='@') // found enum inside namespace else if (nd && !nd->name().isEmpty() && nd->name().at(0)!='@') // found enum inside namespace
{ {
mnd=&functionNameDict; mnd=&Doxygen::functionNameDict;
mnl=&functionNameList; mnl=&Doxygen::functionNameList;
isGlobal=TRUE; isGlobal=TRUE;
} }
else // found a global enum else // found a global enum
{ {
bool ambig; bool ambig;
fd=findFileDef(inputNameDict,root->fileName,ambig); fd=findFileDef(Doxygen::inputNameDict,root->fileName,ambig);
mnd=&functionNameDict; mnd=&Doxygen::functionNameDict;
mnl=&functionNameList; mnl=&Doxygen::functionNameList;
isGlobal=TRUE; isGlobal=TRUE;
} }
if (!name.isEmpty()) if (!name.isEmpty())
...@@ -3931,7 +3889,7 @@ static void findEnums(Entry *root) ...@@ -3931,7 +3889,7 @@ static void findEnums(Entry *root)
//md->setDefLine(root->startLine); //md->setDefLine(root->startLine);
md->setBodySegment(root->bodyLine,root->endBodyLine); md->setBodySegment(root->bodyLine,root->endBodyLine);
bool ambig; bool ambig;
md->setBodyDef(findFileDef(inputNameDict,root->fileName,ambig)); md->setBodyDef(findFileDef(Doxygen::inputNameDict,root->fileName,ambig));
//printf("Enum %s definition at line %d of %s: protection=%d\n", //printf("Enum %s definition at line %d of %s: protection=%d\n",
// root->name.data(),root->bodyLine,root->fileName.data(),root->protection); // root->name.data(),root->bodyLine,root->fileName.data(),root->protection);
md->addSectionsToDefinition(root->anchors); md->addSectionsToDefinition(root->anchors);
...@@ -3961,7 +3919,7 @@ static void findEnums(Entry *root) ...@@ -3961,7 +3919,7 @@ static void findEnums(Entry *root)
{ {
bool ambig; bool ambig;
QCString filePathName = root->parent->fileName; QCString filePathName = root->parent->fileName;
fd=findFileDef(inputNameDict,filePathName,ambig); fd=findFileDef(Doxygen::inputNameDict,filePathName,ambig);
} }
if (fd) if (fd)
{ {
...@@ -4098,7 +4056,7 @@ static void findEnumDocumentation(Entry *root) ...@@ -4098,7 +4056,7 @@ static void findEnumDocumentation(Entry *root)
{ {
//printf("Enum: scope=`%s' name=`%s'\n",cd->name(),name.data()); //printf("Enum: scope=`%s' name=`%s'\n",cd->name(),name.data());
QCString className=cd->name().copy(); QCString className=cd->name().copy();
MemberName *mn=memberNameDict[name]; MemberName *mn=Doxygen::memberNameDict[name];
if (mn) if (mn)
{ {
MemberNameIterator mni(*mn); MemberNameIterator mni(*mn);
...@@ -4139,7 +4097,7 @@ static void findEnumDocumentation(Entry *root) ...@@ -4139,7 +4097,7 @@ static void findEnumDocumentation(Entry *root)
else // enum outside class else // enum outside class
{ {
MemberDef *md; MemberDef *md;
MemberName *mn=functionNameDict[name]; MemberName *mn=Doxygen::functionNameDict[name];
if (mn && (md=mn->getFirst())) if (mn && (md=mn->getFirst()))
{ {
md->setDocumentation(root->doc); md->setDocumentation(root->doc);
...@@ -4205,8 +4163,8 @@ static void findDEV(const MemberNameList &mnl) ...@@ -4205,8 +4163,8 @@ static void findDEV(const MemberNameList &mnl)
// values. // values.
static void findDocumentedEnumValues() static void findDocumentedEnumValues()
{ {
findDEV(memberNameList); findDEV(Doxygen::memberNameList);
findDEV(functionNameList); findDEV(Doxygen::functionNameList);
} }
...@@ -4217,7 +4175,7 @@ static void findDocumentedEnumValues() ...@@ -4217,7 +4175,7 @@ static void findDocumentedEnumValues()
static void computeMemberRelations() static void computeMemberRelations()
{ {
MemberNameListIterator mnli(memberNameList); MemberNameListIterator mnli(Doxygen::memberNameList);
MemberName *mn; MemberName *mn;
for ( ; (mn=mnli.current()) ; ++mnli ) // for each member name for ( ; (mn=mnli.current()) ; ++mnli ) // for each member name
{ {
...@@ -4270,7 +4228,7 @@ static void computeMemberRelations() ...@@ -4270,7 +4228,7 @@ static void computeMemberRelations()
static void computeClassImplUsageRelations() static void computeClassImplUsageRelations()
{ {
ClassDef *cd; ClassDef *cd;
ClassListIterator cli(classList); ClassListIterator cli(Doxygen::classList);
for (;(cd=cli.current());++cli) for (;(cd=cli.current());++cli)
{ {
cd->determineImplUsageRelation(); cd->determineImplUsageRelation();
...@@ -4285,7 +4243,7 @@ static void buildCompleteMemberLists() ...@@ -4285,7 +4243,7 @@ static void buildCompleteMemberLists()
{ {
ClassDef *cd; ClassDef *cd;
// merge the member list of base classes into the inherited classes. // merge the member list of base classes into the inherited classes.
ClassListIterator cli(classList); ClassListIterator cli(Doxygen::classList);
for (cli.toFirst();(cd=cli.current());++cli) for (cli.toFirst();(cd=cli.current());++cli)
{ {
if (!cd->isReference() && // not an external class if (!cd->isReference() && // not an external class
...@@ -4308,9 +4266,9 @@ static void generateFileSources() ...@@ -4308,9 +4266,9 @@ static void generateFileSources()
{ {
if (documentedHtmlFiles==0) return; if (documentedHtmlFiles==0) return;
if (inputNameList.count()>0) if (Doxygen::inputNameList.count()>0)
{ {
FileNameListIterator fnli(inputNameList); FileNameListIterator fnli(Doxygen::inputNameList);
FileName *fn; FileName *fn;
for (;(fn=fnli.current());++fnli) for (;(fn=fnli.current());++fnli)
{ {
...@@ -4334,9 +4292,9 @@ static void generateFileDocs() ...@@ -4334,9 +4292,9 @@ static void generateFileDocs()
{ {
if (documentedHtmlFiles==0) return; if (documentedHtmlFiles==0) return;
if (inputNameList.count()>0) if (Doxygen::inputNameList.count()>0)
{ {
FileNameListIterator fnli(inputNameList); FileNameListIterator fnli(Doxygen::inputNameList);
FileName *fn; FileName *fn;
for (fnli.toFirst();(fn=fnli.current());++fnli) for (fnli.toFirst();(fn=fnli.current());++fnli)
{ {
...@@ -4361,7 +4319,7 @@ static void generateFileDocs() ...@@ -4361,7 +4319,7 @@ static void generateFileDocs()
static void addSourceReferences() static void addSourceReferences()
{ {
// add source references for class definitions // add source references for class definitions
ClassListIterator cli(classList); ClassListIterator cli(Doxygen::classList);
ClassDef *cd=0; ClassDef *cd=0;
for (cli.toFirst();(cd=cli.current());++cli) for (cli.toFirst();(cd=cli.current());++cli)
{ {
...@@ -4372,7 +4330,7 @@ static void addSourceReferences() ...@@ -4372,7 +4330,7 @@ static void addSourceReferences()
} }
} }
// add source references for namespace definitions // add source references for namespace definitions
NamespaceListIterator nli(namespaceList); NamespaceListIterator nli(Doxygen::namespaceList);
NamespaceDef *nd=0; NamespaceDef *nd=0;
for (nli.toFirst();(nd=nli.current());++nli) for (nli.toFirst();(nd=nli.current());++nli)
{ {
...@@ -4384,7 +4342,7 @@ static void addSourceReferences() ...@@ -4384,7 +4342,7 @@ static void addSourceReferences()
} }
// add source references for member names // add source references for member names
MemberNameListIterator mnli(memberNameList); MemberNameListIterator mnli(Doxygen::memberNameList);
MemberName *mn=0; MemberName *mn=0;
for (mnli.toFirst();(mn=mnli.current());++mnli) for (mnli.toFirst();(mn=mnli.current());++mnli)
{ {
...@@ -4404,7 +4362,7 @@ static void addSourceReferences() ...@@ -4404,7 +4362,7 @@ static void addSourceReferences()
} }
} }
} }
MemberNameListIterator fnli(functionNameList); MemberNameListIterator fnli(Doxygen::functionNameList);
for (fnli.toFirst();(mn=fnli.current());++fnli) for (fnli.toFirst();(mn=fnli.current());++fnli)
{ {
MemberNameIterator mni(*mn); MemberNameIterator mni(*mn);
...@@ -4456,12 +4414,12 @@ static void generateClassDocs() ...@@ -4456,12 +4414,12 @@ static void generateClassDocs()
msg("Generating member index...\n"); msg("Generating member index...\n");
writeMemberIndex(*outputList); writeMemberIndex(*outputList);
if (exampleSDict->count()>0) if (Doxygen::exampleSDict->count()>0)
{ {
msg("Generating example index...\n"); msg("Generating example index...\n");
} }
ClassListIterator cli(classList); ClassListIterator cli(Doxygen::classList);
for ( ; cli.current() ; ++cli ) for ( ; cli.current() ; ++cli )
{ {
ClassDef *cd=cli.current(); ClassDef *cd=cli.current();
...@@ -4480,7 +4438,7 @@ static void generateClassDocs() ...@@ -4480,7 +4438,7 @@ static void generateClassDocs()
static void inheritDocumentation() static void inheritDocumentation()
{ {
MemberNameListIterator mnli(memberNameList); MemberNameListIterator mnli(Doxygen::memberNameList);
MemberName *mn; MemberName *mn;
//int count=0; //int count=0;
for (;(mn=mnli.current());++mnli) for (;(mn=mnli.current());++mnli)
...@@ -4514,14 +4472,14 @@ static void inheritDocumentation() ...@@ -4514,14 +4472,14 @@ static void inheritDocumentation()
static void addMembersToMemberGroup() static void addMembersToMemberGroup()
{ {
// for each class // for each class
ClassListIterator cli(classList); ClassListIterator cli(Doxygen::classList);
ClassDef *cd; ClassDef *cd;
for ( ; (cd=cli.current()) ; ++cli ) for ( ; (cd=cli.current()) ; ++cli )
{ {
cd->addMembersToMemberGroup(); cd->addMembersToMemberGroup();
} }
// for each file // for each file
FileName *fn=inputNameList.first(); FileName *fn=Doxygen::inputNameList.first();
while (fn) while (fn)
{ {
FileDef *fd=fn->first(); FileDef *fd=fn->first();
...@@ -4530,21 +4488,21 @@ static void addMembersToMemberGroup() ...@@ -4530,21 +4488,21 @@ static void addMembersToMemberGroup()
fd->addMembersToMemberGroup(); fd->addMembersToMemberGroup();
fd=fn->next(); fd=fn->next();
} }
fn=inputNameList.next(); fn=Doxygen::inputNameList.next();
} }
// for each namespace // for each namespace
NamespaceDef *nd=namespaceList.first(); NamespaceDef *nd=Doxygen::namespaceList.first();
while (nd) while (nd)
{ {
nd->addMembersToMemberGroup(); nd->addMembersToMemberGroup();
nd=namespaceList.next(); nd=Doxygen::namespaceList.next();
} }
// for each group // for each group
GroupDef *gd=groupList.first(); GroupDef *gd=Doxygen::groupList.first();
while (gd) while (gd)
{ {
gd->addMembersToMemberGroup(); gd->addMembersToMemberGroup();
gd=groupList.next(); gd=Doxygen::groupList.next();
} }
} }
...@@ -4553,14 +4511,14 @@ static void addMembersToMemberGroup() ...@@ -4553,14 +4511,14 @@ static void addMembersToMemberGroup()
static void distributeMemberGroupDocumentation() static void distributeMemberGroupDocumentation()
{ {
// for each class // for each class
ClassListIterator cli(classList); ClassListIterator cli(Doxygen::classList);
ClassDef *cd; ClassDef *cd;
for ( ; (cd=cli.current()) ; ++cli ) for ( ; (cd=cli.current()) ; ++cli )
{ {
cd->distributeMemberGroupDocumentation(); cd->distributeMemberGroupDocumentation();
} }
// for each file // for each file
FileName *fn=inputNameList.first(); FileName *fn=Doxygen::inputNameList.first();
while (fn) while (fn)
{ {
FileDef *fd=fn->first(); FileDef *fd=fn->first();
...@@ -4569,21 +4527,21 @@ static void distributeMemberGroupDocumentation() ...@@ -4569,21 +4527,21 @@ static void distributeMemberGroupDocumentation()
fd->distributeMemberGroupDocumentation(); fd->distributeMemberGroupDocumentation();
fd=fn->next(); fd=fn->next();
} }
fn=inputNameList.next(); fn=Doxygen::inputNameList.next();
} }
// for each namespace // for each namespace
NamespaceDef *nd=namespaceList.first(); NamespaceDef *nd=Doxygen::namespaceList.first();
while (nd) while (nd)
{ {
nd->distributeMemberGroupDocumentation(); nd->distributeMemberGroupDocumentation();
nd=namespaceList.next(); nd=Doxygen::namespaceList.next();
} }
// for each group // for each group
GroupDef *gd=groupList.first(); GroupDef *gd=Doxygen::groupList.first();
while (gd) while (gd)
{ {
gd->distributeMemberGroupDocumentation(); gd->distributeMemberGroupDocumentation();
gd=groupList.next(); gd=Doxygen::groupList.next();
} }
} }
...@@ -4607,11 +4565,11 @@ static void findDefineDocumentation(Entry *root) ...@@ -4607,11 +4565,11 @@ static void findDefineDocumentation(Entry *root)
md->setReference(root->tagInfo->tagName); md->setReference(root->tagInfo->tagName);
bool ambig; bool ambig;
QCString filePathName = root->parent->fileName; QCString filePathName = root->parent->fileName;
FileDef *fd=findFileDef(inputNameDict,filePathName,ambig); FileDef *fd=findFileDef(Doxygen::inputNameDict,filePathName,ambig);
//printf("Searching for `%s' fd=%p\n",filePathName.data(),fd); //printf("Searching for `%s' fd=%p\n",filePathName.data(),fd);
md->setFileDef(fd); md->setFileDef(fd);
MemberName *mn; MemberName *mn;
if ((mn=functionNameDict[root->name])) if ((mn=Doxygen::functionNameDict[root->name]))
{ {
mn->append(md); mn->append(md);
} }
...@@ -4619,11 +4577,11 @@ static void findDefineDocumentation(Entry *root) ...@@ -4619,11 +4577,11 @@ static void findDefineDocumentation(Entry *root)
{ {
mn = new MemberName(root->name); mn = new MemberName(root->name);
mn->append(md); mn->append(md);
functionNameDict.insert(root->name,mn); Doxygen::functionNameDict.insert(root->name,mn);
functionNameList.append(mn); Doxygen::functionNameList.append(mn);
} }
} }
MemberName *mn=functionNameDict[root->name]; MemberName *mn=Doxygen::functionNameDict[root->name];
if (mn) if (mn)
{ {
int count=0; int count=0;
...@@ -4646,7 +4604,7 @@ static void findDefineDocumentation(Entry *root) ...@@ -4646,7 +4604,7 @@ static void findDefineDocumentation(Entry *root)
md->setBriefDescription(root->brief); md->setBriefDescription(root->brief);
md->setBodySegment(root->bodyLine,root->endBodyLine); md->setBodySegment(root->bodyLine,root->endBodyLine);
bool ambig; bool ambig;
md->setBodyDef(findFileDef(inputNameDict,root->fileName,ambig)); md->setBodyDef(findFileDef(Doxygen::inputNameDict,root->fileName,ambig));
md->addSectionsToDefinition(root->anchors); md->addSectionsToDefinition(root->anchors);
md->setMaxInitLines(root->initLines); md->setMaxInitLines(root->initLines);
if (root->mGrpId!=-1) md->setMemberGroupId(root->mGrpId); if (root->mGrpId!=-1) md->setMemberGroupId(root->mGrpId);
...@@ -4679,7 +4637,7 @@ static void findDefineDocumentation(Entry *root) ...@@ -4679,7 +4637,7 @@ static void findDefineDocumentation(Entry *root)
md->setBriefDescription(root->brief); md->setBriefDescription(root->brief);
md->setBodySegment(root->bodyLine,root->endBodyLine); md->setBodySegment(root->bodyLine,root->endBodyLine);
bool ambig; bool ambig;
md->setBodyDef(findFileDef(inputNameDict,root->fileName,ambig)); md->setBodyDef(findFileDef(Doxygen::inputNameDict,root->fileName,ambig));
md->addSectionsToDefinition(root->anchors); md->addSectionsToDefinition(root->anchors);
if (root->mGrpId!=-1) md->setMemberGroupId(root->mGrpId); if (root->mGrpId!=-1) md->setMemberGroupId(root->mGrpId);
addMemberToGroups(root,md); addMemberToGroups(root,md);
...@@ -4739,19 +4697,21 @@ static void findMainPage(Entry *root) ...@@ -4739,19 +4697,21 @@ static void findMainPage(Entry *root)
{ {
if (root->section == Entry::MAINPAGEDOC_SEC) if (root->section == Entry::MAINPAGEDOC_SEC)
{ {
if (mainPage==0) if (Doxygen::mainPage==0)
{ {
//printf("Found main page! \n======\n%s\n=======\n",root->doc.data()); //printf("Found main page! \n======\n%s\n=======\n",root->doc.data());
QCString title=root->args.stripWhiteSpace(); QCString title=root->args.stripWhiteSpace();
mainPage = new PageInfo(root->fileName,root->startLine, Doxygen::mainPage = new PageInfo(root->fileName,root->startLine,
"index", root->doc,title); "index", root->doc,title);
setFileNameForSections(root->anchors,"index"); //setFileNameForSections(root->anchors,"index",Doxygen::mainPage);
Doxygen::mainPage->fileName = "index";
Doxygen::mainPage->addSections(root->anchors);
// a page name is a label as well! // a page name is a label as well!
SectionInfo *si=new SectionInfo( SectionInfo *si=new SectionInfo(
mainPage->name,mainPage->title,SectionInfo::Section); Doxygen::mainPage->name,Doxygen::mainPage->title,SectionInfo::Section);
si->fileName="index"; si->fileName="index";
sectionDict.insert("index",si); Doxygen::sectionDict.insert("index",si);
} }
else else
{ {
...@@ -4778,15 +4738,15 @@ static void buildPackageList(Entry *root) ...@@ -4778,15 +4738,15 @@ static void buildPackageList(Entry *root)
if (root->section == Entry::PACKAGE_SEC) if (root->section == Entry::PACKAGE_SEC)
{ {
PackageDef *pd=0; PackageDef *pd=0;
if (!root->name.isEmpty() && (pd=packageDict.find(root->name))==0) if (!root->name.isEmpty() && (pd=Doxygen::packageDict.find(root->name))==0)
{ {
pd = new PackageDef(root->fileName,root->startLine,root->name); pd = new PackageDef(root->fileName,root->startLine,root->name);
packageDict.inSort(root->name,pd); Doxygen::packageDict.inSort(root->name,pd);
} }
if (pd) if (pd)
{ {
bool ambig; bool ambig;
FileDef *fd=findFileDef(inputNameDict,root->fileName,ambig); FileDef *fd=findFileDef(Doxygen::inputNameDict,root->fileName,ambig);
if (fd) if (fd)
{ {
fd->setPackageDef(pd); fd->setPackageDef(pd);
...@@ -4807,7 +4767,7 @@ static void buildPackageList(Entry *root) ...@@ -4807,7 +4767,7 @@ static void buildPackageList(Entry *root)
static void addClassesToPackages() static void addClassesToPackages()
{ {
ClassDef *cd; ClassDef *cd;
ClassListIterator cli(classList); ClassListIterator cli(Doxygen::classList);
for (;(cd=cli.current());++cli) for (;(cd=cli.current());++cli)
{ {
PackageDef *pd = cd->packageDef(); PackageDef *pd = cd->packageDef();
...@@ -4819,7 +4779,7 @@ static void addClassesToPackages() ...@@ -4819,7 +4779,7 @@ static void addClassesToPackages()
static void resolveUserReferences() static void resolveUserReferences()
{ {
QDictIterator<SectionInfo> sdi(sectionDict); QDictIterator<SectionInfo> sdi(Doxygen::sectionDict);
SectionInfo *si; SectionInfo *si;
for (;(si=sdi.current());++sdi) for (;(si=sdi.current());++sdi)
{ {
...@@ -4846,29 +4806,11 @@ static void resolveUserReferences() ...@@ -4846,29 +4806,11 @@ static void resolveUserReferences()
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
// generate all separate documentation pages // generate all separate documentation pages
//void generateMainPageDocs()
//{
// if (mainPage)
// {
// msg("Generating docs for the main page\n",mainPage->name.data());
// outputList->disable(OutputGenerator::Man);
// startFile(*outputList,mainPage->name,mainPage->title);
// SectionInfo *si=0;
// if (!mainPage->title.isEmpty() && !mainPage->name.isEmpty() &&
// (si=sectionDict[mainPage->name])!=0)
// {
// outputList->writeSection(si->label,si->title,FALSE);
// }
// parseDoc(*outputList,0,0,mainPage->doc);
// endFile(*outputList);
// outputList->enable(OutputGenerator::Man);
// }
//}
static void generatePageDocs() static void generatePageDocs()
{ {
if (documentedPages==0) return; if (documentedPages==0) return;
PageSDictIterator pdi(*pageSDict); PageSDictIterator pdi(*Doxygen::pageSDict);
PageInfo *pi=0; PageInfo *pi=0;
for (pdi.toFirst();(pi=pdi.current());++pdi) for (pdi.toFirst();(pi=pdi.current());++pdi)
{ {
...@@ -4885,7 +4827,7 @@ static void generatePageDocs() ...@@ -4885,7 +4827,7 @@ static void generatePageDocs()
startFile(*outputList,pageName,pi->title); startFile(*outputList,pageName,pi->title);
SectionInfo *si=0; SectionInfo *si=0;
if (!pi->title.isEmpty() && !pi->name.isEmpty() && if (!pi->title.isEmpty() && !pi->name.isEmpty() &&
(si=sectionDict[pi->name])!=0) (si=Doxygen::sectionDict.find(pi->name))!=0)
{ {
outputList->startSection(si->label,si->title,FALSE); outputList->startSection(si->label,si->title,FALSE);
outputList->docify(si->title); outputList->docify(si->title);
...@@ -4899,11 +4841,12 @@ static void generatePageDocs() ...@@ -4899,11 +4841,12 @@ static void generatePageDocs()
if (!Config::genTagFile.isEmpty()) if (!Config::genTagFile.isEmpty())
{ {
tagFile << " <compound kind=\"page\">" << endl; Doxygen::tagFile << " <compound kind=\"page\">" << endl;
tagFile << " <name>" << pi->name << "</name>" << endl; Doxygen::tagFile << " <name>" << pi->name << "</name>" << endl;
tagFile << " <title>" << pi->title << "</title>" << endl; Doxygen::tagFile << " <title>" << pi->title << "</title>" << endl;
tagFile << " <filename>" << pi->name << "</filename>" << endl; Doxygen::tagFile << " <filename>" << pi->name << "</filename>" << endl;
tagFile << " </compound>" << endl; pi->writeDocAnchorsToTagFile();
Doxygen::tagFile << " </compound>" << endl;
} }
} }
} }
...@@ -4918,7 +4861,7 @@ static void buildExampleList(Entry *root) ...@@ -4918,7 +4861,7 @@ static void buildExampleList(Entry *root)
{ {
if (!root->name.isEmpty()) if (!root->name.isEmpty())
{ {
if (exampleSDict->find(root->name)) if (Doxygen::exampleSDict->find(root->name))
{ {
warn(root->fileName,root->startLine, warn(root->fileName,root->startLine,
"Warning: Example %s was already documented. Ignoring " "Warning: Example %s was already documented. Ignoring "
...@@ -4930,10 +4873,14 @@ static void buildExampleList(Entry *root) ...@@ -4930,10 +4873,14 @@ static void buildExampleList(Entry *root)
{ {
PageInfo *pi=new PageInfo(root->fileName,root->startLine, PageInfo *pi=new PageInfo(root->fileName,root->startLine,
root->name,root->doc,root->args); root->name,root->doc,root->args);
setFileNameForSections(root->anchors, //setFileNameForSections(root->anchors,
convertFileName(pi->name)+"-example" // convertFileName(pi->name)+"-example",
); // pi
exampleSDict->inSort(root->name,pi); // );
pi->fileName = convertFileName(pi->name)+"-example";
pi->addSections(root->anchors);
Doxygen::exampleSDict->inSort(root->name,pi);
addExampleToGroups(root,pi); addExampleToGroups(root,pi);
} }
} }
...@@ -4959,7 +4906,7 @@ static void buildExampleList(Entry *root) ...@@ -4959,7 +4906,7 @@ static void buildExampleList(Entry *root)
static void generateExampleDocs() static void generateExampleDocs()
{ {
outputList->disable(OutputGenerator::Man); outputList->disable(OutputGenerator::Man);
PageSDictIterator pdi(*exampleSDict); PageSDictIterator pdi(*Doxygen::exampleSDict);
PageInfo *pi=0; PageInfo *pi=0;
for (pdi.toFirst();(pi=pdi.current());++pdi) for (pdi.toFirst();(pi=pdi.current());++pdi)
{ {
...@@ -4980,7 +4927,7 @@ static void generateExampleDocs() ...@@ -4980,7 +4927,7 @@ static void generateExampleDocs()
static void generateGroupDocs() static void generateGroupDocs()
{ {
GroupListIterator gli(groupList); GroupListIterator gli(Doxygen::groupList);
GroupDef *gd; GroupDef *gd;
for (;(gd=gli.current());++gli) for (;(gd=gli.current());++gli)
{ {
...@@ -4997,9 +4944,9 @@ static void generatePackageDocs() ...@@ -4997,9 +4944,9 @@ static void generatePackageDocs()
{ {
writePackageIndex(*outputList); writePackageIndex(*outputList);
if (packageDict.count()>0) if (Doxygen::packageDict.count()>0)
{ {
PackageSDict::Iterator pdi(packageDict); PackageSDict::Iterator pdi(Doxygen::packageDict);
PackageDef *pd; PackageDef *pd;
for (pdi.toFirst();(pd=pdi.current());++pdi) for (pdi.toFirst();(pd=pdi.current());++pdi)
{ {
...@@ -5015,7 +4962,7 @@ static void generateNamespaceDocs() ...@@ -5015,7 +4962,7 @@ static void generateNamespaceDocs()
{ {
writeNamespaceIndex(*outputList); writeNamespaceIndex(*outputList);
NamespaceListIterator nli(namespaceList); NamespaceListIterator nli(Doxygen::namespaceList);
NamespaceDef *nd; NamespaceDef *nd;
for (;(nd=nli.current());++nli) for (;(nd=nli.current());++nli)
{ {
...@@ -5243,7 +5190,7 @@ static void readTagFile(Entry *root,const char *tl) ...@@ -5243,7 +5190,7 @@ static void readTagFile(Entry *root,const char *tl)
fileName = tagLine.left(eqPos).stripWhiteSpace(); fileName = tagLine.left(eqPos).stripWhiteSpace();
destName = tagLine.right(tagLine.length()-eqPos-1).stripWhiteSpace(); destName = tagLine.right(tagLine.length()-eqPos-1).stripWhiteSpace();
QFileInfo fi(fileName); QFileInfo fi(fileName);
tagDestinationDict.insert(fi.fileName(),new QCString(destName)); Doxygen::tagDestinationDict.insert(fi.fileName(),new QCString(destName));
//printf("insert tagDestination %s->%s\n",fi.fileName().data(),destName.data()); //printf("insert tagDestination %s->%s\n",fi.fileName().data(),destName.data());
} }
else else
...@@ -5627,9 +5574,9 @@ static void readFormulaRepository() ...@@ -5627,9 +5574,9 @@ static void readFormulaRepository()
QCString formName = line.left(se); QCString formName = line.left(se);
QCString formText = line.right(line.length()-se-1); QCString formText = line.right(line.length()-se-1);
Formula *f=new Formula(formText); Formula *f=new Formula(formText);
formulaList.append(f); Doxygen::formulaList.append(f);
formulaDict.insert(formText,f); Doxygen::formulaDict.insert(formText,f);
formulaNameDict.insert(formName,f); Doxygen::formulaNameDict.insert(formName,f);
} }
} }
} }
...@@ -5676,19 +5623,21 @@ static const char *getArg(int argc,char **argv,int &optind) ...@@ -5676,19 +5623,21 @@ static const char *getArg(int argc,char **argv,int &optind)
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
int main(int argc,char **argv) void initDoxygen()
{ {
#if QT_VERSION >= 200 #if QT_VERSION >= 200
setlocale(LC_ALL,""); setlocale(LC_ALL,"");
#endif #endif
initPreprocessor(); initPreprocessor();
}
void readConfiguration(int argc, char **argv)
{
/************************************************************************** /**************************************************************************
* Handle arguments * * Handle arguments *
**************************************************************************/ **************************************************************************/
char *s;
int optind=1; int optind=1;
const char *configName=0; const char *configName=0;
const char *debugLabel; const char *debugLabel;
...@@ -5894,19 +5843,22 @@ int main(int argc,char **argv) ...@@ -5894,19 +5843,22 @@ int main(int argc,char **argv)
substituteEnvironmentVars(); substituteEnvironmentVars();
checkConfig(); checkConfig();
}
inputNameDict = new FileNameDict(1009); void parseInput()
includeNameDict = new FileNameDict(1009); {
exampleNameDict = new FileNameDict(1009); Doxygen::inputNameDict = new FileNameDict(1009);
imageNameDict = new FileNameDict(257); Doxygen::includeNameDict = new FileNameDict(1009);
Doxygen::exampleNameDict = new FileNameDict(1009);
Doxygen::imageNameDict = new FileNameDict(257);
if (!Config::docURL.isEmpty()) if (!Config::docURL.isEmpty())
{ {
tagDestinationDict.insert("_doc",new QCString(Config::docURL)); Doxygen::tagDestinationDict.insert("_doc",new QCString(Config::docURL));
} }
if (!Config::cgiURL.isEmpty()) if (!Config::cgiURL.isEmpty())
{ {
tagDestinationDict.insert("_cgi",new QCString(Config::cgiURL+"/"+Config::cgiName)); Doxygen::tagDestinationDict.insert("_cgi",new QCString(Config::cgiURL+"/"+Config::cgiName));
} }
/************************************************************************** /**************************************************************************
...@@ -5923,47 +5875,18 @@ int main(int argc,char **argv) ...@@ -5923,47 +5875,18 @@ int main(int argc,char **argv)
compoundKeywordDict.insert("interface",(void *)8); compoundKeywordDict.insert("interface",(void *)8);
compoundKeywordDict.insert("exception",(void *)8); compoundKeywordDict.insert("exception",(void *)8);
/**************************************************************************
* Initialize output generators *
**************************************************************************/
outputList = new OutputList(TRUE);
if (Config::generateHtml)
{
outputList->add(new HtmlGenerator);
HtmlGenerator::init();
if (Config::htmlHelpFlag) HtmlHelp::getInstance()->initialize();
if (Config::ftvHelpFlag) FTVHelp::getInstance()->initialize();
copyStyleSheet();
}
if (Config::generateLatex)
{
outputList->add(new LatexGenerator);
LatexGenerator::init();
}
if (Config::generateMan)
{
outputList->add(new ManGenerator);
ManGenerator::init();
}
if (Config::generateRTF)
{
outputList->add(new RTFGenerator);
RTFGenerator::init();
}
/************************************************************************** /**************************************************************************
* Read and preprocess input * * Read and preprocess input *
**************************************************************************/ **************************************************************************/
// gather names of all files in the include path // gather names of all files in the include path
msg("Searching for include files...\n"); msg("Searching for include files...\n");
s=Config::includePath.first(); char *s=Config::includePath.first();
while (s) while (s)
{ {
QStrList *pl = &Config::includeFilePatternList; QStrList *pl = &Config::includeFilePatternList;
if (pl->count()==0) pl = &Config::filePatternList; if (pl->count()==0) pl = &Config::filePatternList;
readFileOrDirectory(s,0,includeNameDict,0,pl, readFileOrDirectory(s,0,Doxygen::includeNameDict,0,pl,
&Config::excludePatternList,0,0); &Config::excludePatternList,0,0);
s=Config::includePath.next(); s=Config::includePath.next();
} }
...@@ -5972,7 +5895,7 @@ int main(int argc,char **argv) ...@@ -5972,7 +5895,7 @@ int main(int argc,char **argv)
s=Config::examplePath.first(); s=Config::examplePath.first();
while (s) while (s)
{ {
readFileOrDirectory(s,0,exampleNameDict,0,&Config::examplePatternList, readFileOrDirectory(s,0,Doxygen::exampleNameDict,0,&Config::examplePatternList,
0,0,0); 0,0,0);
s=Config::examplePath.next(); s=Config::examplePath.next();
} }
...@@ -5981,7 +5904,7 @@ int main(int argc,char **argv) ...@@ -5981,7 +5904,7 @@ int main(int argc,char **argv)
s=Config::imagePath.first(); s=Config::imagePath.first();
while (s) while (s)
{ {
readFileOrDirectory(s,0,imageNameDict,0,0, readFileOrDirectory(s,0,Doxygen::imageNameDict,0,0,
0,0,0); 0,0,0);
s=Config::imagePath.next(); s=Config::imagePath.next();
} }
...@@ -6000,8 +5923,8 @@ int main(int argc,char **argv) ...@@ -6000,8 +5923,8 @@ int main(int argc,char **argv)
s=Config::inputSources.first(); s=Config::inputSources.first();
while (s) while (s)
{ {
inputSize+=readFileOrDirectory(s,&inputNameList, inputSize+=readFileOrDirectory(s,&Doxygen::inputNameList,
inputNameDict,&excludeNameDict, Doxygen::inputNameDict,&excludeNameDict,
&Config::filePatternList, &Config::filePatternList,
&Config::excludePatternList, &Config::excludePatternList,
&inputFiles,0); &inputFiles,0);
...@@ -6012,19 +5935,19 @@ int main(int argc,char **argv) ...@@ -6012,19 +5935,19 @@ int main(int argc,char **argv)
s=Config::expandAsDefinedList.first(); s=Config::expandAsDefinedList.first();
while (s) while (s)
{ {
if (expandAsDefinedDict[s]==0) if (Doxygen::expandAsDefinedDict[s]==0)
{ {
expandAsDefinedDict.insert(s,(void *)666); Doxygen::expandAsDefinedDict.insert(s,(void *)666);
} }
s=Config::expandAsDefinedList.next(); s=Config::expandAsDefinedList.next();
} }
// add aliases to a dictionary // add aliases to a dictionary
aliasDict.setAutoDelete(TRUE); Doxygen::aliasDict.setAutoDelete(TRUE);
s=Config::aliasList.first(); s=Config::aliasList.first();
while (s) while (s)
{ {
if (aliasDict[s]==0) if (Doxygen::aliasDict[s]==0)
{ {
QCString alias=s; QCString alias=s;
int i=alias.find('='); int i=alias.find('=');
...@@ -6058,10 +5981,10 @@ int main(int argc,char **argv) ...@@ -6058,10 +5981,10 @@ int main(int argc,char **argv)
//printf("Alias: found name=`%s' value=`%s'\n",name.data(),value.data()); //printf("Alias: found name=`%s' value=`%s'\n",name.data(),value.data());
if (!name.isEmpty()) if (!name.isEmpty())
{ {
QCString *dn=aliasDict[name]; QCString *dn=Doxygen::aliasDict[name];
if (dn==0) // insert new alias if (dn==0) // insert new alias
{ {
aliasDict.insert(name,new QCString(value)); Doxygen::aliasDict.insert(name,new QCString(value));
} }
else // overwrite previous alias else // overwrite previous alias
{ {
...@@ -6113,20 +6036,6 @@ int main(int argc,char **argv) ...@@ -6113,20 +6036,6 @@ int main(int argc,char **argv)
s=Config::tagFileList.next(); s=Config::tagFileList.next();
} }
QFile *tag=0;
if (!Config::genTagFile.isEmpty())
{
tag=new QFile(Config::genTagFile);
if (!tag->open(IO_WriteOnly))
{
err("Error: cannot open tag file %s for writing\n",
Config::genTagFile.data()
);
exit(1);
}
tagFile.setDevice(tag);
tagFile << "<tagfile>" << endl;
}
/************************************************************************** /**************************************************************************
* Gather information * * Gather information *
...@@ -6145,9 +6054,6 @@ int main(int argc,char **argv) ...@@ -6145,9 +6054,6 @@ int main(int argc,char **argv)
buildNamespaceList(root); buildNamespaceList(root);
findUsingDirectives(root); findUsingDirectives(root);
//msg("Computing group relations...\n");
//computeGroupRelations(root);
msg("Building file list...\n"); msg("Building file list...\n");
buildFileList(root); buildFileList(root);
...@@ -6192,8 +6098,8 @@ int main(int argc,char **argv) ...@@ -6192,8 +6098,8 @@ int main(int argc,char **argv)
findMainPage(root); findMainPage(root);
msg("Sorting member lists...\n"); msg("Sorting member lists...\n");
memberNameList.sort(); Doxygen::memberNameList.sort();
functionNameList.sort(); Doxygen::functionNameList.sort();
msg("Freeing entry tree\n"); msg("Freeing entry tree\n");
delete root; delete root;
...@@ -6228,33 +6134,161 @@ int main(int argc,char **argv) ...@@ -6228,33 +6134,161 @@ int main(int argc,char **argv)
msg("Building full member lists recursively...\n"); msg("Building full member lists recursively...\n");
buildCompleteMemberLists(); buildCompleteMemberLists();
//msg("Computing class interface usage relations...\n");
//computeClassIntfUsageRelations();
//msg("Determining member group documentation...\n");
//computeMemberGroupDocumentation();
//unrelatedFunctionsUsed=hasUnrelatedFunctions();
if (Config::inheritDocsFlag) if (Config::inheritDocsFlag)
{ {
msg("Inheriting documentation...\n"); msg("Inheriting documentation...\n");
inheritDocumentation(); inheritDocumentation();
} }
//msg("Computing member groups...\n");
//computeMemberGroups();
msg("Adding source references...\n"); msg("Adding source references...\n");
addSourceReferences(); addSourceReferences();
msg("Adding todo/test references...\n"); msg("Adding todo/test references...\n");
addTodoTestReferences(); addTodoTestReferences();
}
void generateOutput()
{
/**************************************************************************
* Check/create output directorties *
**************************************************************************/
if (Config::outputDir.isEmpty())
Config::outputDir=QDir::currentDirPath();
else
{
QDir dir(Config::outputDir);
if (!dir.exists())
{
dir.setPath(QDir::currentDirPath());
if (!dir.mkdir(Config::outputDir))
{
err("Error: tag OUTPUT_DIRECTORY: Output directory `%s' does not "
"exist and cannot be created\n",Config::outputDir.data());
exit(1);
}
else if (!Config::quietFlag)
{
err("Notice: Output directory `%s' does not exist. "
"I have created it for you.\n", Config::outputDir.data());
}
dir.cd(Config::outputDir);
}
Config::outputDir=dir.absPath();
}
if (Config::htmlOutputDir.isEmpty() && Config::generateHtml)
{
Config::htmlOutputDir=Config::outputDir+"/html";
}
else if (Config::htmlOutputDir && Config::htmlOutputDir[0]!='/')
{
Config::htmlOutputDir.prepend(Config::outputDir+'/');
}
QDir htmlDir(Config::htmlOutputDir);
if (Config::generateHtml && !htmlDir.exists() &&
!htmlDir.mkdir(Config::htmlOutputDir))
{
err("Could not create output directory %s\n",Config::htmlOutputDir.data());
exit(1);
}
if (Config::latexOutputDir.isEmpty() && Config::generateLatex)
{
Config::latexOutputDir=Config::outputDir+"/latex";
}
else if (Config::latexOutputDir && Config::latexOutputDir[0]!='/')
{
Config::latexOutputDir.prepend(Config::outputDir+'/');
}
QDir latexDir(Config::latexOutputDir);
if (Config::generateLatex && !latexDir.exists() &&
!latexDir.mkdir(Config::latexOutputDir))
{
err("Could not create output directory %s\n",Config::latexOutputDir.data());
exit(1);
}
if (Config::rtfOutputDir.isEmpty() && Config::generateRTF)
{
Config::rtfOutputDir=Config::outputDir+"/rtf";
}
else if (Config::rtfOutputDir && Config::rtfOutputDir[0]!='/')
{
Config::rtfOutputDir.prepend(Config::outputDir+'/');
}
QDir rtfDir(Config::rtfOutputDir);
if (Config::generateRTF && !rtfDir.exists() &&
!rtfDir.mkdir(Config::rtfOutputDir))
{
err("Could not create output directory %s\n",Config::rtfOutputDir.data());
exit(1);
}
if (Config::manOutputDir.isEmpty() && Config::generateMan)
{
Config::manOutputDir=Config::outputDir+"/man";
}
else if (Config::manOutputDir && Config::manOutputDir[0]!='/')
{
Config::manOutputDir.prepend(Config::outputDir+'/');
}
QDir manDir(Config::manOutputDir);
if (Config::generateMan && !manDir.exists() &&
!manDir.mkdir(Config::manOutputDir))
{
err("Could not create output directory %s\n",Config::manOutputDir.data());
exit(1);
}
/**************************************************************************
* Initialize output generators *
**************************************************************************/
outputList = new OutputList(TRUE);
if (Config::generateHtml)
{
outputList->add(new HtmlGenerator);
HtmlGenerator::init();
if (Config::htmlHelpFlag) HtmlHelp::getInstance()->initialize();
if (Config::ftvHelpFlag) FTVHelp::getInstance()->initialize();
copyStyleSheet();
}
if (Config::generateLatex)
{
outputList->add(new LatexGenerator);
LatexGenerator::init();
}
if (Config::generateMan)
{
outputList->add(new ManGenerator);
ManGenerator::init();
}
if (Config::generateRTF)
{
outputList->add(new RTFGenerator);
RTFGenerator::init();
}
/************************************************************************** /**************************************************************************
* Generate documentation * * Generate documentation *
**************************************************************************/ **************************************************************************/
QFile *tag=0;
if (!Config::genTagFile.isEmpty())
{
tag=new QFile(Config::genTagFile);
if (!tag->open(IO_WriteOnly))
{
err("Error: cannot open tag file %s for writing\n",
Config::genTagFile.data()
);
exit(1);
}
Doxygen::tagFile.setDevice(tag);
Doxygen::tagFile << "<tagfile>" << endl;
}
if (Config::generateHtml) writeDoxFont(Config::htmlOutputDir); if (Config::generateHtml) writeDoxFont(Config::htmlOutputDir);
if (Config::generateRTF) writeDoxFont(Config::rtfOutputDir); if (Config::generateRTF) writeDoxFont(Config::rtfOutputDir);
...@@ -6264,21 +6298,12 @@ int main(int argc,char **argv) ...@@ -6264,21 +6298,12 @@ int main(int argc,char **argv)
// If the result is 0 we do not generate the lists and omit the // If the result is 0 we do not generate the lists and omit the
// corresponding links in the index. // corresponding links in the index.
msg("Counting data structures...\n"); msg("Counting data structures...\n");
annotatedClasses = countAnnotatedClasses(); countDataStructures();
hierarchyClasses = countClassHierarchy();
documentedMembers = countClassMembers();
documentedFunctions = countFileMembers();
countFiles(documentedHtmlFiles,documentedFiles);
documentedGroups = countGroups();
documentedNamespaces = countNamespaces();
documentedNamespaceMembers = countNamespaceMembers();
documentedPages = countRelatedPages();
documentedPackages = countPackages();
// compute the shortest possible names of all files // compute the shortest possible names of all files
// without loosing the uniqueness of the file names. // without loosing the uniqueness of the file names.
msg("Generating disk names...\n"); msg("Generating disk names...\n");
inputNameList.generateDiskNames(); Doxygen::inputNameList.generateDiskNames();
msg("Resolving user defined references...\n"); msg("Resolving user defined references...\n");
resolveUserReferences(); resolveUserReferences();
...@@ -6369,16 +6394,16 @@ int main(int argc,char **argv) ...@@ -6369,16 +6394,16 @@ int main(int argc,char **argv)
writeGraphicalClassHierarchy(*outputList); writeGraphicalClassHierarchy(*outputList);
} }
if (Config::generateXML) //if (Config::generateXML)
{ //{
msg("Generating XML output\n"); // msg("Generating XML output\n");
generateXML(); // generateXML();
} //}
if (formulaList.count()>0 && Config::generateHtml) if (Doxygen::formulaList.count()>0 && Config::generateHtml)
{ {
msg("Generating bitmaps for formulas in HTML...\n"); msg("Generating bitmaps for formulas in HTML...\n");
formulaList.generateBitmaps(Config::htmlOutputDir); Doxygen::formulaList.generateBitmaps(Config::htmlOutputDir);
} }
if (Config::searchEngineFlag || Config::tagFileList.count()>0) if (Config::searchEngineFlag || Config::tagFileList.count()>0)
...@@ -6399,14 +6424,12 @@ int main(int argc,char **argv) ...@@ -6399,14 +6424,12 @@ int main(int argc,char **argv)
} }
if (!Config::genTagFile.isEmpty()) if (!Config::genTagFile.isEmpty())
{ {
tagFile << "</tagfile>" << endl; Doxygen::tagFile << "</tagfile>" << endl;
delete tag; delete tag;
} }
if (Config::generateHtml) removeDoxFont(Config::htmlOutputDir); if (Config::generateHtml) removeDoxFont(Config::htmlOutputDir);
if (Config::generateRTF) removeDoxFont(Config::rtfOutputDir); if (Config::generateRTF) removeDoxFont(Config::rtfOutputDir);
return 0;
} }
...@@ -38,63 +38,60 @@ class PageSList; ...@@ -38,63 +38,60 @@ class PageSList;
class PageSDict; class PageSDict;
class PageInfo; class PageInfo;
extern PageSDict *exampleSDict;
extern PageSDict *pageSDict;
extern PageInfo *mainPage;
extern FileNameDict *includeNameDict;
extern FileNameDict *exampleNameDict;
extern FileNameDict *inputNameDict;
extern FileNameDict *imageNameDict;
typedef QList<QCString> StringList; typedef QList<QCString> StringList;
typedef QDict<FileDef> FileDict; typedef QDict<FileDef> FileDict;
typedef QDict<QCString> StringDict; typedef QDict<QCString> StringDict;
typedef QDict<GroupDef> GroupDict; typedef QDict<GroupDef> GroupDict;
extern ClassList classList;
extern ClassDict classDict;
extern QStrList tagfileList;
extern MemberNameList memberNameList;
extern MemberNameList functionNameList;
extern MemberNameDict memberNameDict;
extern MemberNameDict functionNameDict;
extern FileList fileList;
extern FileDict fileDict;
extern ClassDef unrelatedClass;
extern QTextStream tagFile;
extern SectionDict sectionDict;
extern FileNameList inputNameList;
extern StringDict typedefDict;
extern StringDict namespaceAliasDict;
extern GroupList groupList;
extern GroupDict groupDict;
extern NamespaceList namespaceList;
extern NamespaceDict namespaceDict;
extern FormulaList formulaList;
extern FormulaDict formulaDict;
extern FormulaDict formulaNameDict;
extern StringDict tagDestinationDict;
extern StringDict aliasDict;
extern QIntDict<QCString> memberHeaderDict; // dictionary of the member groups heading
extern QIntDict<QCString> memberDocDict; // dictionary of the member groups heading
extern QDict<void> expandAsDefinedDict;
extern PackageSDict packageDict;
extern int annotatedClasses;
extern int hierarchyClasses;
extern int documentedFunctions;
extern int documentedMembers;
extern int documentedDefines;
extern int documentedFiles;
extern int documentedHtmlFiles;
extern int documentedGroups;
extern int documentedNamespaces;
extern int documentedNamespaceMembers;
extern int documentedIncludeFiles;
extern int documentedPages;
extern int documentedPackages;
extern QCString spaces; extern QCString spaces;
extern const char * getOverloadDocs(); /*! \brief This class serves as a namespace for global variables used by doxygen.
*
* All fields in this class are public and static, so they can be used directly.
*/
class Doxygen
{
public:
static ClassList classList;
static ClassDict classDict;
static PageSDict *exampleSDict;
static PageSDict *pageSDict;
static PageInfo *mainPage;
static FileNameDict *includeNameDict;
static FileNameDict *exampleNameDict;
static FileNameDict *inputNameDict;
static FileNameDict *imageNameDict;
static QStrList tagfileList;
static MemberNameList memberNameList;
static MemberNameList functionNameList;
static MemberNameDict memberNameDict;
static MemberNameDict functionNameDict;
static FileList fileList;
static FileDict fileDict;
static ClassDef unrelatedClass;
static QTextStream tagFile;
static SectionDict sectionDict;
static FileNameList inputNameList;
static StringDict typedefDict;
static StringDict namespaceAliasDict;
static GroupList groupList;
static GroupDict groupDict;
static NamespaceList namespaceList;
static NamespaceDict namespaceDict;
static FormulaList formulaList;
static FormulaDict formulaDict;
static FormulaDict formulaNameDict;
static StringDict tagDestinationDict;
static StringDict aliasDict;
static QIntDict<QCString> memberHeaderDict; // dictionary of the member groups heading
static QIntDict<QCString> memberDocDict; // dictionary of the member groups heading
static QDict<void> expandAsDefinedDict;
static PackageSDict packageDict;
};
void initDoxygen();
void readConfiguration(int argc, char **argv);
void parseInput();
void generateOutput();
#endif #endif
...@@ -14,40 +14,22 @@ ...@@ -14,40 +14,22 @@
# #
# TMake project file for doxygen # TMake project file for doxygen
TEMPLATE = doxygen.t TEMPLATE = app.t
CONFIG = console warn_on $extraopts CONFIG = console warn_on $extraopt
HEADERS = doxygen.h scanner.h doc.h classdef.h classlist.h memberdef.h \ HEADERS = doxygen.h
membername.h index.h memberlist.h definition.h \ SOURCES = main.cpp
entry.h logos.h instdox.h message.h code.h \ unix:LIBS += -L../lib -ldoxygen -lqtools
filedef.h util.h cppvalue.h constexp.h \
outputgen.h outputlist.h htmlgen.h latexgen.h \
filename.h defargs.h groupdef.h gifenc.h diagram.h image.h \
namespacedef.h version.h language.h translator.h \
translator_nl.h translator_se.h translator_cz.h translator_fr.h \
translator_it.h formula.h debug.h membergroup.h htmlhelp.h \
translator_ru.h translator_pl.h dot.h rtfgen.h xml.h xml_dtd.h \
reflist.h page.h sortdict.h translator_hu.h translator_kr.h \
translator_ro.h translator_si.h translator_cn.h ftvhelp.h \
treeview.h tagreader.h packagedef.h
SOURCES = doxygen.cpp scanner.cpp doc.cpp classdef.cpp classlist.cpp \
memberdef.cpp membername.cpp index.cpp memberlist.cpp \
entry.cpp logos.cpp instdox.cpp message.cpp code.cpp \
config.cpp filedef.cpp util.cpp groupdef.cpp \
outputgen.cpp outputlist.cpp htmlgen.cpp latexgen.cpp mangen.cpp \
cppvalue.cpp ce_lex.cpp ce_parse.cpp pre.cpp \
filename.cpp declinfo.cpp defargs.cpp define.cpp \
diagram.cpp gifenc.cpp image.cpp namespacedef.cpp \
version.cpp language.cpp definition.cpp formula.cpp debug.cpp \
membergroup.cpp htmlhelp.cpp dot.cpp rtfgen.cpp xml.cpp \
reflist.cpp ftvhelp.cpp tagreader.cpp packagedef.cpp
unix:LIBS += -L../qtools -lqtools
win32:INCLUDEPATH += . win32:INCLUDEPATH += .
win32-mingw:LIBS += -L../qtools -lqtools win32-mingw:LIBS += -L../lib -ldoxygen -lqtools
win32-msvc:LIBS += qtools.lib shell32.lib win32-msvc:LIBS += qtools.lib doxygen.lib shell32.lib
win32-msvc:TMAKE_LFLAGS += /LIBPATH:..\qtools win32-msvc:TMAKE_LFLAGS += /LIBPATH:..\lib
win32-borland:LIBS += qtools.lib shell32.lib win32-borland:LIBS += qtools.lib doxygen.lib shell32.lib
win32-borland:TMAKE_LFLAGS += -L..\qtools win32-borland:TMAKE_LFLAGS += -L..\lib
win32:TMAKE_CXXFLAGS += -DQT_NODLL win32:TMAKE_CXXFLAGS += -DQT_NODLL
INCLUDEPATH += ../qtools INCLUDEPATH += ../qtools .
TARGET = ../bin/doxygen DESTDIR = ../bin
TARGET = doxygen
unix:TARGETDEPS = ../lib/libdoxygen.a
win32:TARGETDEPS = ..\lib\doxygen.lib
OBJECTS_DIR = ../objects OBJECTS_DIR = ../objects
...@@ -19,13 +19,13 @@ CONFIG = console warn_on $extraopts ...@@ -19,13 +19,13 @@ CONFIG = console warn_on $extraopts
HEADERS = suffixtree.h searchindex.h logos.h version.h HEADERS = suffixtree.h searchindex.h logos.h version.h
SOURCES = doxytag.cpp suffixtree.cpp searchindex.cpp \ SOURCES = doxytag.cpp suffixtree.cpp searchindex.cpp \
logos.cpp version.cpp logos.cpp version.cpp
unix:LIBS += -L../qtools -lqtools unix:LIBS += -L../lib -lqtools
win32:INCLUDEPATH += . win32:INCLUDEPATH += .
win32-mingw:LIBS += -L../qtools -lqtools win32-mingw:LIBS += -L../lib -lqtools
win32-msvc:LIBS += qtools.lib shell32.lib win32-msvc:LIBS += qtools.lib shell32.lib
win32-msvc:TMAKE_LFLAGS += /LIBPATH:..\qtools win32-msvc:TMAKE_LFLAGS += /LIBPATH:..\lib
win32-borland:LIBS += qtools.lib shell32.lib win32-borland:LIBS += qtools.lib shell32.lib
win32-borland:TMAKE_LFLAGS += -L..\qtools win32-borland:TMAKE_LFLAGS += -L..\lib
win32:TMAKE_CXXFLAGS += -DQT_NODLL win32:TMAKE_CXXFLAGS += -DQT_NODLL
INCLUDEPATH += ../qtools INCLUDEPATH += ../qtools
OBJECTS_DIR = ../objects OBJECTS_DIR = ../objects
......
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
#include "dot.h" #include "dot.h"
#include "message.h" #include "message.h"
#include "code.h" #include "code.h"
#include "xml.h" //#include "xml.h"
/*! create a new file definition, where \a p is the file path, /*! create a new file definition, where \a p is the file path,
\a the file name, and \a ref is an HTML anchor name if the \a the file name, and \a ref is an HTML anchor name if the
...@@ -125,10 +125,10 @@ void FileDef::writeDocumentation(OutputList &ol) ...@@ -125,10 +125,10 @@ void FileDef::writeDocumentation(OutputList &ol)
if (!Config::genTagFile.isEmpty()) if (!Config::genTagFile.isEmpty())
{ {
tagFile << " <compound kind=\"file\">" << endl; Doxygen::tagFile << " <compound kind=\"file\">" << endl;
tagFile << " <name>" << convertToXML(name()) << "</name>" << endl; Doxygen::tagFile << " <name>" << convertToXML(name()) << "</name>" << endl;
tagFile << " <path>" << convertToXML(getPath()) << "</path>" << endl; Doxygen::tagFile << " <path>" << convertToXML(getPath()) << "</path>" << endl;
tagFile << " <filename>" << convertToXML(diskname) << ".html</filename>" << endl; Doxygen::tagFile << " <filename>" << convertToXML(diskname) << ".html</filename>" << endl;
} }
ol.startTextBlock(); ol.startTextBlock();
...@@ -282,7 +282,7 @@ void FileDef::writeDocumentation(OutputList &ol) ...@@ -282,7 +282,7 @@ void FileDef::writeDocumentation(OutputList &ol)
); );
if (!Config::genTagFile.isEmpty()) if (!Config::genTagFile.isEmpty())
{ {
tagFile << " <namespace>" << convertToXML(nd->name()) << "</namespace>" << endl; Doxygen::tagFile << " <namespace>" << convertToXML(nd->name()) << "</namespace>" << endl;
} }
} }
else else
...@@ -436,7 +436,8 @@ void FileDef::writeDocumentation(OutputList &ol) ...@@ -436,7 +436,8 @@ void FileDef::writeDocumentation(OutputList &ol)
if (!Config::genTagFile.isEmpty()) if (!Config::genTagFile.isEmpty())
{ {
tagFile << " </compound>" << endl; writeDocAnchorsToTagFile();
Doxygen::tagFile << " </compound>" << endl;
} }
endFile(ol); endFile(ol);
...@@ -481,8 +482,8 @@ void FileDef::addMemberListToGroup(MemberList *ml, ...@@ -481,8 +482,8 @@ void FileDef::addMemberListToGroup(MemberList *ml,
int groupId=md->getMemberGroupId(); int groupId=md->getMemberGroupId();
if ((md->*func)() && groupId!=-1) if ((md->*func)() && groupId!=-1)
{ {
QCString *pGrpHeader = memberHeaderDict[groupId]; QCString *pGrpHeader = Doxygen::memberHeaderDict[groupId];
QCString *pDocs = memberDocDict[groupId]; QCString *pDocs = Doxygen::memberDocDict[groupId];
//printf("Member `%s' pGrpHeader=%p\n",md->name().data(),pGrpHeader); //printf("Member `%s' pGrpHeader=%p\n",md->name().data(),pGrpHeader);
if (pGrpHeader) if (pGrpHeader)
{ {
...@@ -665,47 +666,6 @@ void FileDef::addIncludedByDependency(FileDef *fd,const char *incName,bool local ...@@ -665,47 +666,6 @@ void FileDef::addIncludedByDependency(FileDef *fd,const char *incName,bool local
} }
} }
void FileDef::generateXMLSection(QTextStream &t,MemberList *ml,const char *type)
{
if (ml->count()>0)
{
t << " <sectiondef type=\"" << type << "\">" << endl;
t << " <memberlist>" << endl;
MemberListIterator mli(*ml);
MemberDef *md;
for (mli.toFirst();(md=mli.current());++mli)
{
md->generateXML(t,this);
}
t << " </memberlist>" << endl;
t << " </sectiondef>" << endl;
}
}
void FileDef::generateXML(QTextStream &t)
{
t << " <compounddef id=\""
<< getOutputFileBase() << "\" type=\"file\">" << endl;
t << " <compoundname>";
writeXMLString(t,name());
t << "</compoundname>" << endl;
int numMembers = defineMembers.count()+protoMembers.count()+
typedefMembers.count()+enumMembers.count()+
funcMembers.count()+varMembers.count();
if (numMembers>0)
{
t << " <sectionlist>" << endl;
generateXMLSection(t,&defineMembers,"define");
generateXMLSection(t,&protoMembers,"prototype");
generateXMLSection(t,&typedefMembers,"typedef");
generateXMLSection(t,&enumMembers,"enum");
generateXMLSection(t,&funcMembers,"func");
generateXMLSection(t,&varMembers,"var");
t << " </sectionlist>" << endl;
}
t << " </compounddef>" << endl;
}
bool FileDef::generateSourceFile() const bool FileDef::generateSourceFile() const
{ {
return !isReference() && return !isReference() &&
......
...@@ -135,13 +135,9 @@ class FileDef : public Definition ...@@ -135,13 +135,9 @@ class FileDef : public Definition
void addMembersToMemberGroup(); void addMembersToMemberGroup();
void distributeMemberGroupDocumentation(); void distributeMemberGroupDocumentation();
void generateXML(QTextStream &t); //void generateXML(QTextStream &t);
void generateXMLSection(QTextStream &t,MemberList *ml,const char *type); //void generateXMLSection(QTextStream &t,MemberList *ml,const char *type);
protected:
void addMemberListToGroup(MemberList *,bool (MemberDef::*)() const);
private:
MemberList allMemberList; MemberList allMemberList;
MemberList defineMembers; MemberList defineMembers;
MemberList protoMembers; MemberList protoMembers;
...@@ -149,6 +145,11 @@ class FileDef : public Definition ...@@ -149,6 +145,11 @@ class FileDef : public Definition
MemberList enumMembers; MemberList enumMembers;
MemberList funcMembers; MemberList funcMembers;
MemberList varMembers; MemberList varMembers;
protected:
void addMemberListToGroup(MemberList *,bool (MemberDef::*)() const);
private:
ClassList *classList; ClassList *classList;
QDict<IncludeInfo> *includeDict; QDict<IncludeInfo> *includeDict;
......
...@@ -433,7 +433,7 @@ void FTVHelp::addContentsItem(bool isDir, ...@@ -433,7 +433,7 @@ void FTVHelp::addContentsItem(bool isDir,
if (ref) if (ref)
{ {
tagName += ":"; tagName += ":";
QCString *s = tagDestinationDict[ref]; QCString *s = Doxygen::tagDestinationDict[ref];
if (s) if (s)
{ {
tagDir = *s + "/"; tagDir = *s + "/";
......
...@@ -128,8 +128,8 @@ void GroupDef::addMemberListToGroup(MemberList *ml, ...@@ -128,8 +128,8 @@ void GroupDef::addMemberListToGroup(MemberList *ml,
int groupId=md->getMemberGroupId(); int groupId=md->getMemberGroupId();
if ((md->*func)() && groupId!=-1) if ((md->*func)() && groupId!=-1)
{ {
QCString *pGrpHeader = memberHeaderDict[groupId]; QCString *pGrpHeader = Doxygen::memberHeaderDict[groupId];
QCString *pDocs = memberDocDict[groupId]; QCString *pDocs = Doxygen::memberDocDict[groupId];
if (pGrpHeader) if (pGrpHeader)
{ {
MemberGroup *mg = memberGroupDict->find(groupId); MemberGroup *mg = memberGroupDict->find(groupId);
...@@ -271,10 +271,10 @@ void GroupDef::writeDocumentation(OutputList &ol) ...@@ -271,10 +271,10 @@ void GroupDef::writeDocumentation(OutputList &ol)
if (!Config::genTagFile.isEmpty()) if (!Config::genTagFile.isEmpty())
{ {
tagFile << " <compound kind=\"group\">" << endl; Doxygen::tagFile << " <compound kind=\"group\">" << endl;
tagFile << " <name>" << convertToXML(name()) << "</name>" << endl; Doxygen::tagFile << " <name>" << convertToXML(name()) << "</name>" << endl;
tagFile << " <title>" << convertToXML(title) << "</title>" << endl; Doxygen::tagFile << " <title>" << convertToXML(title) << "</title>" << endl;
tagFile << " <filename>" << convertToXML(fileName) << ".html</filename>" << endl; Doxygen::tagFile << " <filename>" << convertToXML(fileName) << ".html</filename>" << endl;
} }
ol.startMemberSections(); ol.startMemberSections();
...@@ -293,7 +293,7 @@ void GroupDef::writeDocumentation(OutputList &ol) ...@@ -293,7 +293,7 @@ void GroupDef::writeDocumentation(OutputList &ol)
ol.writeObjectLink(fd->getReference(),fd->getOutputFileBase(),0,fd->name()); ol.writeObjectLink(fd->getReference(),fd->getOutputFileBase(),0,fd->name());
if (!Config::genTagFile.isEmpty()) if (!Config::genTagFile.isEmpty())
{ {
tagFile << " <file>" << convertToXML(fd->name()) << "</file>" << endl; Doxygen::tagFile << " <file>" << convertToXML(fd->name()) << "</file>" << endl;
} }
ol.endMemberItem(FALSE); ol.endMemberItem(FALSE);
if (!fd->briefDescription().isEmpty() && Config::briefMemDescFlag) if (!fd->briefDescription().isEmpty() && Config::briefMemDescFlag)
...@@ -322,7 +322,7 @@ void GroupDef::writeDocumentation(OutputList &ol) ...@@ -322,7 +322,7 @@ void GroupDef::writeDocumentation(OutputList &ol)
ol.writeObjectLink(nd->getReference(),nd->getOutputFileBase(),0,nd->name()); ol.writeObjectLink(nd->getReference(),nd->getOutputFileBase(),0,nd->name());
if (!Config::genTagFile.isEmpty()) if (!Config::genTagFile.isEmpty())
{ {
tagFile << " <namespace>" << convertToXML(nd->name()) << "</namespace>" << endl; Doxygen::tagFile << " <namespace>" << convertToXML(nd->name()) << "</namespace>" << endl;
} }
ol.endMemberItem(FALSE); ol.endMemberItem(FALSE);
if (!nd->briefDescription().isEmpty() && Config::briefMemDescFlag) if (!nd->briefDescription().isEmpty() && Config::briefMemDescFlag)
...@@ -350,7 +350,7 @@ void GroupDef::writeDocumentation(OutputList &ol) ...@@ -350,7 +350,7 @@ void GroupDef::writeDocumentation(OutputList &ol)
ol.writeObjectLink(gd->getReference(),gd->getOutputFileBase(),0,gd->groupTitle()); ol.writeObjectLink(gd->getReference(),gd->getOutputFileBase(),0,gd->groupTitle());
if (!Config::genTagFile.isEmpty()) if (!Config::genTagFile.isEmpty())
{ {
tagFile << " <subgroup>" << convertToXML(gd->name()) << "</subgroup>" << endl; Doxygen::tagFile << " <subgroup>" << convertToXML(gd->name()) << "</subgroup>" << endl;
} }
ol.endMemberItem(FALSE); ol.endMemberItem(FALSE);
if (!gd->briefDescription().isEmpty() && Config::briefMemDescFlag) if (!gd->briefDescription().isEmpty() && Config::briefMemDescFlag)
...@@ -421,12 +421,12 @@ void GroupDef::writeDocumentation(OutputList &ol) ...@@ -421,12 +421,12 @@ void GroupDef::writeDocumentation(OutputList &ol)
if (!Config::genTagFile.isEmpty()) if (!Config::genTagFile.isEmpty())
{ {
tagFile << " <page>" << convertToXML(pageName) << "</page>" << endl; Doxygen::tagFile << " <page>" << convertToXML(pageName) << "</page>" << endl;
} }
SectionInfo *si=0; SectionInfo *si=0;
if (!pi->title.isEmpty() && !pi->name.isEmpty() && if (!pi->title.isEmpty() && !pi->name.isEmpty() &&
(si=sectionDict[pi->name])!=0) (si=Doxygen::sectionDict[pi->name])!=0)
{ {
ol.startSection(si->label,si->title,TRUE); ol.startSection(si->label,si->title,TRUE);
ol.docify(si->title); ol.docify(si->title);
...@@ -500,7 +500,8 @@ void GroupDef::writeDocumentation(OutputList &ol) ...@@ -500,7 +500,8 @@ void GroupDef::writeDocumentation(OutputList &ol)
if (!Config::genTagFile.isEmpty()) if (!Config::genTagFile.isEmpty())
{ {
tagFile << " </compound>" << endl; writeDocAnchorsToTagFile();
Doxygen::tagFile << " </compound>" << endl;
} }
endFile(ol); endFile(ol);
...@@ -516,7 +517,7 @@ void addClassToGroups(Entry *root,ClassDef *cd) ...@@ -516,7 +517,7 @@ void addClassToGroups(Entry *root,ClassDef *cd)
for (;(s=sli.current());++sli) for (;(s=sli.current());++sli)
{ {
GroupDef *gd=0; GroupDef *gd=0;
if (!s->isEmpty() && (gd=groupDict[*s])) if (!s->isEmpty() && (gd=Doxygen::groupDict[*s]))
{ {
gd->addClass(cd); gd->addClass(cd);
//printf("Compound %s: in group %s\n",cd->name().data(),s->data()); //printf("Compound %s: in group %s\n",cd->name().data(),s->data());
...@@ -533,7 +534,7 @@ void addNamespaceToGroups(Entry *root,NamespaceDef *nd) ...@@ -533,7 +534,7 @@ void addNamespaceToGroups(Entry *root,NamespaceDef *nd)
{ {
GroupDef *gd=0; GroupDef *gd=0;
//printf("group `%s'\n",s->data()); //printf("group `%s'\n",s->data());
if (!s->isEmpty() && (gd=groupDict[*s])) if (!s->isEmpty() && (gd=Doxygen::groupDict[*s]))
{ {
gd->addNamespace(nd); gd->addNamespace(nd);
//printf("Namespace %s: in group %s\n",nd->name().data(),s->data()); //printf("Namespace %s: in group %s\n",nd->name().data(),s->data());
...@@ -548,7 +549,7 @@ void addGroupToGroups(Entry *root,GroupDef *subGroup) ...@@ -548,7 +549,7 @@ void addGroupToGroups(Entry *root,GroupDef *subGroup)
for (;(s=sli.current());++sli) for (;(s=sli.current());++sli)
{ {
GroupDef *gd=0; GroupDef *gd=0;
if (!s->isEmpty() && (gd=groupDict[*s])) if (!s->isEmpty() && (gd=Doxygen::groupDict[*s]))
{ {
gd->addGroup(subGroup); gd->addGroup(subGroup);
} }
...@@ -563,7 +564,7 @@ void addMemberToGroups(Entry *root,MemberDef *md) ...@@ -563,7 +564,7 @@ void addMemberToGroups(Entry *root,MemberDef *md)
for (;(s=sli.current());++sli) for (;(s=sli.current());++sli)
{ {
GroupDef *gd=0; GroupDef *gd=0;
if (!s->isEmpty() && (gd=groupDict[*s])) if (!s->isEmpty() && (gd=Doxygen::groupDict[*s]))
{ {
GroupDef *mgd = md->getGroupDef(); GroupDef *mgd = md->getGroupDef();
if (mgd==0) if (mgd==0)
...@@ -592,7 +593,7 @@ void addExampleToGroups(Entry *root,PageInfo *eg) ...@@ -592,7 +593,7 @@ void addExampleToGroups(Entry *root,PageInfo *eg)
for (;(s=sli.current());++sli) for (;(s=sli.current());++sli)
{ {
GroupDef *gd=0; GroupDef *gd=0;
if (!s->isEmpty() && (gd=groupDict[*s])) if (!s->isEmpty() && (gd=Doxygen::groupDict[*s]))
{ {
gd->addExample(eg); gd->addExample(eg);
//printf("Example %s: in group %s\n",eg->name().data(),s->data()); //printf("Example %s: in group %s\n",eg->name().data(),s->data());
......
...@@ -181,7 +181,7 @@ void HtmlGenerator::startQuickIndexItem(const char *s,const char *l) ...@@ -181,7 +181,7 @@ void HtmlGenerator::startQuickIndexItem(const char *s,const char *l)
{ {
t << "<a class=\"qindexRef\" "; t << "<a class=\"qindexRef\" ";
t << "doxygen=\"" << s << ":"; t << "doxygen=\"" << s << ":";
if ((dest=tagDestinationDict[s])) t << *dest; if ((dest=Doxygen::tagDestinationDict[s])) t << *dest;
if (strcmp(s,"_cgi")!=0) t << "/"; // small hack to get the cgi binary link right if (strcmp(s,"_cgi")!=0) t << "/"; // small hack to get the cgi binary link right
t << "\" "; t << "\" ";
} }
...@@ -192,7 +192,7 @@ void HtmlGenerator::startQuickIndexItem(const char *s,const char *l) ...@@ -192,7 +192,7 @@ void HtmlGenerator::startQuickIndexItem(const char *s,const char *l)
t << "href=\""; t << "href=\"";
if (s) if (s)
{ {
if ((dest=tagDestinationDict[s])) t << *dest; if ((dest=Doxygen::tagDestinationDict[s])) t << *dest;
if (strcmp(s,"_cgi")!=0) t << "/"; if (strcmp(s,"_cgi")!=0) t << "/";
} }
t << l << "\">"; t << l << "\">";
...@@ -313,7 +313,7 @@ void HtmlGenerator::writeIndexItem(const char *ref,const char *f, ...@@ -313,7 +313,7 @@ void HtmlGenerator::writeIndexItem(const char *ref,const char *f,
{ {
t << "<a class=\"elRef\" "; t << "<a class=\"elRef\" ";
t << "doxygen=\"" << ref << ":"; t << "doxygen=\"" << ref << ":";
if ((dest=tagDestinationDict[ref])) t << *dest << "/"; if ((dest=Doxygen::tagDestinationDict[ref])) t << *dest << "/";
t << "\" "; t << "\" ";
} }
else else
...@@ -323,7 +323,7 @@ void HtmlGenerator::writeIndexItem(const char *ref,const char *f, ...@@ -323,7 +323,7 @@ void HtmlGenerator::writeIndexItem(const char *ref,const char *f,
t << "href=\""; t << "href=\"";
if (ref) if (ref)
{ {
if ((dest=tagDestinationDict[ref])) t << *dest << "/"; if ((dest=Doxygen::tagDestinationDict[ref])) t << *dest << "/";
} }
if (f) t << f << ".html\">"; if (f) t << f << ".html\">";
} }
...@@ -368,7 +368,7 @@ void HtmlGenerator::writeObjectLink(const char *ref,const char *f, ...@@ -368,7 +368,7 @@ void HtmlGenerator::writeObjectLink(const char *ref,const char *f,
{ {
t << "<a class=\"elRef\" "; t << "<a class=\"elRef\" ";
t << "doxygen=\"" << ref << ":"; t << "doxygen=\"" << ref << ":";
if ((dest=tagDestinationDict[ref])) t << *dest << "/"; if ((dest=Doxygen::tagDestinationDict[ref])) t << *dest << "/";
t << "\" "; t << "\" ";
} }
else else
...@@ -378,7 +378,7 @@ void HtmlGenerator::writeObjectLink(const char *ref,const char *f, ...@@ -378,7 +378,7 @@ void HtmlGenerator::writeObjectLink(const char *ref,const char *f,
t << "href=\""; t << "href=\"";
if (ref) if (ref)
{ {
if ((dest=tagDestinationDict[ref])) t << *dest << "/"; if ((dest=Doxygen::tagDestinationDict[ref])) t << *dest << "/";
} }
if (f) t << f << ".html"; if (f) t << f << ".html";
if (anchor) t << "#" << anchor; if (anchor) t << "#" << anchor;
...@@ -395,7 +395,7 @@ void HtmlGenerator::writeCodeLink(const char *ref,const char *f, ...@@ -395,7 +395,7 @@ void HtmlGenerator::writeCodeLink(const char *ref,const char *f,
{ {
t << "<a class=\"codeRef\" "; t << "<a class=\"codeRef\" ";
t << "doxygen=\"" << ref << ":"; t << "doxygen=\"" << ref << ":";
if ((dest=tagDestinationDict[ref])) t << *dest << "/"; if ((dest=Doxygen::tagDestinationDict[ref])) t << *dest << "/";
t << "\" "; t << "\" ";
} }
else else
...@@ -405,7 +405,7 @@ void HtmlGenerator::writeCodeLink(const char *ref,const char *f, ...@@ -405,7 +405,7 @@ void HtmlGenerator::writeCodeLink(const char *ref,const char *f,
t << "href=\""; t << "href=\"";
if (ref) if (ref)
{ {
if ((dest=tagDestinationDict[ref])) t << *dest << "/"; if ((dest=Doxygen::tagDestinationDict[ref])) t << *dest << "/";
} }
if (f) t << f << ".html"; if (f) t << f << ".html";
if (anchor) t << "#" << anchor; if (anchor) t << "#" << anchor;
...@@ -468,12 +468,26 @@ void HtmlGenerator::endSection(const char *,bool sub) ...@@ -468,12 +468,26 @@ void HtmlGenerator::endSection(const char *,bool sub)
t << "</a>" << endl; t << "</a>" << endl;
} }
void HtmlGenerator::writeSectionRef(const char *name,const char *lab, void HtmlGenerator::writeSectionRef(const char *ref,const char *name,
const char *title) const char *anchor,const char *title)
{ {
QCString *dest;
//printf("writeSectionRef(%s,%s,%s,%s)\n",ref,name,anchor,title);
QCString refName=name; QCString refName=name;
if (refName.right(5)!=".html") refName+=".html"; if (refName.right(5)!=".html") refName+=".html";
t << "<a href=\"" << refName << "#" << lab << "\">"; t << "<a ";
if (ref)
{
t << "doxygen=\"" << ref << ":";
if ((dest=Doxygen::tagDestinationDict[ref])) t << *dest << "/";
t << "\" ";
}
t << "href=\"";
if (ref)
{
if ((dest=Doxygen::tagDestinationDict[ref])) t << *dest << "/";
}
t << refName << "#" << anchor << "\">";
docify(title); docify(title);
t << "</a>"; t << "</a>";
} }
...@@ -488,12 +502,6 @@ void HtmlGenerator::writeSectionRefItem(const char *name,const char *lab, ...@@ -488,12 +502,6 @@ void HtmlGenerator::writeSectionRefItem(const char *name,const char *lab,
t << "</a>"; t << "</a>";
} }
void HtmlGenerator::writeSectionRefAnchor(const char *name,const char *lab,
const char *title)
{
writeSectionRef(name,lab,title);
}
void HtmlGenerator::docify(const char *str) void HtmlGenerator::docify(const char *str)
{ {
if (str) if (str)
...@@ -591,17 +599,17 @@ void HtmlGenerator::endClassDiagram(ClassDiagram &d, ...@@ -591,17 +599,17 @@ void HtmlGenerator::endClassDiagram(ClassDiagram &d,
d.writeImage(t,dir,fileName); d.writeImage(t,dir,fileName);
} }
void HtmlGenerator::startColorFont(uchar red,uchar green,uchar blue) //void HtmlGenerator::startColorFont(uchar red,uchar green,uchar blue)
{ //{
QCString colorString; // QCString colorString;
colorString.sprintf("%02x%02x%02x",red,green,blue); // colorString.sprintf("%02x%02x%02x",red,green,blue);
t << "<font color=\"#" << colorString << "\">"; // t << "<font color=\"#" << colorString << "\">";
} //}
//
void HtmlGenerator::endColorFont() //void HtmlGenerator::endColorFont()
{ //{
t << "</font>"; // t << "</font>";
} //}
void HtmlGenerator::writeFormula(const char *n,const char *text) void HtmlGenerator::writeFormula(const char *n,const char *text)
{ {
......
...@@ -44,7 +44,6 @@ class HtmlGenerator : public OutputGenerator ...@@ -44,7 +44,6 @@ class HtmlGenerator : public OutputGenerator
bool isEnabled(OutputType o) { return (o==Html && active); } bool isEnabled(OutputType o) { return (o==Html && active); }
OutputGenerator *get(OutputType o) { return (o==Html) ? this : 0; } OutputGenerator *get(OutputType o) { return (o==Html) ? this : 0; }
//void generateExternalIndex(); //void generateExternalIndex();
void startFile(const char *name,const char *title,bool external); void startFile(const char *name,const char *title,bool external);
void writeFooter(int,bool); void writeFooter(int,bool);
...@@ -127,8 +126,8 @@ class HtmlGenerator : public OutputGenerator ...@@ -127,8 +126,8 @@ class HtmlGenerator : public OutputGenerator
void endPreFragment() { t << "</pre>"; } void endPreFragment() { t << "</pre>"; }
void startCodeLine() { col=0; } void startCodeLine() { col=0; }
void endCodeLine() { codify("\n"); } void endCodeLine() { codify("\n"); }
void writeBoldString(const char *text) //void writeBoldString(const char *text)
{ t << "<b>"; docify(text); t << "</b>"; } // { t << "<b>"; docify(text); t << "</b>"; }
void startEmphasis() { t << "<em>"; } void startEmphasis() { t << "<em>"; }
void endEmphasis() { t << "</em>"; } void endEmphasis() { t << "</em>"; }
void startBold() { t << "<b>"; } void startBold() { t << "<b>"; }
...@@ -185,17 +184,17 @@ class HtmlGenerator : public OutputGenerator ...@@ -185,17 +184,17 @@ class HtmlGenerator : public OutputGenerator
void endDescList() { t << "</dl>"; } void endDescList() { t << "</dl>"; }
void startSection(const char *,const char *,bool); void startSection(const char *,const char *,bool);
void endSection(const char *,bool); void endSection(const char *,bool);
void writeSectionRef(const char *,const char *,const char *); void writeSectionRef(const char *,const char *,const char *,const char *);
void writeSectionRefItem(const char *,const char *,const char *); void writeSectionRefItem(const char *,const char *,const char *);
void writeSectionRefAnchor(const char *,const char *,const char *); //void writeSectionRefAnchor(const char *,const char *,const char *);
void addIndexItem(const char *,const char *) {} void addIndexItem(const char *,const char *) {}
void startIndent(); void startIndent();
void endIndent(); void endIndent();
void writeSynopsis() {} void writeSynopsis() {}
void startClassDiagram(); void startClassDiagram();
void endClassDiagram(ClassDiagram &,const char *,const char *); void endClassDiagram(ClassDiagram &,const char *,const char *);
void startColorFont(uchar r,uchar g,uchar b); //void startColorFont(uchar r,uchar g,uchar b);
void endColorFont(); //void endColorFont();
void startPageRef() {} void startPageRef() {}
void endPageRef(const char *,const char *) {} void endPageRef(const char *,const char *) {}
void startQuickIndexItem(const char *,const char *); void startQuickIndexItem(const char *,const char *);
......
...@@ -38,6 +38,45 @@ ...@@ -38,6 +38,45 @@
#include "page.h" #include "page.h"
#include "packagedef.h" #include "packagedef.h"
int annotatedClasses;
int hierarchyClasses;
int documentedFunctions;
int documentedMembers;
int documentedHtmlFiles;
int documentedFiles;
int documentedGroups;
int documentedNamespaces;
int documentedNamespaceMembers;
int documentedIncludeFiles;
int documentedPages;
int documentedPackages;
int countClassHierarchy();
int countClassMembers();
int countFileMembers();
void countFiles(int &htmlFiles,int &files);
int countGroups();
int countNamespaces();
int countAnnotatedClasses();
int countNamespaceMembers();
int countIncludeFiles();
int countRelatedPages();
int countPackages();
void countDataStructures()
{
annotatedClasses = countAnnotatedClasses();
hierarchyClasses = countClassHierarchy();
documentedMembers = countClassMembers();
documentedFunctions = countFileMembers();
countFiles(documentedHtmlFiles,documentedFiles);
documentedGroups = countGroups();
documentedNamespaces = countNamespaces();
documentedNamespaceMembers = countNamespaceMembers();
documentedPages = countRelatedPages();
documentedPackages = countPackages();
}
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
static bool g_memberIndexLetterUsed[256]; static bool g_memberIndexLetterUsed[256];
...@@ -102,6 +141,194 @@ QCString abbreviate(const char *s,const char *name) ...@@ -102,6 +141,194 @@ QCString abbreviate(const char *s,const char *name)
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
void writeQuickLinks(OutputList &ol,bool compact ,bool ext=FALSE)
{
ol.pushGeneratorState();
//bool manEnabled = ol.isEnabled(OutputGenerator::Man);
//bool texEnabled = ol.isEnabled(OutputGenerator::Latex);
ol.disableAllBut(OutputGenerator::Html);
QCString extLink;
if (ext) { extLink="_doc"; }
//if (manEnabled) ol.disable(OutputGenerator::Man);
//if (texEnabled) ol.disable(OutputGenerator::Latex);
if (compact) ol.startCenter(); else ol.startItemList();
if (!compact) ol.writeListItem();
if (Config::ftvHelpFlag)
{
ol.startQuickIndexItem(extLink,"main.html");
}
else
{
ol.startQuickIndexItem(extLink,"index.html");
}
parseText(ol,theTranslator->trMainPage());
ol.endQuickIndexItem();
if (documentedPackages>0)
{
if (!compact) ol.writeListItem();
ol.startQuickIndexItem(extLink,"packages.html");
parseText(ol,theTranslator->trPackages());
ol.endQuickIndexItem();
}
if (documentedGroups>0)
{
if (!compact) ol.writeListItem();
ol.startQuickIndexItem(extLink,"modules.html");
parseText(ol,theTranslator->trModules());
ol.endQuickIndexItem();
}
if (documentedNamespaces>0)
{
if (!compact) ol.writeListItem();
ol.startQuickIndexItem(extLink,"namespaces.html");
parseText(ol,theTranslator->trNamespaceList());
ol.endQuickIndexItem();
}
if (hierarchyClasses>0)
{
if (!compact) ol.writeListItem();
ol.startQuickIndexItem(extLink,"hierarchy.html");
parseText(ol,theTranslator->trClassHierarchy());
ol.endQuickIndexItem();
}
if (annotatedClasses>0)
{
if (Config::alphaIndexFlag)
{
if (!compact) ol.writeListItem();
ol.startQuickIndexItem(extLink,"classes.html");
parseText(ol,theTranslator->trAlphabeticalList());
ol.endQuickIndexItem();
}
if (!compact) ol.writeListItem();
ol.startQuickIndexItem(extLink,"annotated.html");
parseText(ol,theTranslator->trCompoundList());
ol.endQuickIndexItem();
}
if (documentedHtmlFiles>0)
{
if (!compact) ol.writeListItem();
ol.startQuickIndexItem(extLink,"files.html");
parseText(ol,theTranslator->trFileList());
ol.endQuickIndexItem();
}
//if (documentedIncludeFiles>0 && Config::verbatimHeaderFlag)
//{
// if (!compact) ol.writeListItem();
// ol.startQuickIndexItem(extLink,"headers.html");
// parseText(ol,theTranslator->trHeaderFiles());
// ol.endQuickIndexItem();
//}
//if (Config::sourceBrowseFlag)
//{
// if (!compact) ol.writeListItem();
// ol.startQuickIndexItem(extLink,"sources.html");
// parseText(ol,theTranslator->trSources());
// ol.endQuickIndexItem();
//}
if (documentedNamespaceMembers>0)
{
if (!compact) ol.writeListItem();
ol.startQuickIndexItem(extLink,"namespacemembers.html");
parseText(ol,theTranslator->trNamespaceMembers());
ol.endQuickIndexItem();
}
if (documentedMembers>0)
{
if (!compact) ol.writeListItem();
ol.startQuickIndexItem(extLink,"functions.html");
parseText(ol,theTranslator->trCompoundMembers());
ol.endQuickIndexItem();
}
if (documentedFunctions>0)
{
if (!compact) ol.writeListItem();
ol.startQuickIndexItem(extLink,"globals.html");
parseText(ol,theTranslator->trFileMembers());
ol.endQuickIndexItem();
}
if (documentedPages>0)
{
if (!compact) ol.writeListItem();
ol.startQuickIndexItem(extLink,"pages.html");
parseText(ol,theTranslator->trRelatedPages());
ol.endQuickIndexItem();
}
if (Doxygen::exampleSDict->count()>0)
{
if (!compact) ol.writeListItem();
ol.startQuickIndexItem(extLink,"examples.html");
parseText(ol,theTranslator->trExamples());
ol.endQuickIndexItem();
}
if (Config::searchEngineFlag)
{
if (!compact) ol.writeListItem();
ol.startQuickIndexItem("_cgi","");
parseText(ol,theTranslator->trSearch());
ol.endQuickIndexItem();
}
if (compact)
{
ol.endCenter();
ol.writeRuler();
}
else
{
ol.endItemList();
}
//if (manEnabled) ol.enable(OutputGenerator::Man);
//if (texEnabled) ol.enable(OutputGenerator::Latex);
ol.popGeneratorState();
}
static bool manIsEnabled;
void startTitle(OutputList &ol,const char *fileName)
{
ol.startTitleHead(fileName);
manIsEnabled=ol.isEnabled(OutputGenerator::Man);
if (manIsEnabled) ol.disable(OutputGenerator::Man);
}
void endTitle(OutputList &ol,const char *fileName,const char *name)
{
if (manIsEnabled) ol.enable(OutputGenerator::Man);
ol.endTitleHead(fileName,name);
}
void startFile(OutputList &ol,const char *name,const char *title,bool external)
{
ol.startFile(name,title,external);
if (!Config::noIndexFlag) writeQuickLinks(ol,TRUE,external);
}
void endFile(OutputList &ol,bool external)
{
ol.pushGeneratorState();
ol.disableAllBut(OutputGenerator::Html);
ol.writeFooter(0,external); // write the footer
if (Config::footerFile.isEmpty())
{
parseText(ol,theTranslator->trGeneratedAt(
dateToString(TRUE),
Config::projectName
));
}
ol.writeFooter(1,external); // write the link to the picture
if (Config::footerFile.isEmpty())
{
parseText(ol,theTranslator->trWrittenBy());
}
ol.writeFooter(2,external); // end the footer
ol.popGeneratorState();
ol.endFile();
}
//----------------------------------------------------------------------------
void writeClassTree(OutputList &ol,BaseClassList *bcl,bool hideSuper) void writeClassTree(OutputList &ol,BaseClassList *bcl,bool hideSuper)
{ {
HtmlHelp *htmlHelp=0; HtmlHelp *htmlHelp=0;
...@@ -291,7 +518,7 @@ void writeClassTree(ClassList *cl) ...@@ -291,7 +518,7 @@ void writeClassTree(ClassList *cl)
void writeClassHierarchy(OutputList &ol) void writeClassHierarchy(OutputList &ol)
{ {
initClassHierarchy(&classList); initClassHierarchy(&Doxygen::classList);
HtmlHelp *htmlHelp=0; HtmlHelp *htmlHelp=0;
FTVHelp *ftvHelp=0; FTVHelp *ftvHelp=0;
...@@ -307,7 +534,7 @@ void writeClassHierarchy(OutputList &ol) ...@@ -307,7 +534,7 @@ void writeClassHierarchy(OutputList &ol)
} }
bool started=FALSE; bool started=FALSE;
ClassListIterator cli(classList); ClassListIterator cli(Doxygen::classList);
for (;cli.current(); ++cli) for (;cli.current(); ++cli)
{ {
ClassDef *cd=cli.current(); ClassDef *cd=cli.current();
...@@ -379,9 +606,9 @@ void writeClassHierarchy(OutputList &ol) ...@@ -379,9 +606,9 @@ void writeClassHierarchy(OutputList &ol)
// TODO: let this function return the real number of items in the hierarchy. // TODO: let this function return the real number of items in the hierarchy.
int countClassHierarchy() int countClassHierarchy()
{ {
initClassHierarchy(&classList); initClassHierarchy(&Doxygen::classList);
int count=0; int count=0;
ClassListIterator cli(classList); ClassListIterator cli(Doxygen::classList);
for ( ; cli.current(); ++cli) for ( ; cli.current(); ++cli)
{ {
if (cli.current()->superClasses()->count()>0) count++; if (cli.current()->superClasses()->count()>0) count++;
...@@ -484,7 +711,7 @@ void countFiles(int &htmlFiles,int &files) ...@@ -484,7 +711,7 @@ void countFiles(int &htmlFiles,int &files)
{ {
htmlFiles=0; htmlFiles=0;
files=0; files=0;
FileNameListIterator fnli(inputNameList); FileNameListIterator fnli(Doxygen::inputNameList);
FileName *fn; FileName *fn;
for (;(fn=fnli.current());++fnli) for (;(fn=fnli.current());++fnli)
{ {
...@@ -554,7 +781,7 @@ void writeFileIndex(OutputList &ol) ...@@ -554,7 +781,7 @@ void writeFileIndex(OutputList &ol)
outputNameList.setAutoDelete(TRUE); outputNameList.setAutoDelete(TRUE);
// re-sort input files in (dir,file) output order instead of (file,dir) input order // re-sort input files in (dir,file) output order instead of (file,dir) input order
FileName *fn=inputNameList.first(); FileName *fn=Doxygen::inputNameList.first();
while (fn) while (fn)
{ {
FileDef *fd=fn->first(); FileDef *fd=fn->first();
...@@ -578,7 +805,7 @@ void writeFileIndex(OutputList &ol) ...@@ -578,7 +805,7 @@ void writeFileIndex(OutputList &ol)
} }
fd=fn->next(); fd=fn->next();
} }
fn=inputNameList.next(); fn=Doxygen::inputNameList.next();
} }
ol.startIndexList(); ol.startIndexList();
...@@ -703,7 +930,7 @@ void writeFileIndex(OutputList &ol) ...@@ -703,7 +930,7 @@ void writeFileIndex(OutputList &ol)
int countNamespaces() int countNamespaces()
{ {
int count=0; int count=0;
NamespaceListIterator nli(namespaceList); NamespaceListIterator nli(Doxygen::namespaceList);
NamespaceDef *nd; NamespaceDef *nd;
for (;(nd=nli.current());++nli) for (;(nd=nli.current());++nli)
{ {
...@@ -750,7 +977,7 @@ void writeNamespaceIndex(OutputList &ol) ...@@ -750,7 +977,7 @@ void writeNamespaceIndex(OutputList &ol)
ol.endTextBlock(); ol.endTextBlock();
bool first=TRUE; bool first=TRUE;
NamespaceDef *nd=namespaceList.first(); NamespaceDef *nd=Doxygen::namespaceList.first();
while (nd) while (nd)
{ {
if (nd->isLinkableInProject()) if (nd->isLinkableInProject())
...@@ -782,7 +1009,7 @@ void writeNamespaceIndex(OutputList &ol) ...@@ -782,7 +1009,7 @@ void writeNamespaceIndex(OutputList &ol)
ftvHelp->addContentsItem(FALSE,nd->getReference(),nd->getOutputFileBase(),0,nd->name()); ftvHelp->addContentsItem(FALSE,nd->getReference(),nd->getOutputFileBase(),0,nd->name());
} }
} }
nd=namespaceList.next(); nd=Doxygen::namespaceList.next();
} }
if (!first) ol.endIndexList(); if (!first) ol.endIndexList();
if (hasHtmlHelp) if (hasHtmlHelp)
...@@ -803,8 +1030,8 @@ void writeNamespaceIndex(OutputList &ol) ...@@ -803,8 +1030,8 @@ void writeNamespaceIndex(OutputList &ol)
int countAnnotatedClasses() int countAnnotatedClasses()
{ {
int count=0; int count=0;
//ClassDef *cd=classList.first(); //ClassDef *cd=Doxygen::classList.first();
ClassListIterator cli(classList); ClassListIterator cli(Doxygen::classList);
ClassDef *cd; ClassDef *cd;
for (;(cd=cli.current());++cli) for (;(cd=cli.current());++cli)
{ {
...@@ -824,9 +1051,9 @@ void writeAnnotatedClassList(OutputList &ol) ...@@ -824,9 +1051,9 @@ void writeAnnotatedClassList(OutputList &ol)
bool hasHtmlHelp = Config::generateHtml && Config::htmlHelpFlag /*&& !Config::htmlHelpGroupsOnly*/; bool hasHtmlHelp = Config::generateHtml && Config::htmlHelpFlag /*&& !Config::htmlHelpGroupsOnly*/;
bool hasFtvHelp = Config::generateHtml && Config::ftvHelpFlag /*&& !Config::htmlHelpGroupsOnly*/; bool hasFtvHelp = Config::generateHtml && Config::ftvHelpFlag /*&& !Config::htmlHelpGroupsOnly*/;
ol.startIndexList(); ol.startIndexList();
//ClassDef *cd=classList.first(); //ClassDef *cd=Doxygen::classList.first();
//while (cd) //while (cd)
ClassListIterator cli(classList); ClassListIterator cli(Doxygen::classList);
ClassDef *cd; ClassDef *cd;
for (;(cd=cli.current());++cli) for (;(cd=cli.current());++cli)
{ {
...@@ -866,30 +1093,33 @@ void writePackageList(OutputList &ol) ...@@ -866,30 +1093,33 @@ void writePackageList(OutputList &ol)
bool hasHtmlHelp = Config::generateHtml && Config::htmlHelpFlag /*&& !Config::htmlHelpGroupsOnly*/; bool hasHtmlHelp = Config::generateHtml && Config::htmlHelpFlag /*&& !Config::htmlHelpGroupsOnly*/;
bool hasFtvHelp = Config::generateHtml && Config::ftvHelpFlag /*&& !Config::htmlHelpGroupsOnly*/; bool hasFtvHelp = Config::generateHtml && Config::ftvHelpFlag /*&& !Config::htmlHelpGroupsOnly*/;
ol.startIndexList(); ol.startIndexList();
PackageSDict::Iterator pdi(packageDict); PackageSDict::Iterator pdi(Doxygen::packageDict);
PackageDef *pd; PackageDef *pd;
for (;(pd=pdi.current());++pdi) for (;(pd=pdi.current());++pdi)
{ {
ol.writeStartAnnoItem("package",pd->getOutputFileBase(),0,pd->name()); if (!pd->isReference())
if (!pd->briefDescription().isEmpty())
{ {
ol.docify(" ("); ol.writeStartAnnoItem("package",pd->getOutputFileBase(),0,pd->name());
OutputList briefOutput(&ol); if (!pd->briefDescription().isEmpty())
parseDoc(briefOutput, {
pd->getDefFileName(),pd->getDefLine(), ol.docify(" (");
pd->name(),0, OutputList briefOutput(&ol);
abbreviate(pd->briefDescription(),pd->name())); parseDoc(briefOutput,
ol+=briefOutput; pd->getDefFileName(),pd->getDefLine(),
ol.docify(")"); pd->name(),0,
} abbreviate(pd->briefDescription(),pd->name()));
ol.writeEndAnnoItem(pd->getOutputFileBase()); ol+=briefOutput;
if (hasHtmlHelp) ol.docify(")");
{ }
HtmlHelp::getInstance()->addContentsItem(FALSE,pd->name(),pd->getOutputFileBase()); ol.writeEndAnnoItem(pd->getOutputFileBase());
} if (hasHtmlHelp)
if (hasFtvHelp) {
{ HtmlHelp::getInstance()->addContentsItem(FALSE,pd->name(),pd->getOutputFileBase());
FTVHelp::getInstance()->addContentsItem(FALSE,pd->getReference(),pd->getOutputFileBase(),0,pd->name()); }
if (hasFtvHelp)
{
FTVHelp::getInstance()->addContentsItem(FALSE,pd->getReference(),pd->getOutputFileBase(),0,pd->name());
}
} }
} }
ol.endIndexList(); ol.endIndexList();
...@@ -903,7 +1133,7 @@ void writeAlphabeticalClassList(OutputList &ol) ...@@ -903,7 +1133,7 @@ void writeAlphabeticalClassList(OutputList &ol)
ol.startAlphabeticalIndexList(); ol.startAlphabeticalIndexList();
// first count the number of headers // first count the number of headers
ClassListIterator cli(classList); ClassListIterator cli(Doxygen::classList);
ClassDef *cd; ClassDef *cd;
char startLetter=0; char startLetter=0;
int headerItems=0; int headerItems=0;
...@@ -1170,7 +1400,7 @@ void writeMemberList(OutputList &ol,bool useSections) ...@@ -1170,7 +1400,7 @@ void writeMemberList(OutputList &ol,bool useSections)
{ {
bool first = TRUE; bool first = TRUE;
char lastChar = 0; char lastChar = 0;
MemberName *mn=memberNameList.first(); MemberName *mn=Doxygen::memberNameList.first();
while (mn) while (mn)
{ {
MemberDef *md=mn->first(); MemberDef *md=mn->first();
...@@ -1243,7 +1473,7 @@ void writeMemberList(OutputList &ol,bool useSections) ...@@ -1243,7 +1473,7 @@ void writeMemberList(OutputList &ol,bool useSections)
md=mn->prev(); md=mn->prev();
} }
} }
mn=memberNameList.next(); mn=Doxygen::memberNameList.next();
} }
ol.endItemList(); ol.endItemList();
} }
...@@ -1254,7 +1484,7 @@ int countClassMembers() ...@@ -1254,7 +1484,7 @@ int countClassMembers()
{ {
int i=0;for (i=0;i<256;i++) g_memberIndexLetterUsed[i]=FALSE; int i=0;for (i=0;i<256;i++) g_memberIndexLetterUsed[i]=FALSE;
int count=0; int count=0;
MemberName *mn=memberNameList.first(); MemberName *mn=Doxygen::memberNameList.first();
while (mn) while (mn)
{ {
MemberDef *md=mn->first(); MemberDef *md=mn->first();
...@@ -1278,7 +1508,7 @@ int countClassMembers() ...@@ -1278,7 +1508,7 @@ int countClassMembers()
if (!n.isEmpty()) g_memberIndexLetterUsed[tolower(n.at(0))]=TRUE; if (!n.isEmpty()) g_memberIndexLetterUsed[tolower(n.at(0))]=TRUE;
count++; count++;
} }
mn=memberNameList.next(); mn=Doxygen::memberNameList.next();
} }
return count; return count;
} }
...@@ -1354,7 +1584,7 @@ void writeFileMemberList(OutputList &ol,bool useSections) ...@@ -1354,7 +1584,7 @@ void writeFileMemberList(OutputList &ol,bool useSections)
{ {
char lastChar=0; char lastChar=0;
bool first=TRUE; bool first=TRUE;
MemberName *mn=functionNameList.first(); MemberName *mn=Doxygen::functionNameList.first();
while (mn) while (mn)
{ {
MemberDef *md=mn->first(); MemberDef *md=mn->first();
...@@ -1425,7 +1655,7 @@ void writeFileMemberList(OutputList &ol,bool useSections) ...@@ -1425,7 +1655,7 @@ void writeFileMemberList(OutputList &ol,bool useSections)
md=mn->prev(); md=mn->prev();
} }
} }
mn=functionNameList.next(); mn=Doxygen::functionNameList.next();
} }
ol.endItemList(); ol.endItemList();
} }
...@@ -1436,7 +1666,7 @@ void writeNamespaceMemberList(OutputList &ol,bool useSections) ...@@ -1436,7 +1666,7 @@ void writeNamespaceMemberList(OutputList &ol,bool useSections)
{ {
char lastChar=0; char lastChar=0;
bool first=TRUE; bool first=TRUE;
MemberName *mn=functionNameList.first(); MemberName *mn=Doxygen::functionNameList.first();
while (mn) while (mn)
{ {
MemberDef *md=mn->first(); MemberDef *md=mn->first();
...@@ -1500,7 +1730,7 @@ void writeNamespaceMemberList(OutputList &ol,bool useSections) ...@@ -1500,7 +1730,7 @@ void writeNamespaceMemberList(OutputList &ol,bool useSections)
md=mn->prev(); md=mn->prev();
} }
} }
mn=functionNameList.next(); mn=Doxygen::functionNameList.next();
} }
if (!first) ol.endItemList(); if (!first) ol.endItemList();
} }
...@@ -1511,7 +1741,7 @@ int countNamespaceMembers() ...@@ -1511,7 +1741,7 @@ int countNamespaceMembers()
{ {
int i=0;for (i=0;i<256;i++) g_namespaceIndexLetterUsed[i]=FALSE; int i=0;for (i=0;i<256;i++) g_namespaceIndexLetterUsed[i]=FALSE;
int count=0; int count=0;
MemberName *mn=functionNameList.first(); MemberName *mn=Doxygen::functionNameList.first();
while (mn) while (mn)
{ {
MemberDef *md=mn->first(); MemberDef *md=mn->first();
...@@ -1529,7 +1759,7 @@ int countNamespaceMembers() ...@@ -1529,7 +1759,7 @@ int countNamespaceMembers()
md=mn->next(); md=mn->next();
} }
if (found) count++; if (found) count++;
mn=functionNameList.next(); mn=Doxygen::functionNameList.next();
} }
return count; return count;
} }
...@@ -1540,7 +1770,7 @@ int countFileMembers() ...@@ -1540,7 +1770,7 @@ int countFileMembers()
{ {
int i=0;for (i=0;i<256;i++) g_fileIndexLetterUsed[i]=FALSE; int i=0;for (i=0;i<256;i++) g_fileIndexLetterUsed[i]=FALSE;
int count=0; int count=0;
MemberName *mn=functionNameList.first(); MemberName *mn=Doxygen::functionNameList.first();
while (mn) while (mn)
{ {
MemberDef *md=mn->first(); MemberDef *md=mn->first();
...@@ -1561,7 +1791,7 @@ int countFileMembers() ...@@ -1561,7 +1791,7 @@ int countFileMembers()
md=mn->next(); md=mn->next();
} }
if (found) count++; if (found) count++;
mn=functionNameList.next(); mn=Doxygen::functionNameList.next();
} }
return count; return count;
} }
...@@ -1646,7 +1876,7 @@ void writeNamespaceMemberIndex(OutputList &ol) ...@@ -1646,7 +1876,7 @@ void writeNamespaceMemberIndex(OutputList &ol)
void writeExampleIndex(OutputList &ol) void writeExampleIndex(OutputList &ol)
{ {
if (exampleSDict->count()==0) return; if (Doxygen::exampleSDict->count()==0) return;
ol.pushGeneratorState(); ol.pushGeneratorState();
ol.disable(OutputGenerator::Man); ol.disable(OutputGenerator::Man);
startFile(ol,"examples","Example Index"); startFile(ol,"examples","Example Index");
...@@ -1678,7 +1908,7 @@ void writeExampleIndex(OutputList &ol) ...@@ -1678,7 +1908,7 @@ void writeExampleIndex(OutputList &ol)
//ol.newParagraph(); //ol.newParagraph();
ol.endTextBlock(); ol.endTextBlock();
ol.startIndexList(); ol.startIndexList();
PageSDictIterator pdi(*exampleSDict); PageSDictIterator pdi(*Doxygen::exampleSDict);
PageInfo *pi=0; PageInfo *pi=0;
for (pdi.toFirst();(pi=pdi.current());++pdi) for (pdi.toFirst();(pi=pdi.current());++pdi)
{ {
...@@ -1717,11 +1947,11 @@ void writeExampleIndex(OutputList &ol) ...@@ -1717,11 +1947,11 @@ void writeExampleIndex(OutputList &ol)
int countRelatedPages() int countRelatedPages()
{ {
int count=0; int count=0;
PageSDictIterator pdi(*pageSDict); PageSDictIterator pdi(*Doxygen::pageSDict);
PageInfo *pi=0; PageInfo *pi=0;
for (pdi.toFirst();(pi=pdi.current());++pdi) for (pdi.toFirst();(pi=pdi.current());++pdi)
{ {
if (!pi->inGroup) count++; if (!pi->inGroup && !pi->isReference()) count++;
} }
return count; return count;
} }
...@@ -1731,11 +1961,14 @@ int countRelatedPages() ...@@ -1731,11 +1961,14 @@ int countRelatedPages()
int countPackages() int countPackages()
{ {
int count=0; int count=0;
PackageSDict::Iterator pdi(packageDict); PackageSDict::Iterator pdi(Doxygen::packageDict);
PackageDef *pd=0; PackageDef *pd=0;
for (pdi.toFirst();(pd=pdi.current());++pdi) for (pdi.toFirst();(pd=pdi.current());++pdi)
{ {
count++; if (!pd->isReference())
{
count++;
}
} }
return count; return count;
} }
...@@ -1776,11 +2009,11 @@ void writePageIndex(OutputList &ol) ...@@ -1776,11 +2009,11 @@ void writePageIndex(OutputList &ol)
//ol.newParagraph(); //ol.newParagraph();
ol.endTextBlock(); ol.endTextBlock();
ol.startIndexList(); ol.startIndexList();
PageSDictIterator pdi(*pageSDict); PageSDictIterator pdi(*Doxygen::pageSDict);
PageInfo *pi=0; PageInfo *pi=0;
for (pdi.toFirst();(pi=pdi.current());++pdi) for (pdi.toFirst();(pi=pdi.current());++pdi)
{ {
if (!pi->inGroup) if (!pi->inGroup && !pi->isReference())
{ {
QCString pageName,pageTitle; QCString pageName,pageTitle;
...@@ -1822,7 +2055,7 @@ void writePageIndex(OutputList &ol) ...@@ -1822,7 +2055,7 @@ void writePageIndex(OutputList &ol)
int countGroups() int countGroups()
{ {
int count=0; int count=0;
GroupListIterator gli(groupList); GroupListIterator gli(Doxygen::groupList);
GroupDef *gd; GroupDef *gd;
for (;(gd=gli.current());++gli) for (;(gd=gli.current());++gli)
{ {
...@@ -1921,7 +2154,7 @@ void writeGroupTreeNode(OutputList &ol, GroupDef *gd) ...@@ -1921,7 +2154,7 @@ void writeGroupTreeNode(OutputList &ol, GroupDef *gd)
for (pli.toFirst();(pi=pli.current());++pli) for (pli.toFirst();(pi=pli.current());++pli)
{ {
SectionInfo *si=0; SectionInfo *si=0;
if (!pi->name.isEmpty()) si=sectionDict[pi->name]; if (!pi->name.isEmpty()) si=Doxygen::sectionDict[pi->name];
if(htmlHelp) htmlHelp->addContentsItem(FALSE, if(htmlHelp) htmlHelp->addContentsItem(FALSE,
convertToHtml(pi->title), convertToHtml(pi->title),
gd->getOutputFileBase(), gd->getOutputFileBase(),
...@@ -2032,7 +2265,7 @@ void writeGroupTreeNode(OutputList &ol, GroupDef *gd) ...@@ -2032,7 +2265,7 @@ void writeGroupTreeNode(OutputList &ol, GroupDef *gd)
void writeGroupHierarchy(OutputList &ol) void writeGroupHierarchy(OutputList &ol)
{ {
ol.startIndexList(); ol.startIndexList();
GroupListIterator gli(groupList); GroupListIterator gli(Doxygen::groupList);
GroupDef *gd; GroupDef *gd;
for (;(gd=gli.current());++gli) for (;(gd=gli.current());++gli)
{ {
...@@ -2053,7 +2286,7 @@ void writeGroupList(OutputList &ol) ...@@ -2053,7 +2286,7 @@ void writeGroupList(OutputList &ol)
if (hasHtmlHelp) htmlHelp = HtmlHelp::getInstance(); if (hasHtmlHelp) htmlHelp = HtmlHelp::getInstance();
if (hasFtvHelp) ftvHelp = FTVHelp::getInstance(); if (hasFtvHelp) ftvHelp = FTVHelp::getInstance();
ol.startDescription(); ol.startDescription();
GroupListIterator gli(groupList); GroupListIterator gli(Doxygen::groupList);
GroupDef *gd; GroupDef *gd;
for (;(gd=gli.current());++gli) for (;(gd=gli.current());++gli)
{ {
...@@ -2171,18 +2404,18 @@ void writeIndex(OutputList &ol) ...@@ -2171,18 +2404,18 @@ void writeIndex(OutputList &ol)
ol.disableAllBut(OutputGenerator::Html); ol.disableAllBut(OutputGenerator::Html);
QCString defFileName = QCString defFileName =
mainPage ? mainPage->defFileName.data() : "<generated>"; Doxygen::mainPage ? Doxygen::mainPage->defFileName.data() : "<generated>";
int defLine = int defLine =
mainPage ? mainPage->defLine : 1; Doxygen::mainPage ? Doxygen::mainPage->defLine : 1;
QCString title; QCString title;
if (!mainPage || mainPage->title.isEmpty()) if (!Doxygen::mainPage || Doxygen::mainPage->title.isEmpty())
{ {
title = theTranslator->trMainPage(); title = theTranslator->trMainPage();
} }
else else
{ {
title = substitute(mainPage->title,"%",""); title = substitute(Doxygen::mainPage->title,"%","");
} }
QCString indexName="index"; QCString indexName="index";
...@@ -2200,9 +2433,9 @@ void writeIndex(OutputList &ol) ...@@ -2200,9 +2433,9 @@ void writeIndex(OutputList &ol)
if (!Config::noIndexFlag) writeQuickLinks(ol,TRUE); if (!Config::noIndexFlag) writeQuickLinks(ol,TRUE);
ol.startTitleHead(0); ol.startTitleHead(0);
if (mainPage && !mainPage->title.isEmpty()) if (Doxygen::mainPage && !Doxygen::mainPage->title.isEmpty())
{ {
parseDoc(ol,defFileName,defLine,0,0,mainPage->title); parseDoc(ol,defFileName,defLine,0,0,Doxygen::mainPage->title);
} }
else else
{ {
...@@ -2216,11 +2449,11 @@ void writeIndex(OutputList &ol) ...@@ -2216,11 +2449,11 @@ void writeIndex(OutputList &ol)
parseDoc(ol,defFileName,defLine,0,0,Config::projectNumber); parseDoc(ol,defFileName,defLine,0,0,Config::projectNumber);
ol.endProjectNumber(); ol.endProjectNumber();
} }
if (Config::noIndexFlag && mainPage==0) writeQuickLinks(ol,FALSE); if (Config::noIndexFlag && Doxygen::mainPage==0) writeQuickLinks(ol,FALSE);
if (mainPage) if (Doxygen::mainPage)
{ {
parseDoc(ol,defFileName,defLine,0,0,mainPage->doc); parseDoc(ol,defFileName,defLine,0,0,Doxygen::mainPage->doc);
} }
endFile(ol); endFile(ol);
...@@ -2250,12 +2483,12 @@ void writeIndex(OutputList &ol) ...@@ -2250,12 +2483,12 @@ void writeIndex(OutputList &ol)
ol.startIndexSection(isTitlePageAuthor); ol.startIndexSection(isTitlePageAuthor);
parseText(ol,theTranslator->trGeneratedBy()); parseText(ol,theTranslator->trGeneratedBy());
ol.endIndexSection(isTitlePageAuthor); ol.endIndexSection(isTitlePageAuthor);
if (mainPage) if (Doxygen::mainPage)
{ {
ol.startIndexSection(isMainPage); ol.startIndexSection(isMainPage);
if (!mainPage->title.isEmpty()) if (!Doxygen::mainPage->title.isEmpty())
{ {
parseDoc(ol,defFileName,defLine,0,0,mainPage->title); parseDoc(ol,defFileName,defLine,0,0,Doxygen::mainPage->title);
} }
else else
{ {
...@@ -2339,13 +2572,13 @@ void writeIndex(OutputList &ol) ...@@ -2339,13 +2572,13 @@ void writeIndex(OutputList &ol)
parseText(ol,projPrefix+theTranslator->trFileDocumentation()); parseText(ol,projPrefix+theTranslator->trFileDocumentation());
ol.endIndexSection(isFileDocumentation); ol.endIndexSection(isFileDocumentation);
} }
if (exampleSDict->count()>0) if (Doxygen::exampleSDict->count()>0)
{ {
ol.startIndexSection(isExampleDocumentation); ol.startIndexSection(isExampleDocumentation);
parseText(ol,projPrefix+theTranslator->trExampleDocumentation()); parseText(ol,projPrefix+theTranslator->trExampleDocumentation());
ol.endIndexSection(isExampleDocumentation); ol.endIndexSection(isExampleDocumentation);
} }
if (pageSDict->count()>0) if (Doxygen::pageSDict->count()>0)
{ {
ol.startIndexSection(isPageDocumentation); ol.startIndexSection(isPageDocumentation);
parseText(ol,projPrefix+theTranslator->trPageDocumentation()); parseText(ol,projPrefix+theTranslator->trPageDocumentation());
...@@ -2354,20 +2587,20 @@ void writeIndex(OutputList &ol) ...@@ -2354,20 +2587,20 @@ void writeIndex(OutputList &ol)
ol.endIndexSection(isEndIndex); ol.endIndexSection(isEndIndex);
endFile(ol); endFile(ol);
if (mainPage) if (Doxygen::mainPage)
{ {
ol.disable(OutputGenerator::Man); ol.disable(OutputGenerator::Man);
startFile(ol,mainPage->name,mainPage->title); startFile(ol,Doxygen::mainPage->name,Doxygen::mainPage->title);
//SectionInfo *si=0; //SectionInfo *si=0;
//if (!mainPage->title.isEmpty() && !mainPage->name.isEmpty() && //if (!Doxygen::mainPage->title.isEmpty() && !Doxygen::mainPage->name.isEmpty() &&
// (si=sectionDict[mainPage->name])!=0) // (si=Doxygen::sectionDict[Doxygen::mainPage->name])!=0)
//{ //{
// ol.startSection(si->label,si->title,FALSE); // ol.startSection(si->label,si->title,FALSE);
// ol.docify(si->title); // ol.docify(si->title);
// ol.endSection(si->label,FALSE); // ol.endSection(si->label,FALSE);
//} //}
ol.startTextBlock(); ol.startTextBlock();
parseDoc(ol,defFileName,defLine,0,0,mainPage->doc); parseDoc(ol,defFileName,defLine,0,0,Doxygen::mainPage->doc);
ol.endTextBlock(); ol.endTextBlock();
endFile(ol); endFile(ol);
ol.enable(OutputGenerator::Man); ol.enable(OutputGenerator::Man);
......
...@@ -67,16 +67,25 @@ void writeGraphicalClassHierarchy(OutputList &ol); ...@@ -67,16 +67,25 @@ void writeGraphicalClassHierarchy(OutputList &ol);
void writeGraphInfo(OutputList &ol); void writeGraphInfo(OutputList &ol);
void writePackageIndex(OutputList &ol); void writePackageIndex(OutputList &ol);
int countClassHierarchy(); void countDataStructures();
int countClassMembers();
int countFileMembers(); extern int annotatedClasses;
void countFiles(int &htmlFiles,int &files); extern int hierarchyClasses;
int countGroups(); extern int documentedFunctions;
int countNamespaces(); extern int documentedMembers;
int countAnnotatedClasses(); extern int documentedDefines;
int countNamespaceMembers(); extern int documentedFiles;
int countIncludeFiles(); extern int documentedHtmlFiles;
int countRelatedPages(); extern int documentedGroups;
int countPackages(); extern int documentedNamespaces;
extern int documentedNamespaceMembers;
extern int documentedIncludeFiles;
extern int documentedPages;
extern int documentedPackages;
void startTitle(OutputList &ol,const char *fileName);
void endTitle(OutputList &ol,const char *fileName,const char *name);
void startFile(OutputList &ol,const char *name,const char *title,bool external=FALSE);
void endFile(OutputList &ol,bool external=FALSE);
#endif #endif
...@@ -494,7 +494,7 @@ void LatexGenerator::startIndexSection(IndexSections is) ...@@ -494,7 +494,7 @@ void LatexGenerator::startIndexSection(IndexSections is)
break; break;
case isPackageDocumentation: case isPackageDocumentation:
{ {
PackageSDict::Iterator pdi(packageDict); PackageSDict::Iterator pdi(Doxygen::packageDict);
PackageDef *pd=pdi.toFirst(); PackageDef *pd=pdi.toFirst();
bool found=FALSE; bool found=FALSE;
while (pd && !found) while (pd && !found)
...@@ -509,7 +509,7 @@ void LatexGenerator::startIndexSection(IndexSections is) ...@@ -509,7 +509,7 @@ void LatexGenerator::startIndexSection(IndexSections is)
break; break;
case isModuleDocumentation: case isModuleDocumentation:
{ {
GroupDef *gd=groupList.first(); GroupDef *gd=Doxygen::groupList.first();
bool found=FALSE; bool found=FALSE;
while (gd && !found) while (gd && !found)
{ {
...@@ -519,13 +519,13 @@ void LatexGenerator::startIndexSection(IndexSections is) ...@@ -519,13 +519,13 @@ void LatexGenerator::startIndexSection(IndexSections is)
t << "{"; //Module Documentation}\n"; t << "{"; //Module Documentation}\n";
found=TRUE; found=TRUE;
} }
gd=groupList.next(); gd=Doxygen::groupList.next();
} }
} }
break; break;
case isNamespaceDocumentation: case isNamespaceDocumentation:
{ {
NamespaceDef *nd=namespaceList.first(); NamespaceDef *nd=Doxygen::namespaceList.first();
bool found=FALSE; bool found=FALSE;
while (nd && !found) while (nd && !found)
{ {
...@@ -535,13 +535,13 @@ void LatexGenerator::startIndexSection(IndexSections is) ...@@ -535,13 +535,13 @@ void LatexGenerator::startIndexSection(IndexSections is)
t << "{"; // Namespace Documentation}\n": t << "{"; // Namespace Documentation}\n":
found=TRUE; found=TRUE;
} }
nd=namespaceList.next(); nd=Doxygen::namespaceList.next();
} }
} }
break; break;
case isClassDocumentation: case isClassDocumentation:
{ {
ClassDef *cd=classList.first(); ClassDef *cd=Doxygen::classList.first();
bool found=FALSE; bool found=FALSE;
while (cd && !found) while (cd && !found)
{ {
...@@ -551,14 +551,14 @@ void LatexGenerator::startIndexSection(IndexSections is) ...@@ -551,14 +551,14 @@ void LatexGenerator::startIndexSection(IndexSections is)
t << "{"; //Compound Documentation}\n"; t << "{"; //Compound Documentation}\n";
found=TRUE; found=TRUE;
} }
cd=classList.next(); cd=Doxygen::classList.next();
} }
} }
break; break;
case isFileDocumentation: case isFileDocumentation:
{ {
bool isFirst=TRUE; bool isFirst=TRUE;
FileName *fn=inputNameList.first(); FileName *fn=Doxygen::inputNameList.first();
while (fn) while (fn)
{ {
FileDef *fd=fn->first(); FileDef *fd=fn->first();
...@@ -576,7 +576,7 @@ void LatexGenerator::startIndexSection(IndexSections is) ...@@ -576,7 +576,7 @@ void LatexGenerator::startIndexSection(IndexSections is)
} }
fd=fn->next(); fd=fn->next();
} }
fn=inputNameList.next(); fn=Doxygen::inputNameList.next();
} }
} }
break; break;
...@@ -637,7 +637,7 @@ void LatexGenerator::endIndexSection(IndexSections is) ...@@ -637,7 +637,7 @@ void LatexGenerator::endIndexSection(IndexSections is)
break; break;
case isPackageDocumentation: case isPackageDocumentation:
{ {
PackageSDict::Iterator pdi(packageDict); PackageSDict::Iterator pdi(Doxygen::packageDict);
PackageDef *pd=pdi.toFirst(); PackageDef *pd=pdi.toFirst();
bool found=FALSE; bool found=FALSE;
while (pd && !found) while (pd && !found)
...@@ -658,7 +658,7 @@ void LatexGenerator::endIndexSection(IndexSections is) ...@@ -658,7 +658,7 @@ void LatexGenerator::endIndexSection(IndexSections is)
break; break;
case isModuleDocumentation: case isModuleDocumentation:
{ {
GroupDef *gd=groupList.first(); GroupDef *gd=Doxygen::groupList.first();
bool found=FALSE; bool found=FALSE;
while (gd && !found) while (gd && !found)
{ {
...@@ -667,7 +667,7 @@ void LatexGenerator::endIndexSection(IndexSections is) ...@@ -667,7 +667,7 @@ void LatexGenerator::endIndexSection(IndexSections is)
t << "}\n\\input{" << gd->getOutputFileBase() << "}\n"; t << "}\n\\input{" << gd->getOutputFileBase() << "}\n";
found=TRUE; found=TRUE;
} }
gd=groupList.next(); gd=Doxygen::groupList.next();
} }
while (gd) while (gd)
{ {
...@@ -676,13 +676,13 @@ void LatexGenerator::endIndexSection(IndexSections is) ...@@ -676,13 +676,13 @@ void LatexGenerator::endIndexSection(IndexSections is)
if (Config::compactLatexFlag) t << "\\input"; else t << "\\include"; if (Config::compactLatexFlag) t << "\\input"; else t << "\\include";
t << "{" << gd->getOutputFileBase() << "}\n"; t << "{" << gd->getOutputFileBase() << "}\n";
} }
gd=groupList.next(); gd=Doxygen::groupList.next();
} }
} }
break; break;
case isNamespaceDocumentation: case isNamespaceDocumentation:
{ {
NamespaceDef *nd=namespaceList.first(); NamespaceDef *nd=Doxygen::namespaceList.first();
bool found=FALSE; bool found=FALSE;
while (nd && !found) while (nd && !found)
{ {
...@@ -691,7 +691,7 @@ void LatexGenerator::endIndexSection(IndexSections is) ...@@ -691,7 +691,7 @@ void LatexGenerator::endIndexSection(IndexSections is)
t << "}\n\\input{" << nd->getOutputFileBase() << "}\n"; t << "}\n\\input{" << nd->getOutputFileBase() << "}\n";
found=TRUE; found=TRUE;
} }
nd=namespaceList.next(); nd=Doxygen::namespaceList.next();
} }
while (nd) while (nd)
{ {
...@@ -700,13 +700,13 @@ void LatexGenerator::endIndexSection(IndexSections is) ...@@ -700,13 +700,13 @@ void LatexGenerator::endIndexSection(IndexSections is)
if (Config::compactLatexFlag) t << "\\input"; else t << "\\include"; if (Config::compactLatexFlag) t << "\\input"; else t << "\\include";
t << "{" << nd->getOutputFileBase() << "}\n"; t << "{" << nd->getOutputFileBase() << "}\n";
} }
nd=namespaceList.next(); nd=Doxygen::namespaceList.next();
} }
} }
break; break;
case isClassDocumentation: case isClassDocumentation:
{ {
ClassDef *cd=classList.first(); ClassDef *cd=Doxygen::classList.first();
bool found=FALSE; bool found=FALSE;
while (cd && !found) while (cd && !found)
{ {
...@@ -715,7 +715,7 @@ void LatexGenerator::endIndexSection(IndexSections is) ...@@ -715,7 +715,7 @@ void LatexGenerator::endIndexSection(IndexSections is)
t << "}\n\\input{" << cd->getOutputFileBase() << "}\n"; t << "}\n\\input{" << cd->getOutputFileBase() << "}\n";
found=TRUE; found=TRUE;
} }
cd=classList.next(); cd=Doxygen::classList.next();
} }
while (cd) while (cd)
{ {
...@@ -724,14 +724,14 @@ void LatexGenerator::endIndexSection(IndexSections is) ...@@ -724,14 +724,14 @@ void LatexGenerator::endIndexSection(IndexSections is)
if (Config::compactLatexFlag) t << "\\input"; else t << "\\include"; if (Config::compactLatexFlag) t << "\\input"; else t << "\\include";
t << "{" << cd->getOutputFileBase() << "}\n"; t << "{" << cd->getOutputFileBase() << "}\n";
} }
cd=classList.next(); cd=Doxygen::classList.next();
} }
} }
break; break;
case isFileDocumentation: case isFileDocumentation:
{ {
bool isFirst=TRUE; bool isFirst=TRUE;
FileName *fn=inputNameList.first(); FileName *fn=Doxygen::inputNameList.first();
while (fn) while (fn)
{ {
FileDef *fd=fn->first(); FileDef *fd=fn->first();
...@@ -752,14 +752,14 @@ void LatexGenerator::endIndexSection(IndexSections is) ...@@ -752,14 +752,14 @@ void LatexGenerator::endIndexSection(IndexSections is)
} }
fd=fn->next(); fd=fn->next();
} }
fn=inputNameList.next(); fn=Doxygen::inputNameList.next();
} }
} }
break; break;
case isExampleDocumentation: case isExampleDocumentation:
{ {
t << "}\n"; t << "}\n";
PageSDictIterator pdi(*exampleSDict); PageSDictIterator pdi(*Doxygen::exampleSDict);
PageInfo *pi=pdi.toFirst(); PageInfo *pi=pdi.toFirst();
if (pi) if (pi)
{ {
...@@ -775,12 +775,12 @@ void LatexGenerator::endIndexSection(IndexSections is) ...@@ -775,12 +775,12 @@ void LatexGenerator::endIndexSection(IndexSections is)
case isPageDocumentation: case isPageDocumentation:
{ {
t << "}\n"; t << "}\n";
PageSDictIterator pdi(*pageSDict); PageSDictIterator pdi(*Doxygen::pageSDict);
PageInfo *pi=pdi.toFirst(); PageInfo *pi=pdi.toFirst();
bool first=TRUE; bool first=TRUE;
for (pdi.toFirst();(pi=pdi.current());++pdi) for (pdi.toFirst();(pi=pdi.current());++pdi)
{ {
if (!pi->inGroup) if (!pi->inGroup && !pi->isReference())
{ {
QCString pageName; QCString pageName;
if (Config::caseSensitiveNames) if (Config::caseSensitiveNames)
...@@ -1135,30 +1135,37 @@ void LatexGenerator::endSection(const char *lab,bool) ...@@ -1135,30 +1135,37 @@ void LatexGenerator::endSection(const char *lab,bool)
t << "}\\label{" << lab << "}" << endl; t << "}\\label{" << lab << "}" << endl;
} }
void LatexGenerator::writeSectionRef(const char *,const char *lab, void LatexGenerator::writeSectionRef(const char *ref,const char *,
const char *text) const char *lab,const char *text)
{ {
if (text && Config::pdfHyperFlag) if (ref) // external reference
{ {
t << "\\hyperlink{";
if (lab) t << lab;
t << "}{";
docify(text); docify(text);
t << "}";
//t << " {\\rm (p.\\,\\pageref{" << lab << "})}";
} }
else else // local reference
{ {
if (strcmp(lab,text)!=0) // lab!=text if (text && Config::pdfHyperFlag)
{ {
// todo: don't hardcode p. here! t << "\\hyperlink{";
t << "{\\bf "; if (lab) t << lab;
t << "}{";
docify(text); docify(text);
t << "} {\\rm (p.\\,\\pageref{" << lab << "})}"; t << "}";
//t << " {\\rm (p.\\,\\pageref{" << lab << "})}";
} }
else else
{ {
t << "\\ref{" << lab << "}"; if (strcmp(lab,text)!=0) // lab!=text
{
// todo: don't hardcode p. here!
t << "{\\bf ";
docify(text);
t << "} {\\rm (p.\\,\\pageref{" << lab << "})}";
}
else
{
t << "\\ref{" << lab << "}";
}
} }
} }
} }
...@@ -1172,14 +1179,14 @@ void LatexGenerator::writeSectionRefItem(const char *,const char *lab, ...@@ -1172,14 +1179,14 @@ void LatexGenerator::writeSectionRefItem(const char *,const char *lab,
} }
// TODO: remove this function // TODO: remove this function
void LatexGenerator::writeSectionRefAnchor(const char *,const char *lab, //void LatexGenerator::writeSectionRefAnchor(const char *,const char *lab,
const char *title) // const char *title)
{ //{
startBold(); // startBold();
docify(title); // docify(title);
endBold(); // endBold();
t << " (p.\\,\\pageref{" << lab << "})" << endl; // t << " (p.\\,\\pageref{" << lab << "})" << endl;
} //}
//void LatexGenerator::docify(const char *str) //void LatexGenerator::docify(const char *str)
//{ //{
......
...@@ -114,8 +114,8 @@ class LatexGenerator : public OutputGenerator ...@@ -114,8 +114,8 @@ class LatexGenerator : public OutputGenerator
void endPreFragment() { t << "\\end{alltt}\\normalsize " << endl; } void endPreFragment() { t << "\\end{alltt}\\normalsize " << endl; }
void startCodeLine() { col=0; } void startCodeLine() { col=0; }
void endCodeLine() { codify("\n"); } void endCodeLine() { codify("\n"); }
void writeBoldString(const char *text) //void writeBoldString(const char *text)
{ t << "{\\bf "; docify(text); t << "}"; } // { t << "{\\bf "; docify(text); t << "}"; }
void startEmphasis() { t << "{\\em "; } void startEmphasis() { t << "{\\em "; }
void endEmphasis() { t << "}"; } void endEmphasis() { t << "}"; }
void startBold() { t << "{\\bf "; } void startBold() { t << "{\\bf "; }
...@@ -182,9 +182,9 @@ class LatexGenerator : public OutputGenerator ...@@ -182,9 +182,9 @@ class LatexGenerator : public OutputGenerator
void endDescList() { t << "\\end{Desc}" << endl; } void endDescList() { t << "\\end{Desc}" << endl; }
void startSection(const char *,const char *,bool); void startSection(const char *,const char *,bool);
void endSection(const char *,bool); void endSection(const char *,bool);
void writeSectionRef(const char *,const char *,const char *); void writeSectionRef(const char *,const char *,const char *,const char *);
void writeSectionRefItem(const char *,const char *,const char *); void writeSectionRefItem(const char *,const char *,const char *);
void writeSectionRefAnchor(const char *,const char *,const char *); //void writeSectionRefAnchor(const char *,const char *,const char *);
void addIndexItem(const char *,const char *); void addIndexItem(const char *,const char *);
void startIndent() {} void startIndent() {}
void endIndent() {} void endIndent() {}
...@@ -192,8 +192,8 @@ class LatexGenerator : public OutputGenerator ...@@ -192,8 +192,8 @@ class LatexGenerator : public OutputGenerator
//void generateExternalIndex() {} //void generateExternalIndex() {}
void startClassDiagram(); void startClassDiagram();
void endClassDiagram(ClassDiagram &,const char *,const char *); void endClassDiagram(ClassDiagram &,const char *,const char *);
void startColorFont(uchar,uchar,uchar) {} //void startColorFont(uchar,uchar,uchar) {}
void endColorFont() {} //void endColorFont() {}
void startPageRef(); void startPageRef();
void endPageRef(const char *,const char *); void endPageRef(const char *,const char *);
void startQuickIndexItem(const char *,const char *) {} void startQuickIndexItem(const char *,const char *) {}
......
#
#
#
# Copyright (C) 1997-2001 by Dimitri van Heesch.
#
# Permission to use, copy, modify, and distribute this software and its
# documentation under the terms of the GNU General Public License is hereby
# granted. No representations are made about the suitability of this software
# for any purpose. It is provided "as is" without express or implied warranty.
# See the GNU General Public License for more details.
#
# Documents produced by Doxygen are derivative works derived from the
# input used in their production; they are not affected by this license.
#
# TMake project file for doxygen
TEMPLATE = libdoxygen.t
CONFIG = console warn_on staticlib
HEADERS = doxygen.h scanner.h doc.h classdef.h classlist.h memberdef.h \
membername.h index.h memberlist.h definition.h \
entry.h logos.h instdox.h message.h code.h \
filedef.h util.h cppvalue.h constexp.h \
outputgen.h outputlist.h htmlgen.h latexgen.h \
filename.h defargs.h groupdef.h gifenc.h diagram.h image.h \
namespacedef.h version.h language.h translator.h \
translator_nl.h translator_se.h translator_cz.h translator_fr.h \
translator_it.h formula.h debug.h membergroup.h htmlhelp.h \
translator_ru.h translator_pl.h dot.h rtfgen.h \
reflist.h page.h sortdict.h translator_hu.h translator_kr.h \
translator_ro.h translator_si.h translator_cn.h ftvhelp.h \
treeview.h tagreader.h packagedef.h
SOURCES = doxygen.cpp scanner.cpp doc.cpp classdef.cpp classlist.cpp \
memberdef.cpp membername.cpp index.cpp memberlist.cpp \
entry.cpp logos.cpp instdox.cpp message.cpp code.cpp \
config.cpp filedef.cpp util.cpp groupdef.cpp \
outputgen.cpp outputlist.cpp htmlgen.cpp latexgen.cpp mangen.cpp \
cppvalue.cpp ce_lex.cpp ce_parse.cpp pre.cpp \
filename.cpp declinfo.cpp defargs.cpp define.cpp \
diagram.cpp gifenc.cpp image.cpp namespacedef.cpp \
version.cpp language.cpp definition.cpp formula.cpp debug.cpp \
membergroup.cpp htmlhelp.cpp dot.cpp rtfgen.cpp \
reflist.cpp ftvhelp.cpp tagreader.cpp packagedef.cpp
win32:TMAKE_CXXFLAGS += -DQT_NODLL
INCLUDEPATH += ../qtools
win32:INCLUDEPATH += .
DESTDIR = ../lib
TARGET = doxygen
OBJECTS_DIR = ../objects
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
#! #!
#! doxygen.t: This is a custom template for building Doxygen #! doxygen.t: This is a custom template for building Doxygen
#! #!
#$ IncludeTemplate("app.t"); #$ IncludeTemplate("lib.t");
LEX = flex LEX = flex
YACC = bison YACC = bison
...@@ -75,9 +75,6 @@ sub GenerateDep { ...@@ -75,9 +75,6 @@ sub GenerateDep {
$(YACC) -l -d -p cppExpYY constexp.y -o ce_parse.c $(YACC) -l -d -p cppExpYY constexp.y -o ce_parse.c
-rm ce_parse.c -rm ce_parse.c
xml_dtd.h: doxygen.dtd
cat doxygen.dtd | sed -e "s/\"/\\\\\"/g" -e "s/^/\"/g" -e "s/$$/\\\\n\"/g" >xml_dtd.h
treeview.h: treeview.js treeview.h: treeview.js
cat treeview.js | sed -e "s/\\\\/\\\\\\\\/g" -e "s/\"/\\\\\"/g" -e "s/^/\"/g" -e "s/$$/\\\\n\"/g" >treeview.h cat treeview.js | sed -e "s/\\\\/\\\\\\\\/g" -e "s/\"/\\\\\"/g" -e "s/^/\"/g" -e "s/$$/\\\\n\"/g" >treeview.h
#include "doxygen.h"
/*! \file
* \brief main entry point for doxygen
*
* This file contains main()
*/
/*! Default main. The idea of separating this from the rest of doxygen,
* is to make it possible to write your own main, with a different
* generateOutput() function for instance.
*/
int main(int argc,char **argv)
{
initDoxygen();
readConfiguration(argc,argv);
parseInput();
generateOutput();
return 0;
}
...@@ -110,8 +110,8 @@ class ManGenerator : public OutputGenerator ...@@ -110,8 +110,8 @@ class ManGenerator : public OutputGenerator
void endPreFragment() { endCodeFragment(); } void endPreFragment() { endCodeFragment(); }
void startCodeLine() {} void startCodeLine() {}
void endCodeLine() { codify("\n"); col=0; } void endCodeLine() { codify("\n"); col=0; }
void writeBoldString(const char *text) //void writeBoldString(const char *text)
{ t << "\\fB"; docify(text); t << "\\fR"; firstCol=FALSE; } // { t << "\\fB"; docify(text); t << "\\fR"; firstCol=FALSE; }
void startEmphasis() { t << "\\fI"; firstCol=FALSE; } void startEmphasis() { t << "\\fI"; firstCol=FALSE; }
void endEmphasis() { t << "\\fR"; firstCol=FALSE; } void endEmphasis() { t << "\\fR"; firstCol=FALSE; }
void startBold() { t << "\\fB"; firstCol=FALSE; } void startBold() { t << "\\fB"; firstCol=FALSE; }
...@@ -172,9 +172,9 @@ class ManGenerator : public OutputGenerator ...@@ -172,9 +172,9 @@ class ManGenerator : public OutputGenerator
void endDescList() {} void endDescList() {}
void startSection(const char *,const char *,bool) {} void startSection(const char *,const char *,bool) {}
void endSection(const char *,bool) {} void endSection(const char *,bool) {}
void writeSectionRef(const char *,const char *,const char *) {} void writeSectionRef(const char *,const char *,const char *,const char *) {}
void writeSectionRefItem(const char *,const char *,const char *) {} void writeSectionRefItem(const char *,const char *,const char *) {}
void writeSectionRefAnchor(const char *,const char *,const char *) {} //void writeSectionRefAnchor(const char *,const char *,const char *) {}
void addIndexItem(const char *,const char *) {} void addIndexItem(const char *,const char *) {}
void startIndent() {} void startIndent() {}
void endIndent() {} void endIndent() {}
...@@ -182,8 +182,8 @@ class ManGenerator : public OutputGenerator ...@@ -182,8 +182,8 @@ class ManGenerator : public OutputGenerator
//void generateExternalIndex() {} //void generateExternalIndex() {}
void startClassDiagram() {} void startClassDiagram() {}
void endClassDiagram(ClassDiagram &,const char *,const char *) {} void endClassDiagram(ClassDiagram &,const char *,const char *) {}
void startColorFont(uchar,uchar,uchar) {} //void startColorFont(uchar,uchar,uchar) {}
void endColorFont() {} //void endColorFont() {}
void startPageRef() {} void startPageRef() {}
void endPageRef(const char *,const char *) {} void endPageRef(const char *,const char *) {}
void startQuickIndexItem(const char *,const char *) {} void startQuickIndexItem(const char *,const char *) {}
......
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
#include "doc.h" #include "doc.h"
#include "groupdef.h" #include "groupdef.h"
#include "defargs.h" #include "defargs.h"
#include "xml.h" //#include "xml.h"
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
...@@ -509,43 +509,44 @@ void MemberDef::writeDeclaration(OutputList &ol, ...@@ -509,43 +509,44 @@ void MemberDef::writeDeclaration(OutputList &ol,
if (!Config::genTagFile.isEmpty()) if (!Config::genTagFile.isEmpty())
{ {
tagFile << " <member kind=\""; Doxygen::tagFile << " <member kind=\"";
switch (mtype) switch (mtype)
{ {
case Define: tagFile << "define"; break; case Define: Doxygen::tagFile << "define"; break;
case EnumValue: tagFile << "enumvalue"; break; case EnumValue: Doxygen::tagFile << "enumvalue"; break;
case Property: tagFile << "property"; break; case Property: Doxygen::tagFile << "property"; break;
case Variable: tagFile << "variable"; break; case Variable: Doxygen::tagFile << "variable"; break;
case Typedef: tagFile << "typedef"; break; case Typedef: Doxygen::tagFile << "typedef"; break;
case Enumeration: tagFile << "enumeration"; break; case Enumeration: Doxygen::tagFile << "enumeration"; break;
case Function: tagFile << "function"; break; case Function: Doxygen::tagFile << "function"; break;
case Signal: tagFile << "signal"; break; case Signal: Doxygen::tagFile << "signal"; break;
case Prototype: tagFile << "prototype"; break; case Prototype: Doxygen::tagFile << "prototype"; break;
case Friend: tagFile << "friend"; break; case Friend: Doxygen::tagFile << "friend"; break;
case DCOP: tagFile << "dcop"; break; case DCOP: Doxygen::tagFile << "dcop"; break;
case Slot: tagFile << "slot"; break; case Slot: Doxygen::tagFile << "slot"; break;
} }
if (prot!=Public) if (prot!=Public)
{ {
tagFile << "\" protection=\""; Doxygen::tagFile << "\" protection=\"";
if (prot==Protected) tagFile << "public"; if (prot==Protected) Doxygen::tagFile << "public";
else /* Private */ tagFile << "protected"; else /* Private */ Doxygen::tagFile << "protected";
} }
if (virt!=Normal) if (virt!=Normal)
{ {
tagFile << "\" virtualness=\""; Doxygen::tagFile << "\" virtualness=\"";
if (virt==Virtual) tagFile << "virtual"; if (virt==Virtual) Doxygen::tagFile << "virtual";
else /* Pure */ tagFile << "pure"; else /* Pure */ Doxygen::tagFile << "pure";
} }
if (isStatic()) if (isStatic())
{ {
tagFile << "\" static=\"yes"; Doxygen::tagFile << "\" static=\"yes";
} }
tagFile << "\">" << endl; Doxygen::tagFile << "\">" << endl;
tagFile << " <name>" << convertToXML(name()) << "</name>" << endl; Doxygen::tagFile << " <name>" << convertToXML(name()) << "</name>" << endl;
tagFile << " <anchor>" << convertToXML(anchor()) << "</anchor>" << endl; Doxygen::tagFile << " <anchor>" << convertToXML(anchor()) << "</anchor>" << endl;
tagFile << " <arglist>" << convertToXML(argsString()) << "</arglist>" << endl; Doxygen::tagFile << " <arglist>" << convertToXML(argsString()) << "</arglist>" << endl;
tagFile << " </member>" << endl; writeDocAnchorsToTagFile();
Doxygen::tagFile << " </member>" << endl;
} }
Definition *d=0; Definition *d=0;
...@@ -761,7 +762,9 @@ void MemberDef::writeDeclaration(OutputList &ol, ...@@ -761,7 +762,9 @@ void MemberDef::writeDeclaration(OutputList &ol,
// descriptions are enabled or there is no detailed description. // descriptions are enabled or there is no detailed description.
{ {
if (annMemb) annMemb->annUsed=annUsed=TRUE; if (annMemb) annMemb->annUsed=annUsed=TRUE;
ol.writeBoldString(name()); ol.startBold();
ol.docify(name());
ol.endBold();
} }
} }
...@@ -819,6 +822,7 @@ void MemberDef::writeDeclaration(OutputList &ol, ...@@ -819,6 +822,7 @@ void MemberDef::writeDeclaration(OutputList &ol,
parseDoc(ol,defFileName,defLine,cname,name(),briefDescription()); parseDoc(ol,defFileName,defLine,cname,name(),briefDescription());
if (/*!documentation().isEmpty()*/ detailsAreVisible()) if (/*!documentation().isEmpty()*/ detailsAreVisible())
{ {
ol.pushGeneratorState();
ol.disableAllBut(OutputGenerator::Html); ol.disableAllBut(OutputGenerator::Html);
ol.endEmphasis(); ol.endEmphasis();
ol.docify(" "); ol.docify(" ");
...@@ -833,7 +837,7 @@ void MemberDef::writeDeclaration(OutputList &ol, ...@@ -833,7 +837,7 @@ void MemberDef::writeDeclaration(OutputList &ol,
parseText(ol,theTranslator->trMore()); parseText(ol,theTranslator->trMore());
ol.endTextLink(); ol.endTextLink();
ol.startEmphasis(); ol.startEmphasis();
ol.enableAll(); ol.popGeneratorState();
} }
//ol.newParagraph(); //ol.newParagraph();
ol.endMemberDescription(); ol.endMemberDescription();
...@@ -1449,187 +1453,6 @@ QCString MemberDef::getScopeString() const ...@@ -1449,187 +1453,6 @@ QCString MemberDef::getScopeString() const
return result; return result;
} }
void MemberDef::generateXML(QTextStream &t,Definition *def)
{
if (mtype==EnumValue) return;
QCString scopeName;
if (getClassDef())
scopeName=getClassDef()->name();
else if (getNamespaceDef())
scopeName=getNamespaceDef()->name();
t << " <";
enum { define_t,variable_t,typedef_t,enum_t,function_t } xmlType = function_t;
switch (mtype)
{
case Define: t << "definedef"; xmlType=define_t; break;
case EnumValue: // fall through
case Property: // fall through
case Variable: t << "variabledef"; xmlType=variable_t; break;
case Typedef: t << "typedef"; xmlType=typedef_t; break;
case Enumeration: t << "enumdef"; xmlType=enum_t; break;
case Function: // fall through
case Signal: // fall through
case Prototype: // fall through
case Friend: // fall through
case DCOP: // fall through
case Slot: t << "functiondef"; xmlType=function_t; break;
}
t << " id=\"";
t << def->getOutputFileBase()
<< "__" // can we change this to a non ID char?
// : do not seem allowed for some parsers!
<< anchor();
t << "\"";
if (xmlType==function_t && virtualness()!=Normal)
// functions has an extra "virt" attribute
{
t << " virt=\"";
switch (virtualness())
{
case Virtual: t << "virtual"; break;
case Pure: t << "pure-virtual"; break;
default: ASSERT(0);
}
t << "\"";
}
t << ">" << endl;
if (xmlType!=define_t && xmlType!=enum_t && // These don't have types.
(xmlType!=function_t || !type.isEmpty()) // Type is optional here.
)
{
QCString typeStr = replaceAnonymousScopes(type);
if (xmlType==typedef_t && typeStr.left(8)=="typedef ")
typeStr=typeStr.right(typeStr.length()-8);
if (xmlType==function_t && typeStr.left(8)=="virtual ")
typeStr=typeStr.right(typeStr.length()-8);
t << " <type>";
linkifyText(TextGeneratorXMLImpl(t),scopeName,name(),typeStr);
t << "</type>" << endl;
}
t << " <name>";
writeXMLString(t,name());
t << "</name>" << endl;
if (xmlType==function_t) //function
{
t << " <paramlist>" << endl;
ArgumentList *declAl = new ArgumentList;
ArgumentList *defAl = argList;
stringToArgumentList(args,declAl);
if (declAl->count()>0)
{
ArgumentListIterator declAli(*declAl);
ArgumentListIterator defAli(*defAl);
Argument *a;
for (declAli.toFirst();(a=declAli.current());++declAli)
{
Argument *defArg = defAli.current();
t << " <param>" << endl;
if (!a->attrib.isEmpty())
{
t << " <attributes>";
writeXMLString(t,a->attrib);
t << "</attributes>" << endl;
}
if (!a->type.isEmpty())
{
t << " <type>";
linkifyText(TextGeneratorXMLImpl(t),scopeName,name(),a->type);
t << "</type>" << endl;
}
if (!a->name.isEmpty())
{
t << " <declname>";
writeXMLString(t,a->name);
t << "</declname>" << endl;
}
if (defArg && !defArg->name.isEmpty() && defArg->name!=a->name)
{
t << " <defname>";
writeXMLString(t,defArg->name);
t << "</defname>" << endl;
}
if (!a->array.isEmpty())
{
t << " <array>";
writeXMLString(t,a->array);
t << "</array>" << endl;
}
if (!a->defval.isEmpty())
{
t << " <defval>";
linkifyText(TextGeneratorXMLImpl(t),scopeName,name(),a->defval);
t << "</defval>" << endl;
}
t << " </param>" << endl;
if (defArg) ++defAli;
}
}
delete declAl;
t << " </paramlist>" << endl;
}
else if (xmlType==define_t && !args.isEmpty()) // define
{
t << " <defparamlist>" << endl;
ArgumentListIterator ali(*argList);
Argument *a;
for (ali.toFirst();(a=ali.current());++ali)
{
t << " <defarg>" << a->type << "</defarg>" << endl;
}
t << " </defparamlist>" << endl;
if (!init.isEmpty())
{
t << " <initializer>";
linkifyText(TextGeneratorXMLImpl(t),scopeName,name(),init);
t << "</initializer>" << endl;
}
}
else if (xmlType==enum_t) // enum
{
t << " <enumvaluelist>" << endl;
if (enumFields)
{
MemberListIterator emli(*enumFields);
MemberDef *emd;
for (emli.toFirst();(emd=emli.current());++emli)
{
t << " <enumvalue>" << endl;
t << " <name>";
writeXMLString(t,emd->name());
t << "</name>" << endl;
if (!emd->init.isEmpty())
{
t << " <initializer>";
writeXMLString(t,emd->init);
t << "</initializer>" << endl;
}
t << " </enumvalue>" << endl;
}
}
t << " </enumvaluelist>" << endl;
}
t << " </";
switch (mtype)
{
case Define: t << "definedef"; break;
case EnumValue: // fall through
case Property: // fall through
case Variable: t << "variabledef"; break;
case Typedef: t << "typedef"; break;
case Enumeration: t << "enumdef"; break;
case Function: // fall through
case Signal: // fall through
case Prototype: // fall through
case Friend: // fall through
case DCOP: // fall through
case Slot: t << "functiondef"; break;
}
t << ">" << endl;
}
Definition *MemberDef::getCompoundDef() const Definition *MemberDef::getCompoundDef() const
{ {
......
...@@ -220,7 +220,7 @@ class MemberDef : public Definition ...@@ -220,7 +220,7 @@ class MemberDef : public Definition
QCString getScopeString() const; QCString getScopeString() const;
void generateXML(QTextStream &t,Definition *def); //void generateXML(QTextStream &t,Definition *def);
private: private:
ClassDef *classDef; // member of or related to ClassDef *classDef; // member of or related to
......
...@@ -292,17 +292,19 @@ void MemberList::writePlainDeclarations(OutputList &ol, ...@@ -292,17 +292,19 @@ void MemberList::writePlainDeclarations(OutputList &ol,
{ {
if (!Config::genTagFile.isEmpty()) if (!Config::genTagFile.isEmpty())
{ {
tagFile << " <member kind=\"enumeration\">" << endl; Doxygen::tagFile << " <member kind=\"enumeration\">" << endl;
tagFile << " <name>" << convertToXML(md->name()) << "</name>" << endl; Doxygen::tagFile << " <name>" << convertToXML(md->name()) << "</name>" << endl;
tagFile << " <anchor>" << convertToXML(md->anchor()) << "</anchor>" << endl; Doxygen::tagFile << " <anchor>" << convertToXML(md->anchor()) << "</anchor>" << endl;
tagFile << " <arglist>" << convertToXML(md->argsString()) << "</arglist>" << endl; Doxygen::tagFile << " <arglist>" << convertToXML(md->argsString()) << "</arglist>" << endl;
tagFile << " </member>" << endl; Doxygen::tagFile << " </member>" << endl;
} }
md->writeLink(typeDecl,cd,nd,fd,gd); md->writeLink(typeDecl,cd,nd,fd,gd);
} }
else else
{ {
typeDecl.writeBoldString(name); typeDecl.startBold();
typeDecl.docify(name);
typeDecl.endBold();
} }
typeDecl.writeChar(' '); typeDecl.writeChar(' ');
} }
...@@ -332,17 +334,19 @@ void MemberList::writePlainDeclarations(OutputList &ol, ...@@ -332,17 +334,19 @@ void MemberList::writePlainDeclarations(OutputList &ol,
{ {
if (!Config::genTagFile.isEmpty()) if (!Config::genTagFile.isEmpty())
{ {
tagFile << " <member kind=\"enumvalue\">" << endl; Doxygen::tagFile << " <member kind=\"enumvalue\">" << endl;
tagFile << " <name>" << convertToXML(fmd->name()) << "</name>" << endl; Doxygen::tagFile << " <name>" << convertToXML(fmd->name()) << "</name>" << endl;
tagFile << " <anchor>" << convertToXML(fmd->anchor()) << "</anchor>" << endl; Doxygen::tagFile << " <anchor>" << convertToXML(fmd->anchor()) << "</anchor>" << endl;
tagFile << " <arglist>" << convertToXML(fmd->argsString()) << "</arglist>" << endl; Doxygen::tagFile << " <arglist>" << convertToXML(fmd->argsString()) << "</arglist>" << endl;
tagFile << " </member>" << endl; Doxygen::tagFile << " </member>" << endl;
} }
fmd->writeLink(typeDecl,cd,nd,fd,gd); fmd->writeLink(typeDecl,cd,nd,fd,gd);
} }
else // no docs for this enum value else // no docs for this enum value
{ {
typeDecl.writeBoldString(fmd->name()); typeDecl.startBold();
typeDecl.docify(fmd->name());
typeDecl.endBold();
} }
if (!fmd->initializer().isEmpty()) // enum value has initializer if (!fmd->initializer().isEmpty()) // enum value has initializer
{ {
...@@ -485,7 +489,9 @@ void MemberList::writePlainDeclarations(OutputList &ol, ...@@ -485,7 +489,9 @@ void MemberList::writePlainDeclarations(OutputList &ol,
ol.startMemberItem(0); ol.startMemberItem(0);
ol.docify("class "); ol.docify("class ");
ol.insertMemberAlign(); ol.insertMemberAlign();
ol.writeBoldString(md->name()); ol.startBold();
ol.docify(md->name());
ol.endBold();
ol.endMemberItem(FALSE); ol.endMemberItem(FALSE);
} }
} }
......
...@@ -97,8 +97,8 @@ void NamespaceDef::addMemberListToGroup(MemberList *ml, ...@@ -97,8 +97,8 @@ void NamespaceDef::addMemberListToGroup(MemberList *ml,
int groupId=md->getMemberGroupId(); int groupId=md->getMemberGroupId();
if ((md->*func)() && groupId!=-1) if ((md->*func)() && groupId!=-1)
{ {
QCString *pGrpHeader = memberHeaderDict[groupId]; QCString *pGrpHeader = Doxygen::memberHeaderDict[groupId];
QCString *pDocs = memberDocDict[groupId]; QCString *pDocs = Doxygen::memberDocDict[groupId];
if (pGrpHeader) if (pGrpHeader)
{ {
MemberGroup *mg = memberGroupDict->find(groupId); MemberGroup *mg = memberGroupDict->find(groupId);
...@@ -200,9 +200,9 @@ void NamespaceDef::writeDocumentation(OutputList &ol) ...@@ -200,9 +200,9 @@ void NamespaceDef::writeDocumentation(OutputList &ol)
if (!Config::genTagFile.isEmpty()) if (!Config::genTagFile.isEmpty())
{ {
tagFile << " <compound kind=\"namespace\">" << endl; Doxygen::tagFile << " <compound kind=\"namespace\">" << endl;
tagFile << " <name>" << convertToXML(name()) << "</name>" << endl; Doxygen::tagFile << " <name>" << convertToXML(name()) << "</name>" << endl;
tagFile << " <filename>" << convertToXML(fileName) << ".html</filename>" << endl; Doxygen::tagFile << " <filename>" << convertToXML(fileName) << ".html</filename>" << endl;
} }
ol.startTextBlock(); ol.startTextBlock();
...@@ -354,7 +354,8 @@ void NamespaceDef::writeDocumentation(OutputList &ol) ...@@ -354,7 +354,8 @@ void NamespaceDef::writeDocumentation(OutputList &ol)
if (!Config::genTagFile.isEmpty()) if (!Config::genTagFile.isEmpty())
{ {
tagFile << " </compound>" << endl; writeDocAnchorsToTagFile();
Doxygen::tagFile << " </compound>" << endl;
} }
ol.popGeneratorState(); ol.popGeneratorState();
......
...@@ -30,112 +30,150 @@ class DotClassGraph; ...@@ -30,112 +30,150 @@ class DotClassGraph;
class DotInclDepGraph; class DotInclDepGraph;
class DotGfxHierarchyTable; class DotGfxHierarchyTable;
class OutputGenerator /*! \brief Base Interface used for generating documentation.
*
* This abstract class is used by the documentation block
* parser to generate the output for a specific format,
* or a list of formats (see OutputList). This interface
* contains functions that generate output.
*/
class BaseOutputDocInterface
{ {
public: public:
enum OutputType { Html, Latex, Man, RTF, XML };
OutputGenerator(); /*! Start of a bullet list: e.g. \c <ul> in html. writeListItem() is
virtual ~OutputGenerator(); * Used for the bullet items.
*/
virtual void startItemList() = 0;
virtual OutputGenerator *copy() = 0; /*! Writes a list item for a bullet or enumerated
virtual void append(const OutputGenerator *) = 0; * list: e.g. \c <li> in html
virtual void enable() = 0; */
virtual void disable() = 0; virtual void writeListItem() = 0;
virtual void enableIf(OutputType o) = 0;
virtual void disableIf(OutputType o) = 0;
virtual void disableIfNot(OutputType o) = 0;
virtual bool isEnabled(OutputType o) = 0;
virtual OutputGenerator *get(OutputType o) = 0;
virtual void startFile(const char *name,const char *title,bool ext) = 0; /*! Ends a bullet list: e.g. \c </ul> in html */
virtual void writeFooter(int,bool) = 0;
virtual void endFile() = 0;
virtual void startIndexSection(IndexSections) = 0;
virtual void endIndexSection(IndexSections) = 0;
virtual void startProjectNumber() = 0;
virtual void endProjectNumber() = 0;
virtual void writeStyleInfo(int part) = 0;
virtual void startTitleHead(const char *) = 0;
virtual void endTitleHead(const char *fileName,const char *name) = 0;
virtual void startTitle() = 0;
virtual void endTitle() = 0;
virtual void newParagraph() = 0;
virtual void writeString(const char *text) = 0;
virtual void startIndexList() = 0;
virtual void endIndexList() = 0;
virtual void startItemList() = 0;
virtual void endItemList() = 0; virtual void endItemList() = 0;
/*! Writes an ASCII string to the output. Converts characters that have
* A special meaning, like \c & in html.
*/
virtual void docify(const char *s) = 0;
/*! Writes a single ASCII character to the output. Converts characters
* that have a special meaning.
*/
virtual void writeChar(char c) = 0;
/*! Writes an ASCII string to the output, \e without converting
* special characters.
*/
virtual void writeString(const char *text) = 0;
/*! Starts a new paragraph */
virtual void newParagraph() = 0;
/*! Starts a enumeration list: e.g. \c <ol> in html.
* writeListItem() is used for the items.
*/
virtual void startEnumList() = 0; virtual void startEnumList() = 0;
/*! Ends an enumeration list: e.g. \c </ol> in html.
*/
virtual void endEnumList() = 0; virtual void endEnumList() = 0;
virtual void startBold() = 0;
virtual void endBold() = 0; /*! Writes a link to an object in the documentation.
virtual void startAlphabeticalIndexList() = 0; * \param ref If this is non-zero, the object is to be found in
virtual void endAlphabeticalIndexList() = 0; * an external documentation file.
virtual void writeIndexHeading(const char *s) = 0; * \param file The file in which the object is located.
virtual void writeIndexItem(const char *ref,const char *file, * \param anchor The anchor uniquely identifying the object within
const char *text) = 0; * the file.
virtual void docify(const char *s) = 0; * \param text The text to display as a placeholder for the link.
virtual void codify(const char *s) = 0; */
virtual void writeObjectLink(const char *ref,const char *file, virtual void writeObjectLink(const char *ref,const char *file,
const char *anchor, const char *text) = 0; const char *anchor, const char *text) = 0;
/*! Writes a link to an object in a code fragment.
* \param ref If this is non-zero, the object is to be found in
* an external documentation file.
* \param file The file in which the object is located.
* \param anchor The anchor uniquely identifying the object within
* the file.
* \param text The text to display as a placeholder for the link.
*/
virtual void writeCodeLink(const char *ref,const char *file, virtual void writeCodeLink(const char *ref,const char *file,
const char *anchor,const char *text) = 0; const char *anchor,const char *text) = 0;
virtual void startTextLink(const char *file,const char *anchor) = 0;
virtual void endTextLink() = 0; /*! Writes a (link to an) URL found in the documentation.
* \param url To URL to link to.
* \param text The text to display as a placeholder for the link.
*/
virtual void writeHtmlLink(const char *url,const char *text) = 0; virtual void writeHtmlLink(const char *url,const char *text) = 0;
/*! Writes a (link to an) email address found in the documentation.
* \param url To email address, this is also used for the link text.
*/
virtual void writeMailLink(const char *url) = 0; virtual void writeMailLink(const char *url) = 0;
/*! Changes the text font to bold face. The bold section ends with
* endBold()
*/
virtual void startBold() = 0;
/*! End a section of text displayed in bold face. */
virtual void endBold() = 0;
/*! Changes the text font to fixed size. The section ends with
* endTypewriter()
*/
virtual void startTypewriter() = 0; virtual void startTypewriter() = 0;
/*! End a section of text displayed in typewriter style. */
virtual void endTypewriter() = 0; virtual void endTypewriter() = 0;
virtual void startGroupHeader() = 0;
virtual void endGroupHeader() = 0;
virtual void writeListItem() = 0;
virtual void startMemberSections() = 0; /*! Changes the text font to italic. The italic section ends with
virtual void endMemberSections() = 0; * endEmphasis()
virtual void startMemberHeader() = 0; */
virtual void endMemberHeader() = 0; virtual void startEmphasis() = 0;
virtual void startMemberSubtitle() = 0;
virtual void endMemberSubtitle() = 0;
virtual void startMemberList() = 0;
virtual void endMemberList() = 0;
virtual void startMemberItem(int) = 0;
virtual void endMemberItem(bool) = 0;
virtual void startMemberGroupHeader(bool) = 0;
virtual void endMemberGroupHeader() = 0;
virtual void startMemberGroupDocs() = 0;
virtual void endMemberGroupDocs() = 0;
virtual void startMemberGroup() = 0;
virtual void endMemberGroup(bool) = 0;
virtual void insertMemberAlign() = 0;
virtual void writeRuler() = 0; /*! Ends a section of text displayed in italic. */
virtual void writeAnchor(const char *fileName,const char *name) = 0; virtual void endEmphasis() = 0;
/*! Starts a source code fragment. The fragment will be
* fed to the code parser (see code.h) for syntax highlighting
* and cross-referencing. The fragment ends by a call to
* endCodeFragment()
*/
virtual void startCodeFragment() = 0; virtual void startCodeFragment() = 0;
/*! Ends a source code fragment
*/
virtual void endCodeFragment() = 0; virtual void endCodeFragment() = 0;
/*! Starts a fragment of preformatted text. This means that
* spacing, tabs and newlines should be kept in the output
*/
virtual void startPreFragment() = 0; virtual void startPreFragment() = 0;
/*! Ens a preformatted text fragment. */
virtual void endPreFragment() = 0; virtual void endPreFragment() = 0;
virtual void startCodeLine() = 0; /*! Writes a horizontal ruler to the output */
virtual void endCodeLine() = 0; virtual void writeRuler() = 0;
virtual void writeBoldString(const char *text) = 0;
virtual void startEmphasis() = 0; /*! Starts a description list: e.g. \c <dl> in HTML
virtual void endEmphasis() = 0; * Items are surrounded by startDescItem() and endDescItem()
virtual void writeChar(char c) = 0; */
virtual void startMemberDoc(const char *,const char *,
const char *,const char *) = 0;
virtual void endMemberDoc() = 0;
virtual void startDoxyAnchor(const char *fName,const char *anchor,
const char *name) = 0;
virtual void endDoxyAnchor(const char *fileName,const char *anchor) = 0;
virtual void startCodeAnchor(const char *label) = 0;
virtual void endCodeAnchor() = 0;
virtual void writeLatexSpacing() = 0;
virtual void writeStartAnnoItem(const char *type,const char *file,
const char *path,const char *name) = 0;
virtual void writeEndAnnoItem(const char *name) = 0;
virtual void startDescription() = 0; virtual void startDescription() = 0;
/*! Ends a description list: e.g. \c </dl> in HTML */
virtual void endDescription() = 0; virtual void endDescription() = 0;
/*! Starts an item of a description list: e.g. \c <dt> in HTML. */
virtual void startDescItem() = 0; virtual void startDescItem() = 0;
/*! Ends an item of a description list and starts the
* description itself: e.g. \c <dd> in HTML.
*/
virtual void endDescItem() = 0; virtual void endDescItem() = 0;
virtual void startSubsection() = 0; virtual void startSubsection() = 0;
virtual void endSubsection() = 0; virtual void endSubsection() = 0;
...@@ -164,52 +202,150 @@ class OutputGenerator ...@@ -164,52 +202,150 @@ class OutputGenerator
virtual void writeTilde(char) = 0; virtual void writeTilde(char) = 0;
virtual void writeRing(char) = 0; virtual void writeRing(char) = 0;
virtual void writeSharpS() = 0; virtual void writeSharpS() = 0;
virtual void startMemberDescription() = 0;
virtual void endMemberDescription() = 0;
virtual void startDescList() = 0; virtual void startDescList() = 0;
virtual void endDescList() = 0;
virtual void endDescTitle() = 0; virtual void endDescTitle() = 0;
virtual void writeDescItem() = 0; virtual void writeDescItem() = 0;
virtual void endDescList() = 0; virtual void startTitle() = 0;
virtual void endTitle() = 0;
virtual void writeAnchor(const char *fileName,const char *name) = 0;
virtual void startSection(const char *,const char *,bool) = 0; virtual void startSection(const char *,const char *,bool) = 0;
virtual void endSection(const char *,bool) = 0; virtual void endSection(const char *,bool) = 0;
virtual void writeSectionRef(const char *,const char *,const char *) = 0; virtual void writeSectionRef(const char *,const char *,
const char *,const char *) = 0;
virtual void writeSectionRefItem(const char *,const char *,const char *) = 0; virtual void writeSectionRefItem(const char *,const char *,const char *) = 0;
virtual void writeSectionRefAnchor(const char *,const char *,const char *) = 0;
virtual void lineBreak() = 0; virtual void lineBreak() = 0;
virtual void addIndexItem(const char *s1,const char *s2) = 0; virtual void addIndexItem(const char *s1,const char *s2) = 0;
virtual void startIndent() = 0;
virtual void endIndent() = 0;
virtual void writeSynopsis() = 0;
virtual void startClassDiagram() = 0;
virtual void endClassDiagram(ClassDiagram &,const char *,const char *) = 0;
virtual void startColorFont(uchar r,uchar g,uchar b) = 0;
virtual void endColorFont() = 0;
virtual void startPageRef() = 0;
virtual void endPageRef(const char *,const char *) = 0;
virtual void startQuickIndexItem(const char *s,const char *l) = 0;
virtual void endQuickIndexItem() = 0;
virtual void writeFormula(const char *,const char *) = 0; virtual void writeFormula(const char *,const char *) = 0;
virtual void writeNonBreakableSpace() = 0; virtual void writeNonBreakableSpace() = 0;
virtual void startImage(const char *,const char *,bool) = 0; virtual void startImage(const char *,const char *,bool) = 0;
virtual void endImage(bool) = 0; virtual void endImage(bool) = 0;
virtual void startDescTable() = 0; virtual void startDescTable() = 0;
virtual void endDescTable() = 0; virtual void endDescTable() = 0;
virtual void startDescTableTitle() = 0; virtual void startDescTableTitle() = 0;
virtual void endDescTableTitle() = 0; virtual void endDescTableTitle() = 0;
virtual void startDescTableData() = 0; virtual void startDescTableData() = 0;
virtual void endDescTableData() = 0; virtual void endDescTableData() = 0;
virtual void startTextLink(const char *file,const char *anchor) = 0;
virtual void endTextLink() = 0;
virtual void startPageRef() = 0;
virtual void endPageRef(const char *,const char *) = 0;
virtual void startCodeLine() = 0;
virtual void endCodeLine() = 0;
virtual void startCodeAnchor(const char *label) = 0;
virtual void endCodeAnchor() = 0;
virtual void startFontClass(const char *) = 0;
virtual void endFontClass() = 0;
/*! Writes an ASCII string to the output. This function should keep
* spaces visible, should break lines at a newline and should convert
* tabs to the right number of spaces.
*/
virtual void codify(const char *s) = 0;
};
/*! \brief Abstract output generator.
*
* Subclass this class to add support for a new output format
*/
class OutputGenerator : public BaseOutputDocInterface
{
public:
enum OutputType { Html, Latex, Man, RTF, XML };
OutputGenerator();
virtual ~OutputGenerator();
///////////////////////////////////////////////////////////////
// generic generator methods
///////////////////////////////////////////////////////////////
virtual OutputGenerator *copy() = 0;
virtual void append(const OutputGenerator *) = 0;
virtual void enable() = 0;
virtual void disable() = 0;
virtual void enableIf(OutputType o) = 0;
virtual void disableIf(OutputType o) = 0;
virtual void disableIfNot(OutputType o) = 0;
virtual bool isEnabled(OutputType o) = 0;
virtual OutputGenerator *get(OutputType o) = 0;
void clear() { b.close(); a.resize(0); b.setBuffer(a);
b.open(IO_WriteOnly); t.setDevice(&b); }
void startPlainFile(const char *name);
void endPlainFile();
QCString getContents() const;
bool isEnabled() const { return active; }
void pushGeneratorState();
void popGeneratorState();
///////////////////////////////////////////////////////////////
// structural output interface
///////////////////////////////////////////////////////////////
virtual void startFile(const char *name,const char *title,bool ext) = 0;
virtual void writeFooter(int,bool) = 0;
virtual void endFile() = 0;
virtual void startIndexSection(IndexSections) = 0;
virtual void endIndexSection(IndexSections) = 0;
virtual void startProjectNumber() = 0;
virtual void endProjectNumber() = 0;
virtual void writeStyleInfo(int part) = 0;
virtual void startTitleHead(const char *) = 0;
virtual void endTitleHead(const char *fileName,const char *name) = 0;
virtual void startIndexList() = 0;
virtual void endIndexList() = 0;
virtual void startAlphabeticalIndexList() = 0;
virtual void endAlphabeticalIndexList() = 0;
virtual void writeIndexHeading(const char *s) = 0;
virtual void writeIndexItem(const char *ref,const char *file,
const char *text) = 0;
virtual void startGroupHeader() = 0;
virtual void endGroupHeader() = 0;
virtual void startMemberSections() = 0;
virtual void endMemberSections() = 0;
virtual void startMemberHeader() = 0;
virtual void endMemberHeader() = 0;
virtual void startMemberSubtitle() = 0;
virtual void endMemberSubtitle() = 0;
virtual void startMemberList() = 0;
virtual void endMemberList() = 0;
virtual void startMemberItem(int) = 0;
virtual void endMemberItem(bool) = 0;
virtual void startMemberGroupHeader(bool) = 0;
virtual void endMemberGroupHeader() = 0;
virtual void startMemberGroupDocs() = 0;
virtual void endMemberGroupDocs() = 0;
virtual void startMemberGroup() = 0;
virtual void endMemberGroup(bool) = 0;
virtual void insertMemberAlign() = 0;
virtual void startMemberDoc(const char *,const char *,
const char *,const char *) = 0;
virtual void endMemberDoc() = 0;
virtual void startDoxyAnchor(const char *fName,const char *anchor,
const char *name) = 0;
virtual void endDoxyAnchor(const char *fileName,const char *anchor) = 0;
virtual void writeLatexSpacing() = 0;
virtual void writeStartAnnoItem(const char *type,const char *file,
const char *path,const char *name) = 0;
virtual void writeEndAnnoItem(const char *name) = 0;
virtual void startMemberDescription() = 0;
virtual void endMemberDescription() = 0;
virtual void startIndent() = 0;
virtual void endIndent() = 0;
virtual void writeSynopsis() = 0;
virtual void startClassDiagram() = 0;
virtual void endClassDiagram(ClassDiagram &,const char *,const char *) = 0;
virtual void startDotGraph() = 0; virtual void startDotGraph() = 0;
virtual void endDotGraph(DotClassGraph &g) = 0; virtual void endDotGraph(DotClassGraph &g) = 0;
virtual void startInclDepGraph() = 0; virtual void startInclDepGraph() = 0;
virtual void endInclDepGraph(DotInclDepGraph &g) = 0; virtual void endInclDepGraph(DotInclDepGraph &g) = 0;
virtual void writeGraphicalHierarchy(DotGfxHierarchyTable &g) = 0; virtual void writeGraphicalHierarchy(DotGfxHierarchyTable &g) = 0;
virtual void startQuickIndexItem(const char *s,const char *l) = 0;
virtual void endQuickIndexItem() = 0;
virtual void startTextBlock(bool) = 0; virtual void startTextBlock(bool) = 0;
virtual void endTextBlock() = 0; virtual void endTextBlock() = 0;
virtual void lastIndexPage() = 0; virtual void lastIndexPage() = 0;
virtual void startMemberDocPrefixItem() = 0; virtual void startMemberDocPrefixItem() = 0;
virtual void endMemberDocPrefixItem() = 0; virtual void endMemberDocPrefixItem() = 0;
virtual void startMemberDocName() = 0; virtual void startMemberDocName() = 0;
...@@ -217,18 +353,6 @@ class OutputGenerator ...@@ -217,18 +353,6 @@ class OutputGenerator
virtual void startParameter(bool) = 0; virtual void startParameter(bool) = 0;
virtual void endParameter(bool) = 0; virtual void endParameter(bool) = 0;
virtual void startFontClass(const char *) = 0;
virtual void endFontClass() = 0;
void clear() { b.close(); a.resize(0); b.setBuffer(a);
b.open(IO_WriteOnly); t.setDevice(&b); }
void startPlainFile(const char *name);
void endPlainFile();
QCString getContents() const;
bool isEnabled() const { return active; }
void pushGeneratorState();
void popGeneratorState();
protected: protected:
QTextStream fs; QTextStream fs;
QByteArray a; QByteArray a;
...@@ -244,4 +368,61 @@ class OutputGenerator ...@@ -244,4 +368,61 @@ class OutputGenerator
QStack<bool> *genStack; QStack<bool> *genStack;
}; };
/*! \brief Base Interface used for generating documentation.
*
* This abstract class is used by the documentation block
* parser to generate the output for a specific format.
* This interface contains some state saving and changing
* functions for dealing with format specific output.
*/
class OutputDocInterface : public BaseOutputDocInterface
{
public:
/*! Create a new output generator. This can later by appended
* to the current one using append().
*/
virtual OutputDocInterface *clone() = 0;
/*! Disables all output formats except format \a o
* (useful for OutputList only)
*/
virtual void disableAllBut(OutputGenerator::OutputType o) = 0;
/*! Enables all output formats as far as they have been enabled in
* the config file. (useful for OutputList only)
*/
virtual void enableAll() = 0;
/*! Disables all output formats (useful for OutputList only) */
virtual void disableAll()= 0;
/*! Disables a specific output format (useful for OutputList only) */
virtual void disable(OutputGenerator::OutputType o) = 0;
/*! Enables a specific output format (useful for OutputList only) */
virtual void enable(OutputGenerator::OutputType o) = 0;
/*! Check whether a specific output format is currenly enabled
* (useful for OutputList only)
*/
virtual bool isEnabled(OutputGenerator::OutputType o) = 0;
/*! Appends the output generated by generator \a g to this
* generator.
*/
virtual void append(const OutputDocInterface *g) = 0;
/*! Pushes the state of the current generator (or list of
* generators) on a stack.
*/
virtual void pushGeneratorState() = 0;
/*! Pops the state of the current generator (or list of
* generators) on a stack. Should be preceded by a call
* the pushGeneratorState().
*/
virtual void popGeneratorState() = 0;
};
#endif #endif
...@@ -37,11 +37,11 @@ class DotClassGraph; ...@@ -37,11 +37,11 @@ class DotClassGraph;
class DotInclDepGraph; class DotInclDepGraph;
class DotGfxHierarchyTable; class DotGfxHierarchyTable;
class OutputList class OutputList : public OutputDocInterface
{ {
public: public:
OutputList(bool); OutputList(bool);
~OutputList(); virtual ~OutputList();
OutputList(const OutputList *ol); OutputList(const OutputList *ol);
OutputList &operator=(const OutputList &ol); OutputList &operator=(const OutputList &ol);
OutputList &operator+=(const OutputList &ol); OutputList &operator+=(const OutputList &ol);
...@@ -56,7 +56,20 @@ class OutputList ...@@ -56,7 +56,20 @@ class OutputList
bool isEnabled(OutputGenerator::OutputType o); bool isEnabled(OutputGenerator::OutputType o);
void pushGeneratorState(); void pushGeneratorState();
void popGeneratorState(); void popGeneratorState();
//////////////////////////////////////////////////
// OutputDocInterface implementation
//////////////////////////////////////////////////
OutputDocInterface *clone()
{
return new OutputList(this);
}
void append(const OutputDocInterface *g)
{
operator+=(*(OutputList *)g);
}
//void writeIndex() //void writeIndex()
//{ forall(&OutputGenerator::writeIndex); } //{ forall(&OutputGenerator::writeIndex); }
void startIndexSection(IndexSections is) void startIndexSection(IndexSections is)
...@@ -190,8 +203,8 @@ class OutputList ...@@ -190,8 +203,8 @@ class OutputList
{ forall(&OutputGenerator::startCodeLine); } { forall(&OutputGenerator::startCodeLine); }
void endCodeLine() void endCodeLine()
{ forall(&OutputGenerator::endCodeLine); } { forall(&OutputGenerator::endCodeLine); }
void writeBoldString(const char *text) //void writeBoldString(const char *text)
{ forall(&OutputGenerator::writeBoldString,text); } //{ forall(&OutputGenerator::writeBoldString,text); }
void startEmphasis() void startEmphasis()
{ forall(&OutputGenerator::startEmphasis); } { forall(&OutputGenerator::startEmphasis); }
void endEmphasis() void endEmphasis()
...@@ -303,12 +316,13 @@ class OutputList ...@@ -303,12 +316,13 @@ class OutputList
{ forall(&OutputGenerator::startSection,lab,title,sub); } { forall(&OutputGenerator::startSection,lab,title,sub); }
void endSection(const char *lab,bool sub) void endSection(const char *lab,bool sub)
{ forall(&OutputGenerator::endSection,lab,sub); } { forall(&OutputGenerator::endSection,lab,sub); }
void writeSectionRef(const char *page,const char *lab, const char *title) void writeSectionRef(const char *ref,const char *file,
{ forall(&OutputGenerator::writeSectionRef,page,lab,title); } const char *anchor, const char *title)
{ forall(&OutputGenerator::writeSectionRef,ref,file,anchor,title); }
void writeSectionRefItem(const char *page,const char *lab, const char *title) void writeSectionRefItem(const char *page,const char *lab, const char *title)
{ forall(&OutputGenerator::writeSectionRefItem,page,lab,title); } { forall(&OutputGenerator::writeSectionRefItem,page,lab,title); }
void writeSectionRefAnchor(const char *page,const char *lab, const char *title) //void writeSectionRefAnchor(const char *page,const char *lab, const char *title)
{ forall(&OutputGenerator::writeSectionRefAnchor,page,lab,title); } //{ forall(&OutputGenerator::writeSectionRefAnchor,page,lab,title); }
void addIndexItem(const char *s1,const char *s2) void addIndexItem(const char *s1,const char *s2)
{ forall(&OutputGenerator::addIndexItem,s1,s2); } { forall(&OutputGenerator::addIndexItem,s1,s2); }
void writeSynopsis() void writeSynopsis()
...@@ -317,10 +331,10 @@ class OutputList ...@@ -317,10 +331,10 @@ class OutputList
{ forall(&OutputGenerator::startClassDiagram); } { forall(&OutputGenerator::startClassDiagram); }
void endClassDiagram(ClassDiagram &d,const char *f,const char *n) void endClassDiagram(ClassDiagram &d,const char *f,const char *n)
{ forall(&OutputGenerator::endClassDiagram,d,f,n); } { forall(&OutputGenerator::endClassDiagram,d,f,n); }
void startColorFont(uchar r,uchar g,uchar b) //void startColorFont(uchar r,uchar g,uchar b)
{ forall(&OutputGenerator::startColorFont,r,g,b); } //{ forall(&OutputGenerator::startColorFont,r,g,b); }
void endColorFont() //void endColorFont()
{ forall(&OutputGenerator::endColorFont); } //{ forall(&OutputGenerator::endColorFont); }
void startPageRef() void startPageRef()
{ forall(&OutputGenerator::startPageRef); } { forall(&OutputGenerator::startPageRef); }
void endPageRef(const char *c,const char *a) void endPageRef(const char *c,const char *a)
......
...@@ -74,7 +74,7 @@ void PackageDef::writeDocumentation(OutputList &ol) ...@@ -74,7 +74,7 @@ void PackageDef::writeDocumentation(OutputList &ol)
if (!Config::genTagFile.isEmpty()) if (!Config::genTagFile.isEmpty())
{ {
tagFile << " <compound kind=\"package\">" << endl; Doxygen::tagFile << " <compound kind=\"package\">" << endl;
} }
ol.startMemberSections(); ol.startMemberSections();
...@@ -87,7 +87,8 @@ void PackageDef::writeDocumentation(OutputList &ol) ...@@ -87,7 +87,8 @@ void PackageDef::writeDocumentation(OutputList &ol)
if (!Config::genTagFile.isEmpty()) if (!Config::genTagFile.isEmpty())
{ {
tagFile << " </compound>" << endl; writeDocAnchorsToTagFile();
Doxygen::tagFile << " </compound>" << endl;
} }
if (!briefDescription().isEmpty() || !documentation().isEmpty()) if (!briefDescription().isEmpty() || !documentation().isEmpty())
......
...@@ -18,12 +18,14 @@ ...@@ -18,12 +18,14 @@
#include "sortdict.h" #include "sortdict.h"
#include "config.h" #include "config.h"
#include "section.h"
class PageInfo class PageInfo
{ {
public: public:
PageInfo(const char *f, int l,const char *n,const char *d,const char *t) : PageInfo(const char *f, int l,const char *n,const char *d,const char *t) :
defFileName(f), defLine(l), name(n), defFileName(f), defLine(l), name(n),
doc(d), title(t), todoId(0), testId(0),inGroup(0) {} doc(d), title(t), todoId(0), testId(0),inGroup(0), sectionDict(0) {}
// where the page definition was found // where the page definition was found
QCString defFileName; QCString defFileName;
...@@ -36,19 +38,62 @@ class PageInfo ...@@ -36,19 +38,62 @@ class PageInfo
// external reference? if so then this is the tag file name // external reference? if so then this is the tag file name
QCString reference; QCString reference;
QCString fileName;
// functions to get a uniform interface with Definitions // functions to get a uniform interface with Definitions
QCString getOutputFileBase() const QCString getOutputFileBase() const
{ if (Config::caseSensitiveNames) return name; else return name.lower(); } { return fileName; }
bool isReference() const { return !reference.isEmpty(); } bool isReference() const { return !reference.isEmpty(); }
QCString getReference() const { return reference; } QCString getReference() const { return reference; }
void addSections(QList<QCString> *anchorList)
{
if (anchorList)
{
QCString *s=anchorList->first();
while (s)
{
SectionInfo *si=0;
if (!s->isEmpty() && (si=Doxygen::sectionDict[*s]))
{
//printf("Add section `%s' to definition `%s'\n",
// si->label.data(),n.data());
if (sectionDict==0)
{
sectionDict = new SectionDict(17);
}
if (sectionDict->find(*s)==0)
{
sectionDict->insert(*s,si);
}
si->pageRef = this;
si->fileName = fileName;
}
s=anchorList->next();
}
}
}
void writeDocAnchorsToTagFile()
{
if (!Config::genTagFile.isEmpty() && sectionDict)
{
QDictIterator<SectionInfo> sdi(*sectionDict);
SectionInfo *si;
for (;(si=sdi.current());++sdi)
{
Doxygen::tagFile << " <docanchor>" << si->label << "</docanchor>" << endl;
}
}
}
// ids // ids
int todoId; int todoId;
int testId; int testId;
// is this page part of a group // is this page part of a group
GroupDef *inGroup; GroupDef *inGroup;
SectionDict *sectionDict;
}; };
class PageSDict : public SDict<PageInfo> class PageSDict : public SDict<PageInfo>
......
...@@ -99,7 +99,7 @@ static void setFileName(const char *name) ...@@ -99,7 +99,7 @@ static void setFileName(const char *name)
{ {
bool ambig; bool ambig;
g_yyFileName=name; g_yyFileName=name;
g_yyFileDef=findFileDef(inputNameDict,g_yyFileName,ambig); g_yyFileDef=findFileDef(Doxygen::inputNameDict,g_yyFileName,ambig);
} }
static void incrLevel() static void incrLevel()
...@@ -799,7 +799,7 @@ Define *newDefine() ...@@ -799,7 +799,7 @@ Define *newDefine()
def->lineNr = g_yyLineNr; def->lineNr = g_yyLineNr;
def->varArgs = g_defVarArgs; def->varArgs = g_defVarArgs;
//printf("newDefine: `%s'->`%s'\n",def->name.data(),def->definition.data()); //printf("newDefine: `%s'->`%s'\n",def->name.data(),def->definition.data());
if (!def->name.isEmpty() && expandAsDefinedDict[def->name]) if (!def->name.isEmpty() && Doxygen::expandAsDefinedDict[def->name])
{ {
def->isPredefined=TRUE; def->isPredefined=TRUE;
} }
...@@ -828,12 +828,12 @@ void addDefine() ...@@ -828,12 +828,12 @@ void addDefine()
md->setFileDef(g_yyFileDef); md->setFileDef(g_yyFileDef);
md->setDefinition("#define "+g_defName); md->setDefinition("#define "+g_defName);
MemberName *mn=functionNameDict[g_defName]; MemberName *mn=Doxygen::functionNameDict[g_defName];
if (mn==0) if (mn==0)
{ {
mn = new MemberName(g_defName); mn = new MemberName(g_defName);
functionNameList.append(mn); Doxygen::functionNameList.append(mn);
functionNameDict.insert(g_defName,mn); Doxygen::functionNameDict.insert(g_defName,mn);
} }
mn->append(md); mn->append(md);
if (g_yyFileDef) g_yyFileDef->insertMember(md); if (g_yyFileDef) g_yyFileDef->insertMember(md);
...@@ -912,7 +912,7 @@ static void readIncludeFile(const QCString &inc) ...@@ -912,7 +912,7 @@ static void readIncludeFile(const QCString &inc)
if (oldFileDef) if (oldFileDef)
{ {
bool ambig; bool ambig;
FileDef *fd = findFileDef(inputNameDict,incFileName,ambig); FileDef *fd = findFileDef(Doxygen::inputNameDict,incFileName,ambig);
// add include dependency to the file in which the #include was found // add include dependency to the file in which the #include was found
oldFileDef->addIncludeDependency(fd,incFileName,localInclude); oldFileDef->addIncludeDependency(fd,incFileName,localInclude);
// add included by dependency // add included by dependency
......
...@@ -810,7 +810,7 @@ void RTFGenerator::startIndexSection(IndexSections is) ...@@ -810,7 +810,7 @@ void RTFGenerator::startIndexSection(IndexSections is)
case isPackageDocumentation: case isPackageDocumentation:
{ {
//Package Documentation //Package Documentation
PackageSDict::Iterator pdi(packageDict); PackageSDict::Iterator pdi(Doxygen::packageDict);
PackageDef *pd=pdi.toFirst(); PackageDef *pd=pdi.toFirst();
bool found=FALSE; bool found=FALSE;
while (pd && !found) while (pd && !found)
...@@ -825,7 +825,7 @@ void RTFGenerator::startIndexSection(IndexSections is) ...@@ -825,7 +825,7 @@ void RTFGenerator::startIndexSection(IndexSections is)
case isModuleDocumentation: case isModuleDocumentation:
{ {
//Module Documentation //Module Documentation
GroupDef *gd=groupList.first(); GroupDef *gd=Doxygen::groupList.first();
bool found=FALSE; bool found=FALSE;
while (gd && !found) while (gd && !found)
{ {
...@@ -834,14 +834,14 @@ void RTFGenerator::startIndexSection(IndexSections is) ...@@ -834,14 +834,14 @@ void RTFGenerator::startIndexSection(IndexSections is)
beginRTFChapter(); beginRTFChapter();
found=TRUE; found=TRUE;
} }
gd=groupList.next(); gd=Doxygen::groupList.next();
} }
} }
break; break;
case isNamespaceDocumentation: case isNamespaceDocumentation:
{ {
// Namespace Documentation // Namespace Documentation
NamespaceDef *nd=namespaceList.first(); NamespaceDef *nd=Doxygen::namespaceList.first();
bool found=FALSE; bool found=FALSE;
while (nd && !found) while (nd && !found)
{ {
...@@ -850,14 +850,14 @@ void RTFGenerator::startIndexSection(IndexSections is) ...@@ -850,14 +850,14 @@ void RTFGenerator::startIndexSection(IndexSections is)
beginRTFChapter(); beginRTFChapter();
found=TRUE; found=TRUE;
} }
nd=namespaceList.next(); nd=Doxygen::namespaceList.next();
} }
} }
break; break;
case isClassDocumentation: case isClassDocumentation:
{ {
//Compound Documentation //Compound Documentation
ClassDef *cd=classList.first(); ClassDef *cd=Doxygen::classList.first();
bool found=FALSE; bool found=FALSE;
while (cd && !found) while (cd && !found)
{ {
...@@ -866,7 +866,7 @@ void RTFGenerator::startIndexSection(IndexSections is) ...@@ -866,7 +866,7 @@ void RTFGenerator::startIndexSection(IndexSections is)
beginRTFChapter(); beginRTFChapter();
found=TRUE; found=TRUE;
} }
cd=classList.next(); cd=Doxygen::classList.next();
} }
} }
break; break;
...@@ -874,7 +874,7 @@ void RTFGenerator::startIndexSection(IndexSections is) ...@@ -874,7 +874,7 @@ void RTFGenerator::startIndexSection(IndexSections is)
{ {
//File Documentation //File Documentation
bool isFirst=TRUE; bool isFirst=TRUE;
FileName *fn=inputNameList.first(); FileName *fn=Doxygen::inputNameList.first();
while (fn) while (fn)
{ {
FileDef *fd=fn->first(); FileDef *fd=fn->first();
...@@ -891,7 +891,7 @@ void RTFGenerator::startIndexSection(IndexSections is) ...@@ -891,7 +891,7 @@ void RTFGenerator::startIndexSection(IndexSections is)
} }
fd=fn->next(); fd=fn->next();
} }
fn=inputNameList.next(); fn=Doxygen::inputNameList.next();
} }
} }
break; break;
...@@ -988,7 +988,7 @@ void RTFGenerator::endIndexSection(IndexSections is) ...@@ -988,7 +988,7 @@ void RTFGenerator::endIndexSection(IndexSections is)
break; break;
case isPackageDocumentation: case isPackageDocumentation:
{ {
PackageSDict::Iterator pdi(packageDict); PackageSDict::Iterator pdi(Doxygen::packageDict);
PackageDef *pd=pdi.toFirst(); PackageDef *pd=pdi.toFirst();
t << "{\\tc \\v " << theTranslator->trPackageDocumentation() << "}"<< endl; t << "{\\tc \\v " << theTranslator->trPackageDocumentation() << "}"<< endl;
while (pd) while (pd)
...@@ -1004,7 +1004,7 @@ void RTFGenerator::endIndexSection(IndexSections is) ...@@ -1004,7 +1004,7 @@ void RTFGenerator::endIndexSection(IndexSections is)
break; break;
case isModuleDocumentation: case isModuleDocumentation:
{ {
GroupDef *gd=groupList.first(); GroupDef *gd=Doxygen::groupList.first();
t << "{\\tc \\v " << theTranslator->trModuleDocumentation() << "}"<< endl; t << "{\\tc \\v " << theTranslator->trModuleDocumentation() << "}"<< endl;
while (gd) while (gd)
{ {
...@@ -1015,13 +1015,13 @@ void RTFGenerator::endIndexSection(IndexSections is) ...@@ -1015,13 +1015,13 @@ void RTFGenerator::endIndexSection(IndexSections is)
t << gd->getOutputFileBase(); t << gd->getOutputFileBase();
t << ".rtf\" \\\\*MERGEFORMAT}{\\fldrslt includedstuff}}\n"; t << ".rtf\" \\\\*MERGEFORMAT}{\\fldrslt includedstuff}}\n";
} }
gd=groupList.next(); gd=Doxygen::groupList.next();
} }
} }
break; break;
case isNamespaceDocumentation: case isNamespaceDocumentation:
{ {
NamespaceDef *nd=namespaceList.first(); NamespaceDef *nd=Doxygen::namespaceList.first();
bool found=FALSE; bool found=FALSE;
while (nd && !found) while (nd && !found)
{ {
...@@ -1033,7 +1033,7 @@ void RTFGenerator::endIndexSection(IndexSections is) ...@@ -1033,7 +1033,7 @@ void RTFGenerator::endIndexSection(IndexSections is)
t << ".rtf\" \\\\*MERGEFORMAT}{\\fldrslt includedstuff}}\n"; t << ".rtf\" \\\\*MERGEFORMAT}{\\fldrslt includedstuff}}\n";
found=TRUE; found=TRUE;
} }
nd=namespaceList.next(); nd=Doxygen::namespaceList.next();
} }
while (nd) while (nd)
{ {
...@@ -1045,13 +1045,13 @@ void RTFGenerator::endIndexSection(IndexSections is) ...@@ -1045,13 +1045,13 @@ void RTFGenerator::endIndexSection(IndexSections is)
t << nd->getOutputFileBase(); t << nd->getOutputFileBase();
t << ".rtf\" \\\\*MERGEFORMAT}{\\fldrslt includedstuff}}\n"; t << ".rtf\" \\\\*MERGEFORMAT}{\\fldrslt includedstuff}}\n";
} }
nd=namespaceList.next(); nd=Doxygen::namespaceList.next();
} }
} }
break; break;
case isClassDocumentation: case isClassDocumentation:
{ {
ClassDef *cd=classList.first(); ClassDef *cd=Doxygen::classList.first();
bool found=FALSE; bool found=FALSE;
t << "{\\tc \\v " << theTranslator->trClassDocumentation() << "}"<< endl; t << "{\\tc \\v " << theTranslator->trClassDocumentation() << "}"<< endl;
...@@ -1065,7 +1065,7 @@ void RTFGenerator::endIndexSection(IndexSections is) ...@@ -1065,7 +1065,7 @@ void RTFGenerator::endIndexSection(IndexSections is)
t << ".rtf\" \\\\*MERGEFORMAT}{\\fldrslt includedstuff}}\n"; t << ".rtf\" \\\\*MERGEFORMAT}{\\fldrslt includedstuff}}\n";
found=TRUE; found=TRUE;
} }
cd=classList.next(); cd=Doxygen::classList.next();
} }
while (cd) while (cd)
{ {
...@@ -1077,14 +1077,14 @@ void RTFGenerator::endIndexSection(IndexSections is) ...@@ -1077,14 +1077,14 @@ void RTFGenerator::endIndexSection(IndexSections is)
t << cd->getOutputFileBase(); t << cd->getOutputFileBase();
t << ".rtf\" \\\\*MERGEFORMAT}{\\fldrslt includedstuff}}\n"; t << ".rtf\" \\\\*MERGEFORMAT}{\\fldrslt includedstuff}}\n";
} }
cd=classList.next(); cd=Doxygen::classList.next();
} }
} }
break; break;
case isFileDocumentation: case isFileDocumentation:
{ {
bool isFirst=TRUE; bool isFirst=TRUE;
FileName *fn=inputNameList.first(); FileName *fn=Doxygen::inputNameList.first();
t << "{\\tc \\v " << theTranslator->trFileDocumentation() << "}"<< endl; t << "{\\tc \\v " << theTranslator->trFileDocumentation() << "}"<< endl;
while (fn) while (fn)
...@@ -1113,7 +1113,7 @@ void RTFGenerator::endIndexSection(IndexSections is) ...@@ -1113,7 +1113,7 @@ void RTFGenerator::endIndexSection(IndexSections is)
} }
fd=fn->next(); fd=fn->next();
} }
fn=inputNameList.next(); fn=Doxygen::inputNameList.next();
} }
} }
break; break;
...@@ -1121,7 +1121,7 @@ void RTFGenerator::endIndexSection(IndexSections is) ...@@ -1121,7 +1121,7 @@ void RTFGenerator::endIndexSection(IndexSections is)
{ {
//t << "}\n"; //t << "}\n";
t << "{\\tc \\v " << theTranslator->trExampleDocumentation() << "}"<< endl; t << "{\\tc \\v " << theTranslator->trExampleDocumentation() << "}"<< endl;
PageSDictIterator pdi(*exampleSDict); PageSDictIterator pdi(*Doxygen::exampleSDict);
PageInfo *pi=pdi.toFirst(); PageInfo *pi=pdi.toFirst();
if (pi) if (pi)
{ {
...@@ -1143,12 +1143,12 @@ void RTFGenerator::endIndexSection(IndexSections is) ...@@ -1143,12 +1143,12 @@ void RTFGenerator::endIndexSection(IndexSections is)
case isPageDocumentation: case isPageDocumentation:
{ {
t << "{\\tc \\v " << theTranslator->trPageDocumentation() << "}"<< endl; t << "{\\tc \\v " << theTranslator->trPageDocumentation() << "}"<< endl;
PageSDictIterator pdi(*pageSDict); PageSDictIterator pdi(*Doxygen::pageSDict);
PageInfo *pi=pdi.toFirst(); PageInfo *pi=pdi.toFirst();
bool first=TRUE; bool first=TRUE;
for (pdi.toFirst();(pi=pdi.current());++pdi) for (pdi.toFirst();(pi=pdi.current());++pdi)
{ {
if (!pi->inGroup) if (!pi->inGroup && !pi->isReference())
{ {
QCString pageName; QCString pageName;
if (Config::caseSensitiveNames) if (Config::caseSensitiveNames)
...@@ -1809,16 +1809,23 @@ void RTFGenerator::endSection(const char *lab,bool) ...@@ -1809,16 +1809,23 @@ void RTFGenerator::endSection(const char *lab,bool)
t << "}"; t << "}";
} }
void RTFGenerator::writeSectionRef(const char *,const char *lab, void RTFGenerator::writeSectionRef(const char *ref,const char *,
const char *title) const char *lab,const char *title)
{ {
startBold(); if (ref)
docify(title); {
endBold(); docify(title);
t << " ("; }
docify(theTranslator->trPageAbbreviation()); else
WriteRTFReference(lab); {
t << ")" << endl; startBold();
docify(title);
endBold();
t << " (";
docify(theTranslator->trPageAbbreviation());
WriteRTFReference(lab);
t << ")" << endl;
}
} }
void RTFGenerator::writeSectionRefItem(const char *,const char *lab, void RTFGenerator::writeSectionRefItem(const char *,const char *lab,
...@@ -1830,11 +1837,11 @@ void RTFGenerator::writeSectionRefItem(const char *,const char *lab, ...@@ -1830,11 +1837,11 @@ void RTFGenerator::writeSectionRefItem(const char *,const char *lab,
t << endl; t << endl;
} }
void RTFGenerator::writeSectionRefAnchor(const char *name,const char *lab, //void RTFGenerator::writeSectionRefAnchor(const char *name,const char *lab,
const char *title) // const char *title)
{ //{
writeSectionRef(name,lab,title); // writeSectionRef(name,lab,title);
} //}
void RTFGenerator::docify(const char *str) void RTFGenerator::docify(const char *str)
{ {
......
...@@ -109,8 +109,8 @@ class RTFGenerator : public OutputGenerator ...@@ -109,8 +109,8 @@ class RTFGenerator : public OutputGenerator
void endPreFragment() { endCodeFragment(); } void endPreFragment() { endCodeFragment(); }
void startCodeLine() { col=0; } void startCodeLine() { col=0; }
void endCodeLine() { lineBreak(); } void endCodeLine() { lineBreak(); }
void writeBoldString(const char *text) //void writeBoldString(const char *text)
{ t << "{\\b "; docify(text); t << "}"; } // { t << "{\\b "; docify(text); t << "}"; }
void startEmphasis() { t << "{\\i "; } void startEmphasis() { t << "{\\i "; }
void endEmphasis() { t << "}"; } void endEmphasis() { t << "}"; }
void startBold() { t << "{\\b "; } void startBold() { t << "{\\b "; }
...@@ -168,9 +168,9 @@ class RTFGenerator : public OutputGenerator ...@@ -168,9 +168,9 @@ class RTFGenerator : public OutputGenerator
void endDescList(); void endDescList();
void startSection(const char *,const char *,bool); void startSection(const char *,const char *,bool);
void endSection(const char *,bool); void endSection(const char *,bool);
void writeSectionRef(const char *,const char *,const char *); void writeSectionRef(const char *,const char *,const char *,const char *);
void writeSectionRefItem(const char *,const char *,const char *); void writeSectionRefItem(const char *,const char *,const char *);
void writeSectionRefAnchor(const char *,const char *,const char *); //void writeSectionRefAnchor(const char *,const char *,const char *);
void addIndexItem(const char *,const char *); void addIndexItem(const char *,const char *);
void startIndent(); void startIndent();
void endIndent(); void endIndent();
...@@ -178,8 +178,8 @@ class RTFGenerator : public OutputGenerator ...@@ -178,8 +178,8 @@ class RTFGenerator : public OutputGenerator
//void generateExternalIndex() {} //void generateExternalIndex() {}
void startClassDiagram(); void startClassDiagram();
void endClassDiagram(ClassDiagram &,const char *filename,const char *name); void endClassDiagram(ClassDiagram &,const char *filename,const char *name);
void startColorFont(uchar,uchar,uchar) {} //void startColorFont(uchar,uchar,uchar) {}
void endColorFont() {} //void endColorFont() {}
void startPageRef(); void startPageRef();
void endPageRef(const char *,const char *); void endPageRef(const char *,const char *);
void startQuickIndexItem(const char *,const char *) {} void startQuickIndexItem(const char *,const char *) {}
......
...@@ -30,6 +30,7 @@ ...@@ -30,6 +30,7 @@
#include <qarray.h> #include <qarray.h>
#include <qstack.h> #include <qstack.h>
#include <qregexp.h> #include <qregexp.h>
#include <unistd.h>
#include "scanner.h" #include "scanner.h"
#include "entry.h" #include "entry.h"
...@@ -45,9 +46,6 @@ ...@@ -45,9 +46,6 @@
#include "reflist.h" #include "reflist.h"
#include "code.h" #include "code.h"
#ifndef WIN32
#include <unistd.h>
#endif
#define YY_NEVER_INTERACTIVE 1 #define YY_NEVER_INTERACTIVE 1
...@@ -263,11 +261,11 @@ static void addSection() ...@@ -263,11 +261,11 @@ static void addSection()
//printf("New section pageName=%s label=%s title=%s\n", //printf("New section pageName=%s label=%s title=%s\n",
// current->name.data(),sectionLabel.data(),sectionTitle.data()); // current->name.data(),sectionLabel.data(),sectionTitle.data());
if (sectionLabel.isEmpty()) return; if (sectionLabel.isEmpty()) return;
if (sectionDict[sectionLabel]==0) if (Doxygen::sectionDict.find(sectionLabel)==0)
{ {
SectionInfo *si=new SectionInfo(sectionLabel,sectionTitle,sectionType); SectionInfo *si=new SectionInfo(sectionLabel,sectionTitle,sectionType);
//printf("Adding section addr=%p label=`%s' sectionTitle=`%s' fileName=%s\n",si,sectionLabel.data(),sectionTitle.data(),si->fileName.data()); //printf("Adding section addr=%p label=`%s' sectionTitle=`%s' fileName=%s\n",si,sectionLabel.data(),sectionTitle.data(),si->fileName.data());
sectionDict.insert(sectionLabel,si); Doxygen::sectionDict.insert(sectionLabel,si);
current->anchors->append(new QCString(sectionLabel)); current->anchors->append(new QCString(sectionLabel));
} }
else else
...@@ -284,13 +282,13 @@ static QCString addFormula() ...@@ -284,13 +282,13 @@ static QCString addFormula()
QCString formLabel; QCString formLabel;
QCString fText=formulaText.simplifyWhiteSpace(); QCString fText=formulaText.simplifyWhiteSpace();
Formula *f=0; Formula *f=0;
if ((f=formulaDict[fText])==0) if ((f=Doxygen::formulaDict[fText])==0)
{ {
f = new Formula(fText); f = new Formula(fText);
formulaList.append(f); Doxygen::formulaList.append(f);
formulaDict.insert(fText,f); Doxygen::formulaDict.insert(fText,f);
formLabel.sprintf("\\form#%d",f->getId()); formLabel.sprintf("\\form#%d",f->getId());
formulaNameDict.insert(formLabel,f); Doxygen::formulaNameDict.insert(formLabel,f);
} }
else else
{ {
...@@ -888,11 +886,11 @@ TITLE [tT][iI][tT][lL][eE] ...@@ -888,11 +886,11 @@ TITLE [tT][iI][tT][lL][eE]
//printf("Inserting namespace alias %s::%s->%s\n",current_root->name.data(),aliasName.data(),yytext); //printf("Inserting namespace alias %s::%s->%s\n",current_root->name.data(),aliasName.data(),yytext);
if (current_root->name.isEmpty()) if (current_root->name.isEmpty())
{ {
namespaceAliasDict.insert(aliasName,new QCString(yytext)); Doxygen::namespaceAliasDict.insert(aliasName,new QCString(yytext));
} }
else else
{ {
namespaceAliasDict.insert(current_root->name+"::"+aliasName, Doxygen::namespaceAliasDict.insert(current_root->name+"::"+aliasName,
new QCString(current_root->name+"::"+yytext)); new QCString(current_root->name+"::"+yytext));
} }
} }
...@@ -1370,10 +1368,10 @@ TITLE [tT][iI][tT][lL][eE] ...@@ -1370,10 +1368,10 @@ TITLE [tT][iI][tT][lL][eE]
{ {
// add typedef to dictionary // add typedef to dictionary
QCString dest = extractName(current->type.right(current->type.length()-8)); QCString dest = extractName(current->type.right(current->type.length()-8));
if (typedefDict[current->name]==0 && !dest.isEmpty()) if (Doxygen::typedefDict[current->name]==0 && !dest.isEmpty())
{ {
//printf("1>>>>>>>>>> adding %s->%s\n",current->name.data(),dest.data()); //printf("1>>>>>>>>>> adding %s->%s\n",current->name.data(),dest.data());
typedefDict.insert(current->name, new QCString(dest)); Doxygen::typedefDict.insert(current->name, new QCString(dest));
} }
} }
current->section = Entry::VARIABLE_SEC ; current->section = Entry::VARIABLE_SEC ;
...@@ -1629,7 +1627,7 @@ TITLE [tT][iI][tT][lL][eE] ...@@ -1629,7 +1627,7 @@ TITLE [tT][iI][tT][lL][eE]
if (!current->name.isEmpty() && current->name.at(0)!='@') if (!current->name.isEmpty() && current->name.at(0)!='@')
{ {
//printf("2>>>>>>>>>> adding %s->%s\n",msName.data(),current->name.data()); //printf("2>>>>>>>>>> adding %s->%s\n",msName.data(),current->name.data());
typedefDict.insert(msName,new QCString(current->name)); Doxygen::typedefDict.insert(msName,new QCString(current->name));
} }
} }
varEntry->type+=current->name+msType; varEntry->type+=current->name+msType;
...@@ -2284,7 +2282,7 @@ TITLE [tT][iI][tT][lL][eE] ...@@ -2284,7 +2282,7 @@ TITLE [tT][iI][tT][lL][eE]
{ {
//QCString dest = extractName(current->name); //QCString dest = extractName(current->name);
//printf("3>>>>>>>>>> adding %s->%s\n",yytext,current->name.data()); //printf("3>>>>>>>>>> adding %s->%s\n",yytext,current->name.data());
typedefDict.insert(yytext,new QCString(current->name)); Doxygen::typedefDict.insert(yytext,new QCString(current->name));
//current->extends->append( //current->extends->append(
// new BaseInfo(yytext,Public,Normal) // new BaseInfo(yytext,Public,Normal)
// ); // );
...@@ -3518,7 +3516,7 @@ TITLE [tT][iI][tT][lL][eE] ...@@ -3518,7 +3516,7 @@ TITLE [tT][iI][tT][lL][eE]
current->doc+=yytext; current->doc+=yytext;
} }
<Doc,ClassDoc,PageDoc,ExampleDoc,AfterDoc>{CMD}[a-z_A-Z][a-z_A-Z0-9]* { <Doc,ClassDoc,PageDoc,ExampleDoc,AfterDoc>{CMD}[a-z_A-Z][a-z_A-Z0-9]* {
QCString *pValue=aliasDict[yytext+1]; QCString *pValue=Doxygen::aliasDict[yytext+1];
if (pValue) if (pValue)
{ {
int i,l=pValue->length(); int i,l=pValue->length();
...@@ -3536,7 +3534,7 @@ TITLE [tT][iI][tT][lL][eE] ...@@ -3536,7 +3534,7 @@ TITLE [tT][iI][tT][lL][eE]
current->brief+=yytext; current->brief+=yytext;
} }
<JavaDoc,LineDoc,ClassDocBrief,AfterDocBrief,AfterDocLine>{CMD}[a-z_A-Z][a-z_A-Z0-9]* { <JavaDoc,LineDoc,ClassDocBrief,AfterDocBrief,AfterDocLine>{CMD}[a-z_A-Z][a-z_A-Z0-9]* {
QCString *pValue=aliasDict[yytext+1]; QCString *pValue=Doxygen::aliasDict[yytext+1];
if (pValue) if (pValue)
{ {
int i,l=pValue->length(); int i,l=pValue->length();
...@@ -3612,10 +3610,10 @@ static void endGroup() ...@@ -3612,10 +3610,10 @@ static void endGroup()
} }
else if (memberGroupId!=NOGROUP) // end of member group else if (memberGroupId!=NOGROUP) // end of member group
{ {
memberHeaderDict.insert(memberGroupId, Doxygen::memberHeaderDict.insert(memberGroupId,
new QCString(memberGroupHeader.stripWhiteSpace()) new QCString(memberGroupHeader.stripWhiteSpace())
); );
memberDocDict.insert(memberGroupId, Doxygen::memberDocDict.insert(memberGroupId,
new QCString(memberGroupDocs) new QCString(memberGroupDocs)
); );
memberGroupId=NOGROUP; memberGroupId=NOGROUP;
......
...@@ -22,26 +22,25 @@ ...@@ -22,26 +22,25 @@
#include "qtbc.h" #include "qtbc.h"
#include <qlist.h> #include <qlist.h>
#include <qdict.h> #include <qdict.h>
#include "sortdict.h"
class Definition; class Definition;
struct SectionInfo struct SectionInfo
{ {
enum SectionType { Section, Subsection, Anchor }; enum SectionType { Section, Subsection, Anchor };
SectionInfo(const char *l,const char *t,SectionType st) SectionInfo(const char *l,const char *t,SectionType st,const char *r=0)
{ label=l; title=t; type=st; definition=0; } { label=l; title=t; type=st; ref=r; definition=0; pageRef=0; }
~SectionInfo() {} ~SectionInfo() {}
QCString label; QCString label;
QCString title; QCString title;
QCString ref;
SectionType type; SectionType type;
Definition *definition; Definition *definition;
PageInfo *pageRef;
QCString fileName; QCString fileName;
}; };
class SectionList : public QList<SectionInfo>
{
};
class SectionDict : public QDict<SectionInfo> class SectionDict : public QDict<SectionInfo>
{ {
public: public:
......
...@@ -42,6 +42,7 @@ class TagMemberInfo ...@@ -42,6 +42,7 @@ class TagMemberInfo
QString anchor; QString anchor;
QString arglist; QString arglist;
QString kind; QString kind;
QStrList docAnchors;
Protection prot; Protection prot;
Specifier virt; Specifier virt;
bool isStatic; bool isStatic;
...@@ -56,6 +57,7 @@ class TagClassInfo ...@@ -56,6 +57,7 @@ class TagClassInfo
~TagClassInfo() { delete bases; } ~TagClassInfo() { delete bases; }
QString name; QString name;
QString filename; QString filename;
QStrList docAnchors;
QList<BaseInfo> *bases; QList<BaseInfo> *bases;
QList<TagMemberInfo> members; QList<TagMemberInfo> members;
Kind kind; Kind kind;
...@@ -68,6 +70,7 @@ class TagNamespaceInfo ...@@ -68,6 +70,7 @@ class TagNamespaceInfo
TagNamespaceInfo() { members.setAutoDelete(TRUE); } TagNamespaceInfo() { members.setAutoDelete(TRUE); }
QString name; QString name;
QString filename; QString filename;
QStrList docAnchors;
QList<TagMemberInfo> members; QList<TagMemberInfo> members;
QStringList classList; QStringList classList;
}; };
...@@ -80,6 +83,7 @@ class TagFileInfo ...@@ -80,6 +83,7 @@ class TagFileInfo
QString name; QString name;
QString path; QString path;
QString filename; QString filename;
QStrList docAnchors;
QList<TagMemberInfo> members; QList<TagMemberInfo> members;
QStringList classList; QStringList classList;
QStringList namespaceList; QStringList namespaceList;
...@@ -93,6 +97,7 @@ class TagGroupInfo ...@@ -93,6 +97,7 @@ class TagGroupInfo
QString name; QString name;
QString title; QString title;
QString filename; QString filename;
QStrList docAnchors;
QList<TagMemberInfo> members; QList<TagMemberInfo> members;
QStringList subgroupList; QStringList subgroupList;
QStringList classList; QStringList classList;
...@@ -108,6 +113,7 @@ class TagPageInfo ...@@ -108,6 +113,7 @@ class TagPageInfo
QString name; QString name;
QString title; QString title;
QString filename; QString filename;
QStrList docAnchors;
}; };
...@@ -274,6 +280,19 @@ class TagFileParser : public QXmlDefaultHandler ...@@ -274,6 +280,19 @@ class TagFileParser : public QXmlDefaultHandler
default: err("Error: Unexpected tag `member' found\n"); break; default: err("Error: Unexpected tag `member' found\n"); break;
} }
} }
void endDocAnchor()
{
switch(m_state)
{
case InClass: m_curClass->docAnchors.append(m_curString); break;
case InFile: m_curFile->docAnchors.append(m_curString); break;
case InNamespace: m_curNamespace->docAnchors.append(m_curString); break;
case InGroup: m_curGroup->docAnchors.append(m_curString); break;
case InPage: m_curPage->docAnchors.append(m_curString); break;
case InMember: m_curMember->docAnchors.append(m_curString); break;
default: err("Error: Unexpected tag `member' found\n"); break;
}
}
void endClass() void endClass()
{ {
switch(m_state) switch(m_state)
...@@ -463,6 +482,7 @@ class TagFileParser : public QXmlDefaultHandler ...@@ -463,6 +482,7 @@ class TagFileParser : public QXmlDefaultHandler
m_startElementHandlers.insert("namespace", new StartElementHandler(this,&TagFileParser::startStringValue)); m_startElementHandlers.insert("namespace", new StartElementHandler(this,&TagFileParser::startStringValue));
m_startElementHandlers.insert("file", new StartElementHandler(this,&TagFileParser::startStringValue)); m_startElementHandlers.insert("file", new StartElementHandler(this,&TagFileParser::startStringValue));
m_startElementHandlers.insert("page", new StartElementHandler(this,&TagFileParser::startStringValue)); m_startElementHandlers.insert("page", new StartElementHandler(this,&TagFileParser::startStringValue));
m_startElementHandlers.insert("docanchor", new StartElementHandler(this,&TagFileParser::startStringValue));
m_startElementHandlers.insert("tagfile", new StartElementHandler(this,&TagFileParser::startIgnoreElement)); m_startElementHandlers.insert("tagfile", new StartElementHandler(this,&TagFileParser::startIgnoreElement));
m_endElementHandlers.insert("compound", new EndElementHandler(this,&TagFileParser::endCompound)); m_endElementHandlers.insert("compound", new EndElementHandler(this,&TagFileParser::endCompound));
m_endElementHandlers.insert("member", new EndElementHandler(this,&TagFileParser::endMember)); m_endElementHandlers.insert("member", new EndElementHandler(this,&TagFileParser::endMember));
...@@ -478,6 +498,7 @@ class TagFileParser : public QXmlDefaultHandler ...@@ -478,6 +498,7 @@ class TagFileParser : public QXmlDefaultHandler
m_endElementHandlers.insert("namespace", new EndElementHandler(this,&TagFileParser::endNamespace)); m_endElementHandlers.insert("namespace", new EndElementHandler(this,&TagFileParser::endNamespace));
m_endElementHandlers.insert("file", new EndElementHandler(this,&TagFileParser::endFile)); m_endElementHandlers.insert("file", new EndElementHandler(this,&TagFileParser::endFile));
m_endElementHandlers.insert("page", new EndElementHandler(this,&TagFileParser::endPage)); m_endElementHandlers.insert("page", new EndElementHandler(this,&TagFileParser::endPage));
m_endElementHandlers.insert("docanchor", new EndElementHandler(this,&TagFileParser::endDocAnchor));
m_endElementHandlers.insert("tagfile", new EndElementHandler(this,&TagFileParser::endIgnoreElement)); m_endElementHandlers.insert("tagfile", new EndElementHandler(this,&TagFileParser::endIgnoreElement));
return TRUE; return TRUE;
} }
...@@ -520,6 +541,7 @@ class TagFileParser : public QXmlDefaultHandler ...@@ -520,6 +541,7 @@ class TagFileParser : public QXmlDefaultHandler
private: private:
void buildMemberList(Entry *ce,QList<TagMemberInfo> &members); void buildMemberList(Entry *ce,QList<TagMemberInfo> &members);
void addDocAnchors(Entry *e,QStrList &l);
QList<TagClassInfo> m_tagFileClasses; QList<TagClassInfo> m_tagFileClasses;
QList<TagFileInfo> m_tagFileFiles; QList<TagFileInfo> m_tagFileFiles;
QList<TagNamespaceInfo> m_tagFileNamespaces; QList<TagNamespaceInfo> m_tagFileNamespaces;
...@@ -712,6 +734,27 @@ void TagFileParser::dump() ...@@ -712,6 +734,27 @@ void TagFileParser::dump()
} }
} }
void TagFileParser::addDocAnchors(Entry *e,QStrList &l)
{
char *s=l.first();
while (s)
{
QCString *anchorName = new QCString(s);
if (Doxygen::sectionDict.find(*anchorName)==0)
{
SectionInfo *si=new SectionInfo(*anchorName,*anchorName,
SectionInfo::Anchor,m_tagName);
Doxygen::sectionDict.insert(*anchorName,si);
e->anchors->append(anchorName);
}
else
{
err("Duplicate anchor %s found\n",anchorName->data());
}
s=l.next();
}
}
void TagFileParser::buildMemberList(Entry *ce,QList<TagMemberInfo> &members) void TagFileParser::buildMemberList(Entry *ce,QList<TagMemberInfo> &members)
{ {
QListIterator<TagMemberInfo> mii(members); QListIterator<TagMemberInfo> mii(members);
...@@ -725,6 +768,7 @@ void TagFileParser::buildMemberList(Entry *ce,QList<TagMemberInfo> &members) ...@@ -725,6 +768,7 @@ void TagFileParser::buildMemberList(Entry *ce,QList<TagMemberInfo> &members)
me->virt = tmi->virt; me->virt = tmi->virt;
me->stat = tmi->isStatic; me->stat = tmi->isStatic;
me->fileName = ce->fileName; me->fileName = ce->fileName;
addDocAnchors(me,tmi->docAnchors);
TagInfo *ti = new TagInfo; TagInfo *ti = new TagInfo;
ti->tagName = m_tagName; ti->tagName = m_tagName;
ti->anchor = tmi->anchor; ti->anchor = tmi->anchor;
...@@ -809,6 +853,7 @@ void TagFileParser::buildLists(Entry *root) ...@@ -809,6 +853,7 @@ void TagFileParser::buildLists(Entry *root)
case TagClassInfo::Exception: ce->section = Entry::EXCEPTION_SEC; break; case TagClassInfo::Exception: ce->section = Entry::EXCEPTION_SEC; break;
} }
ce->name = tci->name; ce->name = tci->name;
addDocAnchors(ce,tci->docAnchors);
TagInfo *ti = new TagInfo; TagInfo *ti = new TagInfo;
ti->tagName = m_tagName; ti->tagName = m_tagName;
ti->fileName = tci->filename; ti->fileName = tci->filename;
...@@ -831,6 +876,7 @@ void TagFileParser::buildLists(Entry *root) ...@@ -831,6 +876,7 @@ void TagFileParser::buildLists(Entry *root)
Entry *fe = new Entry; Entry *fe = new Entry;
fe->section = guessSection(tfi->name); fe->section = guessSection(tfi->name);
fe->name = tfi->name; fe->name = tfi->name;
addDocAnchors(fe,tfi->docAnchors);
TagInfo *ti = new TagInfo; TagInfo *ti = new TagInfo;
ti->tagName = m_tagName; ti->tagName = m_tagName;
ti->fileName = tfi->filename; ti->fileName = tfi->filename;
...@@ -840,7 +886,7 @@ void TagFileParser::buildLists(Entry *root) ...@@ -840,7 +886,7 @@ void TagFileParser::buildLists(Entry *root)
fe->fileName = fullName; fe->fileName = fullName;
FileDef *fd = new FileDef(m_tagName+":"+tfi->path,tfi->name,m_tagName); FileDef *fd = new FileDef(m_tagName+":"+tfi->path,tfi->name,m_tagName);
FileName *mn; FileName *mn;
if ((mn=inputNameDict->find(tfi->name))) if ((mn=Doxygen::inputNameDict->find(tfi->name)))
{ {
mn->append(fd); mn->append(fd);
} }
...@@ -848,8 +894,8 @@ void TagFileParser::buildLists(Entry *root) ...@@ -848,8 +894,8 @@ void TagFileParser::buildLists(Entry *root)
{ {
mn = new FileName(fullName,tfi->name); mn = new FileName(fullName,tfi->name);
mn->append(fd); mn->append(fd);
inputNameList.inSort(mn); Doxygen::inputNameList.inSort(mn);
inputNameDict->insert(tfi->name,mn); Doxygen::inputNameDict->insert(tfi->name,mn);
} }
buildMemberList(fe,tfi->members); buildMemberList(fe,tfi->members);
root->addSubEntry(fe); root->addSubEntry(fe);
...@@ -863,6 +909,7 @@ void TagFileParser::buildLists(Entry *root) ...@@ -863,6 +909,7 @@ void TagFileParser::buildLists(Entry *root)
Entry *ne = new Entry; Entry *ne = new Entry;
ne->section = Entry::NAMESPACE_SEC; ne->section = Entry::NAMESPACE_SEC;
ne->name = tni->name; ne->name = tni->name;
addDocAnchors(ne,tni->docAnchors);
TagInfo *ti = new TagInfo; TagInfo *ti = new TagInfo;
ti->tagName = m_tagName; ti->tagName = m_tagName;
ti->fileName = tni->filename; ti->fileName = tni->filename;
...@@ -881,6 +928,7 @@ void TagFileParser::buildLists(Entry *root) ...@@ -881,6 +928,7 @@ void TagFileParser::buildLists(Entry *root)
ge->section = Entry::GROUPDOC_SEC; ge->section = Entry::GROUPDOC_SEC;
ge->name = tgi->name; ge->name = tgi->name;
ge->type = tgi->title; ge->type = tgi->title;
addDocAnchors(ge,tgi->docAnchors);
TagInfo *ti = new TagInfo; TagInfo *ti = new TagInfo;
ti->tagName = m_tagName; ti->tagName = m_tagName;
ti->fileName = tgi->filename; ti->fileName = tgi->filename;
...@@ -899,6 +947,7 @@ void TagFileParser::buildLists(Entry *root) ...@@ -899,6 +947,7 @@ void TagFileParser::buildLists(Entry *root)
pe->section = Entry::PAGEDOC_SEC; pe->section = Entry::PAGEDOC_SEC;
pe->name = tpi->name; pe->name = tpi->name;
pe->args = tpi->title; pe->args = tpi->title;
addDocAnchors(pe,tpi->docAnchors);
TagInfo *ti = new TagInfo; TagInfo *ti = new TagInfo;
ti->tagName = m_tagName; ti->tagName = m_tagName;
ti->fileName = tpi->filename; ti->fileName = tpi->filename;
......
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
#include "example.h" #include "example.h"
#include "version.h" #include "version.h"
#include "groupdef.h" #include "groupdef.h"
#include "xml.h" //#include "xml.h"
#include "page.h" #include "page.h"
#ifndef _WIN32 #ifndef _WIN32
...@@ -60,53 +60,28 @@ extern char **environ; ...@@ -60,53 +60,28 @@ extern char **environ;
// TextGeneratorOLImpl implementation // TextGeneratorOLImpl implementation
//------------------------------------------------------------------------ //------------------------------------------------------------------------
TextGeneratorOLImpl::TextGeneratorOLImpl(OutputList &ol) : m_ol(ol) {} TextGeneratorOLImpl::TextGeneratorOLImpl(OutputDocInterface &od) : m_od(od)
{
}
void TextGeneratorOLImpl::writeString(const char *s) const void TextGeneratorOLImpl::writeString(const char *s) const
{ {
m_ol.docify(s); m_od.docify(s);
} }
void TextGeneratorOLImpl::writeBreak() const void TextGeneratorOLImpl::writeBreak() const
{ {
m_ol.pushGeneratorState(); m_od.pushGeneratorState();
m_ol.disableAllBut(OutputGenerator::Html); m_od.disableAllBut(OutputGenerator::Html);
m_ol.lineBreak(); m_od.lineBreak();
m_ol.popGeneratorState(); m_od.popGeneratorState();
} }
void TextGeneratorOLImpl::writeLink(const char *extRef,const char *file, void TextGeneratorOLImpl::writeLink(const char *extRef,const char *file,
const char *anchor,const char *text const char *anchor,const char *text
) const ) const
{ {
m_ol.writeObjectLink(extRef,file,anchor,text); m_od.writeObjectLink(extRef,file,anchor,text);
}
//------------------------------------------------------------------------
// TextGeneratorXMLImpl implementation
//------------------------------------------------------------------------
TextGeneratorXMLImpl::TextGeneratorXMLImpl(QTextStream &t) : m_t(t)
{
}
void TextGeneratorXMLImpl::writeString(const char *s) const
{
writeXMLString(m_t,s);
}
void TextGeneratorXMLImpl::writeBreak() const
{
}
void TextGeneratorXMLImpl::writeLink(const char *extRef,const char *file,
const char *anchor,const char *text
) const
{
if (extRef==0)
{ writeXMLLink(m_t,file,anchor,text); }
else // external references are not supported for XML
{ writeXMLString(m_t,text); }
} }
//------------------------------------------------------------------------ //------------------------------------------------------------------------
...@@ -284,7 +259,7 @@ QCString stripAnnonymousNamespaceScope(const QCString &s) ...@@ -284,7 +259,7 @@ QCString stripAnnonymousNamespaceScope(const QCString &s)
int oi=0,i=0,p=0; int oi=0,i=0,p=0;
if (s.isEmpty()) return s; if (s.isEmpty()) return s;
while (s.at(p)=='@' && (i=s.find("::",p))!=-1 && while (s.at(p)=='@' && (i=s.find("::",p))!=-1 &&
namespaceDict[s.left(i)]!=0) { oi=i; p=i+2; } Doxygen::namespaceDict[s.left(i)]!=0) { oi=i; p=i+2; }
if (oi==0) if (oi==0)
{ {
//printf("stripAnnonymousNamespaceScope(`%s')=`%s'\n",s.data(),s.data()); //printf("stripAnnonymousNamespaceScope(`%s')=`%s'\n",s.data(),s.data());
...@@ -297,19 +272,19 @@ QCString stripAnnonymousNamespaceScope(const QCString &s) ...@@ -297,19 +272,19 @@ QCString stripAnnonymousNamespaceScope(const QCString &s)
} }
} }
void writePageRef(OutputList &ol,const char *cn,const char *mn) void writePageRef(OutputDocInterface &od,const char *cn,const char *mn)
{ {
ol.pushGeneratorState(); od.pushGeneratorState();
ol.disable(OutputGenerator::Html); od.disable(OutputGenerator::Html);
ol.disable(OutputGenerator::Man); od.disable(OutputGenerator::Man);
if (Config::pdfHyperFlag) ol.disable(OutputGenerator::Latex); if (Config::pdfHyperFlag) od.disable(OutputGenerator::Latex);
if (Config::rtfHyperFlag) ol.disable(OutputGenerator::RTF); if (Config::rtfHyperFlag) od.disable(OutputGenerator::RTF);
ol.startPageRef(); od.startPageRef();
ol.docify(theTranslator->trPageAbbreviation()); od.docify(theTranslator->trPageAbbreviation());
ol.endPageRef(cn,mn); od.endPageRef(cn,mn);
ol.popGeneratorState(); od.popGeneratorState();
} }
/*! Generate a place holder for a position in a list. Used for /*! Generate a place holder for a position in a list. Used for
...@@ -374,18 +349,18 @@ int guessSection(const char *name) ...@@ -374,18 +349,18 @@ int guessSection(const char *name)
ClassDef *getClass(const char *name) ClassDef *getClass(const char *name)
{ {
if (name==0 || name[0]=='\0') return 0; if (name==0 || name[0]=='\0') return 0;
return classDict[name]; return Doxygen::classDict[name];
} }
NamespaceDef *getResolvedNamespace(const char *name) NamespaceDef *getResolvedNamespace(const char *name)
{ {
if (name==0 || name[0]=='\0') return 0; if (name==0 || name[0]=='\0') return 0;
QCString *subst = namespaceAliasDict[name]; QCString *subst = Doxygen::namespaceAliasDict[name];
if (subst) if (subst)
{ {
int count=0; // recursion detection guard int count=0; // recursion detection guard
QCString *newSubst; QCString *newSubst;
while ((newSubst=namespaceAliasDict[*subst]) && count<10) while ((newSubst=Doxygen::namespaceAliasDict[*subst]) && count<10)
{ {
subst=newSubst; subst=newSubst;
count++; count++;
...@@ -394,46 +369,46 @@ NamespaceDef *getResolvedNamespace(const char *name) ...@@ -394,46 +369,46 @@ NamespaceDef *getResolvedNamespace(const char *name)
{ {
warn_cont("Warning: possible recursive namespace alias detected for %s!\n",name); warn_cont("Warning: possible recursive namespace alias detected for %s!\n",name);
} }
return namespaceDict[subst->data()]; return Doxygen::namespaceDict[subst->data()];
} }
else else
{ {
return namespaceDict[name]; return Doxygen::namespaceDict[name];
} }
} }
ClassDef *getResolvedClass(const char *name) ClassDef *getResolvedClass(const char *name)
{ {
if (name==0 || name[0]=='\0') return 0; if (name==0 || name[0]=='\0') return 0;
QCString *subst = typedefDict[name]; QCString *subst = Doxygen::typedefDict[name];
if (subst) // there is a typedef with this name if (subst) // there is a typedef with this name
{ {
//printf("getResolvedClass `%s'->`%s'\n",name,subst->data()); //printf("getResolvedClass `%s'->`%s'\n",name,subst->data());
if (*subst==name) // avoid resolving typedef struct foo foo; if (*subst==name) // avoid resolving typedef struct foo foo;
{ {
return classDict[name]; return Doxygen::classDict[name];
} }
int count=0; // recursion detection guard int count=0; // recursion detection guard
QCString *newSubst; QCString *newSubst;
while ((newSubst=typedefDict[*subst]) && count<10) while ((newSubst=Doxygen::typedefDict[*subst]) && count<10)
{ {
if (*subst==*newSubst) return classDict[subst->data()]; // for breaking typedef struct A A; if (*subst==*newSubst) return Doxygen::classDict[subst->data()]; // for breaking typedef struct A A;
subst=newSubst; subst=newSubst;
count++; count++;
} }
if (count==10) if (count==10)
{ {
warn_cont("Warning: possible recursive typedef dependency detected for %s!\n",name); warn_cont("Warning: possible recursive typedef dependency detected for %s!\n",name);
return classDict[name]; return Doxygen::classDict[name];
} }
else else
{ {
//printf("getClass: subst %s->%s\n",name,subst->data()); //printf("getClass: subst %s->%s\n",name,subst->data());
int i; int i;
ClassDef *cd = classDict[subst->data()]; ClassDef *cd = Doxygen::classDict[subst->data()];
if (cd==0 && (i=subst->find('<'))>0) // try unspecialized version as well if (cd==0 && (i=subst->find('<'))>0) // try unspecialized version as well
{ {
return classDict[subst->left(i)]; return Doxygen::classDict[subst->left(i)];
} }
else else
{ {
...@@ -443,7 +418,7 @@ ClassDef *getResolvedClass(const char *name) ...@@ -443,7 +418,7 @@ ClassDef *getResolvedClass(const char *name)
} }
else else
{ {
return classDict[name]; return Doxygen::classDict[name];
} }
} }
...@@ -484,6 +459,10 @@ QCString removeRedundantWhiteSpace(const QCString &s) ...@@ -484,6 +459,10 @@ QCString removeRedundantWhiteSpace(const QCString &s)
{ {
result+=" >"; // insert extra space for layouting (nested) templates result+=" >"; // insert extra space for layouting (nested) templates
} }
else if (i>0 && i<l-1 && c==',' && isId(s.at(i-1)) && isId(s.at(i+1)))
{
result+=", ";
}
else if (i>0 && isId(s.at(i)) && s.at(i-1)==')') else if (i>0 && isId(s.at(i)) && s.at(i-1)==')')
{ {
result+=' '; result+=' ';
...@@ -491,7 +470,7 @@ QCString removeRedundantWhiteSpace(const QCString &s) ...@@ -491,7 +470,7 @@ QCString removeRedundantWhiteSpace(const QCString &s)
} }
else if (c!=' ' || else if (c!=' ' ||
( i!=0 && i!=l-1 && ( i!=0 && i!=l-1 &&
(isId(s.at(i-1)) || s.at(i-1)==')' || s.at(i-1)==',') && (isId(s.at(i-1)) || s.at(i-1)==')' || s.at(i-1)==',' || s.at(i-1)=='>' || s.at(i-1)==']') &&
isId(s.at(i+1)) isId(s.at(i+1))
) )
) )
...@@ -730,7 +709,7 @@ QCString argListToString(ArgumentList *al) ...@@ -730,7 +709,7 @@ QCString argListToString(ArgumentList *al)
result+="="+a->defval; result+="="+a->defval;
} }
a = al->next(); a = al->next();
if (a) result+=","; if (a) result+=", ";
} }
result+=")"; result+=")";
if (al->constSpecifier) result+=" const"; if (al->constSpecifier) result+=" const";
...@@ -766,197 +745,6 @@ QCString tempArgListToString(ArgumentList *al) ...@@ -766,197 +745,6 @@ QCString tempArgListToString(ArgumentList *al)
return result; return result;
} }
static bool manIsEnabled;
void startTitle(OutputList &ol,const char *fileName)
{
ol.startTitleHead(fileName);
manIsEnabled=ol.isEnabled(OutputGenerator::Man);
if (manIsEnabled) ol.disable(OutputGenerator::Man);
}
void endTitle(OutputList &ol,const char *fileName,const char *name)
{
if (manIsEnabled) ol.enable(OutputGenerator::Man);
ol.endTitleHead(fileName,name);
}
void writeQuickLinks(OutputList &ol,bool compact,bool ext)
{
ol.pushGeneratorState();
//bool manEnabled = ol.isEnabled(OutputGenerator::Man);
//bool texEnabled = ol.isEnabled(OutputGenerator::Latex);
ol.disableAllBut(OutputGenerator::Html);
QCString extLink;
if (ext) { extLink="_doc"; }
//if (manEnabled) ol.disable(OutputGenerator::Man);
//if (texEnabled) ol.disable(OutputGenerator::Latex);
if (compact) ol.startCenter(); else ol.startItemList();
if (!compact) ol.writeListItem();
if (Config::ftvHelpFlag)
{
ol.startQuickIndexItem(extLink,"main.html");
}
else
{
ol.startQuickIndexItem(extLink,"index.html");
}
parseText(ol,theTranslator->trMainPage());
ol.endQuickIndexItem();
if (documentedPackages>0)
{
if (!compact) ol.writeListItem();
ol.startQuickIndexItem(extLink,"packages.html");
parseText(ol,theTranslator->trPackages());
ol.endQuickIndexItem();
}
if (documentedGroups>0)
{
if (!compact) ol.writeListItem();
ol.startQuickIndexItem(extLink,"modules.html");
parseText(ol,theTranslator->trModules());
ol.endQuickIndexItem();
}
if (documentedNamespaces>0)
{
if (!compact) ol.writeListItem();
ol.startQuickIndexItem(extLink,"namespaces.html");
parseText(ol,theTranslator->trNamespaceList());
ol.endQuickIndexItem();
}
if (hierarchyClasses>0)
{
if (!compact) ol.writeListItem();
ol.startQuickIndexItem(extLink,"hierarchy.html");
parseText(ol,theTranslator->trClassHierarchy());
ol.endQuickIndexItem();
}
if (annotatedClasses>0)
{
if (Config::alphaIndexFlag)
{
if (!compact) ol.writeListItem();
ol.startQuickIndexItem(extLink,"classes.html");
parseText(ol,theTranslator->trAlphabeticalList());
ol.endQuickIndexItem();
}
if (!compact) ol.writeListItem();
ol.startQuickIndexItem(extLink,"annotated.html");
parseText(ol,theTranslator->trCompoundList());
ol.endQuickIndexItem();
}
if (documentedHtmlFiles>0)
{
if (!compact) ol.writeListItem();
ol.startQuickIndexItem(extLink,"files.html");
parseText(ol,theTranslator->trFileList());
ol.endQuickIndexItem();
}
//if (documentedIncludeFiles>0 && Config::verbatimHeaderFlag)
//{
// if (!compact) ol.writeListItem();
// ol.startQuickIndexItem(extLink,"headers.html");
// parseText(ol,theTranslator->trHeaderFiles());
// ol.endQuickIndexItem();
//}
//if (Config::sourceBrowseFlag)
//{
// if (!compact) ol.writeListItem();
// ol.startQuickIndexItem(extLink,"sources.html");
// parseText(ol,theTranslator->trSources());
// ol.endQuickIndexItem();
//}
if (documentedNamespaceMembers>0)
{
if (!compact) ol.writeListItem();
ol.startQuickIndexItem(extLink,"namespacemembers.html");
parseText(ol,theTranslator->trNamespaceMembers());
ol.endQuickIndexItem();
}
if (documentedMembers>0)
{
if (!compact) ol.writeListItem();
ol.startQuickIndexItem(extLink,"functions.html");
parseText(ol,theTranslator->trCompoundMembers());
ol.endQuickIndexItem();
}
if (documentedFunctions>0)
{
if (!compact) ol.writeListItem();
ol.startQuickIndexItem(extLink,"globals.html");
parseText(ol,theTranslator->trFileMembers());
ol.endQuickIndexItem();
}
if (documentedPages>0)
{
if (!compact) ol.writeListItem();
ol.startQuickIndexItem(extLink,"pages.html");
parseText(ol,theTranslator->trRelatedPages());
ol.endQuickIndexItem();
}
if (exampleSDict->count()>0)
{
if (!compact) ol.writeListItem();
ol.startQuickIndexItem(extLink,"examples.html");
parseText(ol,theTranslator->trExamples());
ol.endQuickIndexItem();
}
if (Config::searchEngineFlag)
{
if (!compact) ol.writeListItem();
ol.startQuickIndexItem("_cgi","");
parseText(ol,theTranslator->trSearch());
ol.endQuickIndexItem();
}
if (compact)
{
ol.endCenter();
ol.writeRuler();
}
else
{
ol.endItemList();
}
//if (manEnabled) ol.enable(OutputGenerator::Man);
//if (texEnabled) ol.enable(OutputGenerator::Latex);
ol.popGeneratorState();
}
void startFile(OutputList &ol,const char *name,const char *title,bool external)
{
ol.startFile(name,title,external);
if (!Config::noIndexFlag) writeQuickLinks(ol,TRUE,external);
}
void endFile(OutputList &ol,bool external)
{
//bool latexEnabled = ol.isEnabled(OutputGenerator::Latex);
//bool manEnabled = ol.isEnabled(OutputGenerator::Man);
//if (latexEnabled) ol.disable(OutputGenerator::Latex);
//if (manEnabled) ol.disable(OutputGenerator::Man);
ol.pushGeneratorState();
ol.disableAllBut(OutputGenerator::Html);
ol.writeFooter(0,external); // write the footer
if (Config::footerFile.isEmpty())
{
parseText(ol,theTranslator->trGeneratedAt(
dateToString(TRUE),
Config::projectName
));
}
ol.writeFooter(1,external); // write the link to the picture
if (Config::footerFile.isEmpty())
{
parseText(ol,theTranslator->trWrittenBy());
}
ol.writeFooter(2,external); // end the footer
//if (latexEnabled) ol.enable(OutputGenerator::Latex);
//if (manEnabled) ol.enable(OutputGenerator::Man);
ol.popGeneratorState();
ol.endFile();
}
// compute the HTML anchors for a list of members // compute the HTML anchors for a list of members
void setAnchors(char id,MemberList *ml,int groupId) void setAnchors(char id,MemberList *ml,int groupId)
...@@ -1236,7 +1024,7 @@ static void trimNamespaceScope(QCString &t1,QCString &t2) ...@@ -1236,7 +1024,7 @@ static void trimNamespaceScope(QCString &t1,QCString &t2)
if (i1!=-1 && i2==-1) // only t1 has a scope if (i1!=-1 && i2==-1) // only t1 has a scope
{ {
QCString scope=t1.left(i1); QCString scope=t1.left(i1);
if (!scope.isEmpty() && namespaceDict[scope]!=0) // scope is a namespace if (!scope.isEmpty() && Doxygen::namespaceDict[scope]!=0) // scope is a namespace
{ {
t1 = t1.right(t1.length()-i1-2); t1 = t1.right(t1.length()-i1-2);
return; return;
...@@ -1245,7 +1033,7 @@ static void trimNamespaceScope(QCString &t1,QCString &t2) ...@@ -1245,7 +1033,7 @@ static void trimNamespaceScope(QCString &t1,QCString &t2)
else if (i1==-1 && i2!=-1) // only t2 has a scope else if (i1==-1 && i2!=-1) // only t2 has a scope
{ {
QCString scope=t2.left(i2); QCString scope=t2.left(i2);
if (!scope.isEmpty() && namespaceDict[scope]!=0) // scope is a namespace if (!scope.isEmpty() && Doxygen::namespaceDict[scope]!=0) // scope is a namespace
{ {
t2 = t2.right(t2.length()-i2-2); t2 = t2.right(t2.length()-i2-2);
return; return;
...@@ -1904,7 +1692,7 @@ bool getDefs(const QCString &scName,const QCString &memberName, ...@@ -1904,7 +1692,7 @@ bool getDefs(const QCString &scName,const QCString &memberName,
//printf("mScope=`%s' mName=`%s'\n",mScope.data(),mName.data()); //printf("mScope=`%s' mName=`%s'\n",mScope.data(),mName.data());
MemberName *mn = memberNameDict[mName]; MemberName *mn = Doxygen::memberNameDict[mName];
if (!forceEmptyScope && mn && !(scopeName.isEmpty() && mScope.isEmpty())) if (!forceEmptyScope && mn && !(scopeName.isEmpty() && mScope.isEmpty()))
{ {
//printf(" >member name found\n"); //printf(" >member name found\n");
...@@ -2014,7 +1802,7 @@ bool getDefs(const QCString &scName,const QCString &memberName, ...@@ -2014,7 +1802,7 @@ bool getDefs(const QCString &scName,const QCString &memberName,
// maybe an namespace, file or group member ? // maybe an namespace, file or group member ?
//printf("Testing for global function scopeName=`%s' mScope=`%s' :: mName=`%s'\n", //printf("Testing for global function scopeName=`%s' mScope=`%s' :: mName=`%s'\n",
// scopeName.data(),mScope.data(),mName.data()); // scopeName.data(),mScope.data(),mName.data());
if ((mn=functionNameDict[mName])) // name is known if ((mn=Doxygen::functionNameDict[mName])) // name is known
{ {
//printf(" >function name found\n"); //printf(" >function name found\n");
NamespaceDef *fnd=0; NamespaceDef *fnd=0;
...@@ -2031,7 +1819,7 @@ bool getDefs(const QCString &scName,const QCString &memberName, ...@@ -2031,7 +1819,7 @@ bool getDefs(const QCString &scName,const QCString &memberName,
namespaceName=mScope.copy(); namespaceName=mScope.copy();
} }
if (!namespaceName.isEmpty() && if (!namespaceName.isEmpty() &&
(fnd=namespaceDict[namespaceName]) && (fnd=Doxygen::namespaceDict[namespaceName]) &&
fnd->isLinkable() fnd->isLinkable()
) )
{ {
...@@ -2219,7 +2007,7 @@ bool getScopeDefs(const char *docScope,const char *scope, ...@@ -2219,7 +2007,7 @@ bool getScopeDefs(const char *docScope,const char *scope,
{ {
return TRUE; // class link written => quit return TRUE; // class link written => quit
} }
else if ((nd=namespaceDict[fullName]) && nd->isLinkable()) else if ((nd=Doxygen::namespaceDict[fullName]) && nd->isLinkable())
{ {
return TRUE; // namespace link written => quit return TRUE; // namespace link written => quit
} }
...@@ -2255,7 +2043,7 @@ bool getScopeDefs(const char *docScope,const char *scope, ...@@ -2255,7 +2043,7 @@ bool getScopeDefs(const char *docScope,const char *scope,
* instead of :: the # symbol may also be used. * instead of :: the # symbol may also be used.
*/ */
bool generateRef(OutputList &ol,const char *scName, bool generateRef(OutputDocInterface &od,const char *scName,
const char *name,bool inSeeBlock,const char *rt) const char *name,bool inSeeBlock,const char *rt)
{ {
//printf("generateRef(scName=%s,name=%s,rt=%s)\n",scName,name,rt); //printf("generateRef(scName=%s,name=%s,rt=%s)\n",scName,name,rt);
...@@ -2276,20 +2064,20 @@ bool generateRef(OutputList &ol,const char *scName, ...@@ -2276,20 +2064,20 @@ bool generateRef(OutputList &ol,const char *scName,
{ {
if (cd) // scope matches that of a class if (cd) // scope matches that of a class
{ {
ol.writeObjectLink(cd->getReference(), od.writeObjectLink(cd->getReference(),
cd->getOutputFileBase(),0,linkText); cd->getOutputFileBase(),0,linkText);
if (!cd->isReference() /*&& !Config::pdfHyperFlag*/) if (!cd->isReference() /*&& !Config::pdfHyperFlag*/)
{ {
writePageRef(ol,cd->getOutputFileBase(),0); writePageRef(od,cd->getOutputFileBase(),0);
} }
} }
else // scope matches that of a namespace else // scope matches that of a namespace
{ {
ol.writeObjectLink(nd->getReference(), od.writeObjectLink(nd->getReference(),
nd->getOutputFileBase(),0,linkText); nd->getOutputFileBase(),0,linkText);
if (!nd->getReference() /*&& !Config::pdfHyperFlag*/) if (!nd->getReference() /*&& !Config::pdfHyperFlag*/)
{ {
writePageRef(ol,nd->getOutputFileBase(),0); writePageRef(od,nd->getOutputFileBase(),0);
} }
} }
// link has been written, stop now. // link has been written, stop now.
...@@ -2297,7 +2085,7 @@ bool generateRef(OutputList &ol,const char *scName, ...@@ -2297,7 +2085,7 @@ bool generateRef(OutputList &ol,const char *scName,
} }
else if (scName==tmpName || (!inSeeBlock && scopePos==-1)) // nothing to link => output plain text else if (scName==tmpName || (!inSeeBlock && scopePos==-1)) // nothing to link => output plain text
{ {
ol.docify(linkText); od.docify(linkText);
// text has been written, stop now. // text has been written, stop now.
return FALSE; return FALSE;
} }
...@@ -2358,7 +2146,7 @@ bool generateRef(OutputList &ol,const char *scName, ...@@ -2358,7 +2146,7 @@ bool generateRef(OutputList &ol,const char *scName,
{ {
//printf("addObjectLink(%s,%s,%s,%s)\n",cd->getReference(), //printf("addObjectLink(%s,%s,%s,%s)\n",cd->getReference(),
// cd->getOutputFileBase(),anchor.data(),resultName.stripWhiteSpace().data()); // cd->getOutputFileBase(),anchor.data(),resultName.stripWhiteSpace().data());
ol.writeObjectLink(cd->getReference(),cd->getOutputFileBase(), od.writeObjectLink(cd->getReference(),cd->getOutputFileBase(),
anchor,linkText.stripWhiteSpace()); anchor,linkText.stripWhiteSpace());
cName=cd->getOutputFileBase(); cName=cd->getOutputFileBase();
aName=md->anchor(); aName=md->anchor();
...@@ -2366,7 +2154,7 @@ bool generateRef(OutputList &ol,const char *scName, ...@@ -2366,7 +2154,7 @@ bool generateRef(OutputList &ol,const char *scName,
else if (nd) // nameStr is a member of nd else if (nd) // nameStr is a member of nd
{ {
//printf("writing namespace link\n"); //printf("writing namespace link\n");
ol.writeObjectLink(nd->getReference(),nd->getOutputFileBase(), od.writeObjectLink(nd->getReference(),nd->getOutputFileBase(),
anchor,linkText.stripWhiteSpace()); anchor,linkText.stripWhiteSpace());
cName=nd->getOutputFileBase(); cName=nd->getOutputFileBase();
aName=md->anchor(); aName=md->anchor();
...@@ -2375,7 +2163,7 @@ bool generateRef(OutputList &ol,const char *scName, ...@@ -2375,7 +2163,7 @@ bool generateRef(OutputList &ol,const char *scName,
{ {
//printf("addFileLink(%s,%s,%s)\n",fd->getOutputFileBase(),anchor.data(), //printf("addFileLink(%s,%s,%s)\n",fd->getOutputFileBase(),anchor.data(),
// resultName.stripWhiteSpace().data()); // resultName.stripWhiteSpace().data());
ol.writeObjectLink(fd->getReference(),fd->getOutputFileBase(), od.writeObjectLink(fd->getReference(),fd->getOutputFileBase(),
anchor,linkText.stripWhiteSpace()); anchor,linkText.stripWhiteSpace());
cName=fd->getOutputFileBase(); cName=fd->getOutputFileBase();
aName=md->anchor(); aName=md->anchor();
...@@ -2384,7 +2172,7 @@ bool generateRef(OutputList &ol,const char *scName, ...@@ -2384,7 +2172,7 @@ bool generateRef(OutputList &ol,const char *scName,
{ {
//printf("addGroupLink(%s,%s,%s)\n",fd->getOutputFileBase().data(),anchor.data(), //printf("addGroupLink(%s,%s,%s)\n",fd->getOutputFileBase().data(),anchor.data(),
// gd->name().data()); // gd->name().data());
ol.writeObjectLink(gd->getReference(),gd->getOutputFileBase(), od.writeObjectLink(gd->getReference(),gd->getOutputFileBase(),
anchor,linkText.stripWhiteSpace()); anchor,linkText.stripWhiteSpace());
cName=gd->getOutputFileBase(); cName=gd->getOutputFileBase();
aName=md->anchor(); aName=md->anchor();
...@@ -2392,46 +2180,48 @@ bool generateRef(OutputList &ol,const char *scName, ...@@ -2392,46 +2180,48 @@ bool generateRef(OutputList &ol,const char *scName,
else // should not be reached else // should not be reached
{ {
//printf("add no link fd=cd=0\n"); //printf("add no link fd=cd=0\n");
ol.docify(linkText); od.docify(linkText);
} }
// for functions we add the arguments if explicitly specified or else "()" // for functions we add the arguments if explicitly specified or else "()"
if (!rt && (md->isFunction() || md->isPrototype() || md->isSignal() || md->isSlot() || md->isDefine())) if (!rt && (md->isFunction() || md->isPrototype() || md->isSignal() || md->isSlot() || md->isDefine()))
{ {
if (argsStr.isEmpty() && (!md->isDefine() || md->argsString()!=0)) if (argsStr.isEmpty() && (!md->isDefine() || md->argsString()!=0))
// ol.writeString("()") // od.writeString("()")
; ;
else else
ol.docify(argsStr); od.docify(argsStr);
} }
// generate the page reference (for LaTeX) // generate the page reference (for LaTeX)
if (!cName.isEmpty() || !aName.isEmpty()) if ((!cName.isEmpty() || !aName.isEmpty()) && md->isLinkableInProject())
{ {
writePageRef(ol,cName,aName); writePageRef(od,cName,aName);
} }
return TRUE; return TRUE;
} }
else if (inSeeBlock && !nameStr.isEmpty() && (gd=groupDict[nameStr])) else if (inSeeBlock && !nameStr.isEmpty() && (gd=Doxygen::groupDict[nameStr]))
{ // group link { // group link
ol.startTextLink(gd->getOutputFileBase(),0); od.startTextLink(gd->getOutputFileBase(),0);
if (rt) // explict link text if (rt) // explict link text
ol.docify(rt); {
od.docify(rt);
}
else // use group title as the default link text else // use group title as the default link text
{ {
ol.docify(gd->groupTitle()); od.docify(gd->groupTitle());
} }
ol.endTextLink(); od.endTextLink();
return TRUE; return TRUE;
} }
// nothing found // nothing found
if (rt) if (rt)
ol.docify(rt); od.docify(rt);
else else
{ {
ol.docify(linkText); od.docify(linkText);
if (!argsStr.isEmpty()) ol.docify(argsStr); if (!argsStr.isEmpty()) od.docify(argsStr);
} }
return FALSE; return FALSE;
} }
...@@ -2443,7 +2233,7 @@ bool generateRef(OutputList &ol,const char *scName, ...@@ -2443,7 +2233,7 @@ bool generateRef(OutputList &ol,const char *scName,
// basis for the link's text. // basis for the link's text.
// returns TRUE if a link could be generated. // returns TRUE if a link could be generated.
bool generateLink(OutputList &ol,const char *clName, bool generateLink(OutputDocInterface &od,const char *clName,
const char *lr,bool inSeeBlock,const char *lt) const char *lr,bool inSeeBlock,const char *lt)
{ {
//printf("generateLink clName=`%s' lr=`%s' lt=`%s'\n",clName,lr,lt); //printf("generateLink clName=`%s' lr=`%s' lt=`%s'\n",clName,lr,lt);
...@@ -2454,69 +2244,84 @@ bool generateLink(OutputList &ol,const char *clName, ...@@ -2454,69 +2244,84 @@ bool generateLink(OutputList &ol,const char *clName,
bool ambig; bool ambig;
if (linkRef.isEmpty()) // no reference name! if (linkRef.isEmpty()) // no reference name!
{ {
ol.docify(lt); od.docify(lt);
return FALSE; return FALSE;
} }
else if ((pi=pageSDict->find(linkRef))) // link to a page else if ((pi=Doxygen::pageSDict->find(linkRef))) // link to a page
{ {
GroupDef *gd = pi->inGroup; GroupDef *gd = pi->inGroup;
if (gd) if (gd)
{ {
SectionInfo *si=0; SectionInfo *si=0;
if (!pi->name.isEmpty()) si=sectionDict[pi->name]; if (!pi->name.isEmpty()) si=Doxygen::sectionDict[pi->name];
ol.writeObjectLink(gd->getReference(),gd->getOutputFileBase(),si ? si->label.data() : 0,lt); od.writeObjectLink(gd->getReference(),gd->getOutputFileBase(),si ? si->label.data() : 0,lt);
writePageRef(ol,gd->getOutputFileBase(),si ? si->label.data() : 0); if (gd->isLinkableInProject())
{
writePageRef(od,gd->getOutputFileBase(),si ? si->label.data() : 0);
}
} }
else else
{ {
ol.writeObjectLink(pi->getReference(),pi->getOutputFileBase(),0,lt); od.writeObjectLink(pi->getReference(),pi->getOutputFileBase(),0,lt);
writePageRef(ol,pi->name,0); if (!pi->isReference())
{
writePageRef(od,pi->name,0);
}
} }
return TRUE; return TRUE;
} }
else if ((pi=exampleSDict->find(linkRef))) // link to an example else if ((pi=Doxygen::exampleSDict->find(linkRef))) // link to an example
{ {
ol.writeObjectLink(0,convertFileName(pi->name)+"-example",0,lt); od.writeObjectLink(0,convertFileName(pi->name)+"-example",0,lt);
writePageRef(ol,convertFileName(pi->name)+"-example",0); if (!pi->isReference())
{
writePageRef(od,convertFileName(pi->name)+"-example",0);
}
return TRUE; return TRUE;
} }
else if ((gd=groupDict[linkRef])) // link to a group else if ((gd=Doxygen::groupDict[linkRef])) // link to a group
{ {
ol.startTextLink(gd->getOutputFileBase(),0); od.startTextLink(gd->getOutputFileBase(),0);
if (lt) if (lt)
ol.docify(lt); od.docify(lt);
else else
ol.docify(gd->groupTitle()); od.docify(gd->groupTitle());
ol.endTextLink(); od.endTextLink();
writePageRef(ol,gd->getOutputFileBase(),0); if (gd->isLinkableInProject())
{
writePageRef(od,gd->getOutputFileBase(),0);
}
return TRUE; return TRUE;
} }
else if ((fd=findFileDef(inputNameDict,linkRef,ambig)) else if ((fd=findFileDef(Doxygen::inputNameDict,linkRef,ambig))
&& fd->isLinkable()) && fd->isLinkable())
{ {
// link to documented input file // link to documented input file
ol.writeObjectLink(fd->getReference(),fd->getOutputFileBase(),0,lt); od.writeObjectLink(fd->getReference(),fd->getOutputFileBase(),0,lt);
writePageRef(ol,fd->getOutputFileBase(),0); if (fd->isLinkableInProject())
{
writePageRef(od,fd->getOutputFileBase(),0);
}
return TRUE; return TRUE;
} }
else // probably a class or member reference else // probably a class or member reference
{ {
return generateRef(ol,clName,lr,inSeeBlock,lt); return generateRef(od,clName,lr,inSeeBlock,lt);
} }
} }
void generateFileRef(OutputList &ol,const char *name,const char *text) void generateFileRef(OutputDocInterface &od,const char *name,const char *text)
{ {
QCString linkText = text ? text : name; QCString linkText = text ? text : name;
//FileInfo *fi; //FileInfo *fi;
FileDef *fd; FileDef *fd;
bool ambig; bool ambig;
if ((fd=findFileDef(inputNameDict,name,ambig)) && if ((fd=findFileDef(Doxygen::inputNameDict,name,ambig)) &&
fd->isLinkable()) fd->isLinkable())
// link to documented input file // link to documented input file
ol.writeObjectLink(fd->getReference(),fd->getOutputFileBase(),0,linkText); od.writeObjectLink(fd->getReference(),fd->getOutputFileBase(),0,linkText);
else else
ol.docify(linkText); od.docify(linkText);
} }
//---------------------------------------------------------------------- //----------------------------------------------------------------------
...@@ -2668,20 +2473,6 @@ QCString showFileDefMatches(const FileNameDict *fnDict,const char *n) ...@@ -2668,20 +2473,6 @@ QCString showFileDefMatches(const FileNameDict *fnDict,const char *n)
//---------------------------------------------------------------------- //----------------------------------------------------------------------
void setFileNameForSections(QList<QCString> *anchorList,const char *fileName)
{
if (!anchorList) return;
QCString *s=anchorList->first();
while (s)
{
SectionInfo *si=0;
if (!s->isEmpty() && (si=sectionDict[*s])) si->fileName=fileName;
s=anchorList->next();
}
}
//----------------------------------------------------------------------
QCString substituteKeywords(const QCString &s,const char *title) QCString substituteKeywords(const QCString &s,const char *title)
{ {
QCString result = s.copy(); QCString result = s.copy();
...@@ -2902,3 +2693,13 @@ QCString convertToHtml(const char *s) ...@@ -2902,3 +2693,13 @@ QCString convertToHtml(const char *s)
return convertToXML(s); return convertToXML(s);
} }
/*! Returns the standard string that is generated when the \\overload
* command is used.
*/
const char *getOverloadDocs()
{
return "This is an overloaded member function, "
"provided for convenience. It differs from the above "
"function only in what argument(s) it accepts.";
}
...@@ -31,13 +31,13 @@ class NamespaceDef; ...@@ -31,13 +31,13 @@ class NamespaceDef;
class FileNameDict; class FileNameDict;
class ArgumentList; class ArgumentList;
class OutputList; class OutputList;
class OutputDocInterface;
class MemberDef; class MemberDef;
class ExampleList; class ExampleList;
class ClassList; class ClassList;
class BaseClassList; class BaseClassList;
class GroupDef; class GroupDef;
class NamespaceList; class NamespaceList;
class OutputList;
//-------------------------------------------------------------------- //--------------------------------------------------------------------
...@@ -54,27 +54,14 @@ class TextGeneratorIntf ...@@ -54,27 +54,14 @@ class TextGeneratorIntf
class TextGeneratorOLImpl : public TextGeneratorIntf class TextGeneratorOLImpl : public TextGeneratorIntf
{ {
public: public:
TextGeneratorOLImpl(OutputList &ol); TextGeneratorOLImpl(OutputDocInterface &od);
void writeString(const char *s) const; void writeString(const char *s) const;
void writeBreak() const; void writeBreak() const;
void writeLink(const char *extRef,const char *file, void writeLink(const char *extRef,const char *file,
const char *anchor,const char *text const char *anchor,const char *text
) const; ) const;
private: private:
OutputList &m_ol; OutputDocInterface &m_od;
};
class TextGeneratorXMLImpl : public TextGeneratorIntf
{
public:
TextGeneratorXMLImpl(QTextStream &t);
void writeString(const char *s) const;
void writeBreak() const;
void writeLink(const char *extRef,const char *file,
const char *anchor,const char *text
) const;
private:
QTextStream &m_t;
}; };
//-------------------------------------------------------------------- //--------------------------------------------------------------------
...@@ -96,12 +83,15 @@ extern bool getDefs(const QCString &scopeName, ...@@ -96,12 +83,15 @@ extern bool getDefs(const QCString &scopeName,
bool forceEmptyScope=FALSE, bool forceEmptyScope=FALSE,
FileDef *currentFile=0 FileDef *currentFile=0
); );
extern bool generateRef(OutputList &ol,const char *,
extern bool generateRef(OutputDocInterface &od,const char *,
const char *,bool inSeeBlock,const char * =0); const char *,bool inSeeBlock,const char * =0);
extern bool generateLink(OutputList &ol,const char *, extern bool generateLink(OutputDocInterface &od,const char *,
const char *,bool inSeeBlock,const char *); const char *,bool inSeeBlock,const char *);
extern void generateFileRef(OutputList &ol,const char *, extern void generateFileRef(OutputDocInterface &od,const char *,
const char *linkTxt=0); const char *linkTxt=0);
void writePageRef(OutputDocInterface &od,const char *cn,const char *mn);
extern bool matchArguments(ArgumentList *,ArgumentList *, extern bool matchArguments(ArgumentList *,ArgumentList *,
const char *cl=0,const char *ns=0,bool checkCV=TRUE, const char *cl=0,const char *ns=0,bool checkCV=TRUE,
NamespaceList *usingList=0); NamespaceList *usingList=0);
...@@ -119,23 +109,23 @@ extern QCString showFileDefMatches(const FileNameDict *fnDict,const char *n); ...@@ -119,23 +109,23 @@ extern QCString showFileDefMatches(const FileNameDict *fnDict,const char *n);
extern int guessSection(const char *name); extern int guessSection(const char *name);
extern bool isId(char c); extern bool isId(char c);
extern QCString removeRedundantWhiteSpace(const QCString &s); extern QCString removeRedundantWhiteSpace(const QCString &s);
extern void startTitle(OutputList &ol,const char *fileName); //extern void startTitle(OutputList &ol,const char *fileName);
extern void endTitle(OutputList &ol,const char *fileName,const char *name); //extern void endTitle(OutputList &ol,const char *fileName,const char *name);
void startFile(OutputList &ol,const char *name, //void startFile(OutputList &ol,const char *name,
const char *title,bool external=FALSE); // const char *title,bool external=FALSE);
void endFile(OutputList &ol,bool external=FALSE); //void endFile(OutputList &ol,bool external=FALSE);
void writeQuickLinks(OutputList &ol,bool compact,bool external=FALSE); //void writeQuickLinks(OutputList &ol,bool compact,bool external=FALSE);
QCString argListToString(ArgumentList *al); QCString argListToString(ArgumentList *al);
QCString tempArgListToString(ArgumentList *al); QCString tempArgListToString(ArgumentList *al);
QCString generateMarker(int id); QCString generateMarker(int id);
void writeExample(OutputList &ol,ExampleList *el); void writeExample(OutputList &ol,ExampleList *el);
void setFileNameForSections(QList<QCString> *anchorList,const char *fileName); //void setFileNameForSections(QList<QCString> *anchorList,const char *fileName,
// PageInfo *pi=0);
QCString stripAnnonymousScope(const QCString &s); QCString stripAnnonymousScope(const QCString &s);
QCString stripAnnonymousNamespaceScope(const QCString &s); QCString stripAnnonymousNamespaceScope(const QCString &s);
QCString stripFromPath(const QCString &path); QCString stripFromPath(const QCString &path);
bool rightScopeMatch(const QCString &scope, const QCString &name); bool rightScopeMatch(const QCString &scope, const QCString &name);
bool leftScopeMatch(const QCString &scope, const QCString &name); bool leftScopeMatch(const QCString &scope, const QCString &name);
void writePageRef(OutputList &ol,const char *cn,const char *mn);
QCString substituteKeywords(const QCString &s,const char *title); QCString substituteKeywords(const QCString &s,const char *title);
int getPrefixIndex(const QCString &name); int getPrefixIndex(const QCString &name);
QCString removeAnonymousScopes(const QCString &s); QCString removeAnonymousScopes(const QCString &s);
...@@ -151,6 +141,7 @@ QCString stripScope(const char *name); ...@@ -151,6 +141,7 @@ QCString stripScope(const char *name);
int iSystem(const char *command,const char *args,bool isBatchFile=FALSE); int iSystem(const char *command,const char *args,bool isBatchFile=FALSE);
QCString convertToHtml(const char *s); QCString convertToHtml(const char *s);
QCString convertToXML(const char *s); QCString convertToXML(const char *s);
const char * getOverloadDocs();
#endif #endif
/******************************************************************************
*
*
*
*
* Copyright (C) 1997-2001 by Dimitri van Heesch.
*
* Permission to use, copy, modify, and distribute this software and its
* documentation under the terms of the GNU General Public License is hereby
* granted. No representations are made about the suitability of this software
* for any purpose. It is provided "as is" without express or implied warranty.
* See the GNU General Public License for more details.
*
* Documents produced by Doxygen are derivative works derived from the
* input used in their production; they are not affected by this license.
*
*/
#include "qtbc.h"
#include "xml.h"
#include "doxygen.h"
#include "message.h"
#include "config.h"
#include "classlist.h"
#include "util.h"
#include <qdir.h>
#include <qfile.h>
#include <qtextstream.h>
const char dtd_data[]=
#include "xml_dtd.h"
;
void generateDTD()
{
QCString fileName=Config::outputDir+"/xml/doxygen.dtd";
QFile f(fileName);
if (!f.open(IO_WriteOnly))
{
err("Cannot open file %s for writing!\n",fileName.data());
return;
}
QTextStream t(&f);
t << dtd_data;
}
void writeXMLString(QTextStream &t,const char *s)
{
t << convertToXML(s);
}
void writeXMLLink(QTextStream &t,const char *compoundId,const char *memId,
const char *text)
{
if (memId==0)
{
t << "<compoundref idref=\"" << compoundId << "\">";
writeXMLString(t,text);
t << "</compoundref>";
}
else
{
t << "<memberref idref=\"" << compoundId << ":" << memId << "\">";
writeXMLString(t,text);
t << "</memberref>";
}
}
void generateXML()
{
QDir dir(Config::outputDir);
if (!dir.exists())
{
dir.setPath(QDir::currentDirPath());
if (!dir.mkdir(Config::outputDir))
{
err("Cannot create directory %s\n",Config::outputDir.data());
return;
}
}
QDir xmlDir(Config::outputDir+"/xml");
if (!xmlDir.exists() && !xmlDir.mkdir(Config::outputDir+"/xml"))
{
err("Could not create xml directory in %s\n",Config::outputDir.data());
return;
}
generateDTD();
QCString fileName=Config::outputDir+"/xml/doxygen.xml";
QFile f(fileName);
if (!f.open(IO_WriteOnly))
{
err("Cannot open file %s for writing!\n",fileName.data());
return;
}
QTextStream t(&f);
t << "<?xml version='1.0' encoding='ISO-8859-1' standalone='no'?>" << endl;
t << "<!DOCTYPE doxygen SYSTEM \"doxygen.dtd\">" << endl;
t << "<doxygen>" << endl;
if (classList.count()+inputNameList.count()>0)
{
t << " <compoundlist>" << endl;
ClassListIterator cli(classList);
ClassDef *cd;
for (cli.toFirst();(cd=cli.current());++cli)
{
cd->generateXML(t);
}
FileNameListIterator fnli(inputNameList);
FileName *fn;
for (;(fn=fnli.current());++fnli)
{
FileNameIterator fni(*fn);
FileDef *fd;
for (;(fd=fni.current());++fni)
{
fd->generateXML(t);
}
}
t << " </compoundlist>" << endl;
}
t << "</doxygen>" << endl;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment