Commit f1ddf16a authored by dimitri's avatar dimitri

Release-1.4.7-20060809

parent 3a7dcb4c
DOXYGEN Version 1.4.7-20060716 DOXYGEN Version 1.4.7-20060809
Please read the installation section of the manual Please read the installation section of the manual
(http://www.doxygen.org/install.html) for instructions. (http://www.doxygen.org/install.html) for instructions.
-------- --------
Dimitri van Heesch (16 July 2006) Dimitri van Heesch (09 August 2006)
...@@ -24,6 +24,7 @@ distclean: clean ...@@ -24,6 +24,7 @@ distclean: clean
cd addon/doxmlparser/src ; $(MAKE) distclean cd addon/doxmlparser/src ; $(MAKE) distclean
cd addon/doxmlparser/test ; $(MAKE) distclean cd addon/doxmlparser/test ; $(MAKE) distclean
cd addon/doxmlparser/examples/metrics ; $(MAKE) distclean cd addon/doxmlparser/examples/metrics ; $(MAKE) distclean
cd addon/doxyapp ; $(MAKE) distclean
-rm -f lib/lib* -rm -f lib/lib*
-rm -f bin/doxy* -rm -f bin/doxy*
-rm -f html -rm -f html
......
DOXYGEN Version 1.4.7_20060716 DOXYGEN Version 1.4.7_20060809
Please read INSTALL for compilation instructions. Please read INSTALL for compilation instructions.
...@@ -17,4 +17,4 @@ to subscribe to the lists or to visit the archives. ...@@ -17,4 +17,4 @@ to subscribe to the lists or to visit the archives.
Enjoy, Enjoy,
Dimitri van Heesch (dimitri@stack.nl) (16 July 2006) Dimitri van Heesch (dimitri@stack.nl) (09 August 2006)
all clean depend: Makefile.doxyapp
$(MAKE) -f Makefile.doxyapp $@
distclean: clean
$(RM) -rf Makefile doxyapp.pro Makefile.doxyapp
tmake:
$(ENV) $(PERL) $(TMAKE) doxyapp.pro >Makefile.doxyapp
strip:
strip doxyapp
Makefile.doxyapp: doxyapp.pro
$(ENV) $(PERL) $(TMAKE) doxyapp.pro >Makefile.doxyapp
install:
This directory contains an example of how to use doxygen as
an "source parsing engine" in an application. It shows how to configure doxygen
from the application and shows how to run doxygen without generating output,
and then uses the information about the symbols found in the source code.
Note that if you use this approach your application should be licensed under the GPL.
/******************************************************************************
*
* Copyright (C) 1997-2006 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.
*
*/
/** @file
* @brief Example of how to use doxygen as part of another GPL applications
*
* This example shows how to configure and run doxygen programmatically from
* within an application without generating the usual output.
* The example should work on any Unix like OS (including Linux and Mac OS X).
*
* This example shows how to use to code parser to get cross-references information
* and it also shows how to look up symbols in a program parsed by doxygen and
* show some information about it.
*/
#include </usr/include/unistd.h> // ugly hack to get the right unistd.h (doxygen has one too)
#include "doxygen.h"
#include "outputgen.h"
#include "parserintf.h"
class XRefDummyCodeGenerator : public CodeOutputInterface
{
public:
XRefDummyCodeGenerator(FileDef *fd) : m_fd(fd) {}
~XRefDummyCodeGenerator() {}
// these are just null functions, they can be used to produce a syntax highlighted
// and cross-linked version of the source code, but who needs that anyway ;-)
void codify(const char *) {}
void writeCodeLink(const char *,const char *,const char *,const char *) {}
void startCodeLine() {}
void endCodeLine() {}
void startCodeAnchor(const char *) {}
void endCodeAnchor() {}
void startFontClass(const char *) {}
void endFontClass() {}
void writeCodeAnchor(const char *) {}
void writeLineNumber(const char *,const char *,const char *,int) {}
// here we are presented with the symbols found by the code parser
void linkableSymbol(int l, const char *sym,Definition *symDef,Definition *context)
{
QCString ctx;
if (context) // the context of the symbol is known
{
if (context->definitionType()==Definition::TypeMember) // it is inside a member
{
Definition *parentContext = context->getOuterScope();
if (parentContext && parentContext->definitionType()==Definition::TypeClass)
// it is inside a member of a class
{
ctx.sprintf("inside %s %s of %s %s",
((MemberDef *)context)->memberTypeName().data(),
context->name().data(),
((ClassDef*)parentContext)->compoundTypeString().data(),
parentContext->name().data());
}
else if (parentContext==Doxygen::globalScope) // it is inside a global member
{
ctx.sprintf("inside %s %s",
((MemberDef *)context)->memberTypeName().data(),
context->name().data());
}
}
if (ctx.isEmpty()) // it is something else (class, or namespace member, ...)
{
ctx.sprintf("in %s",context->name().data());
}
}
printf("Found symbol %s at line %d of %s %s\n",
sym,l,m_fd->getDefFileName().data(),ctx.data());
if (symDef && context) // in this case the definition of the symbol is
// known to doxygen.
{
printf("-> defined at line %d of %s\n",
symDef->getDefLine(),symDef->getDefFileName().data());
}
}
private:
FileDef *m_fd;
};
static void findXRefSymbols(FileDef *fd)
{
// get the interface to a parser that matches the file extension
ParserInterface *pIntf=Doxygen::parserManager->getParser(fd->getDefFileExtension());
// reset the parsers state
pIntf->resetCodeParserState();
// create a new backend object
XRefDummyCodeGenerator *xrefGen = new XRefDummyCodeGenerator(fd);
// parse the source code
pIntf->parseCode(*xrefGen,
0,
fileToString(fd->absFilePath()),
FALSE,
0,
fd);
// dismiss the object.
delete xrefGen;
}
static void listSymbol(Definition *d)
{
if (d!=Doxygen::globalScope && // skip the global namespace symbol
d->name().at(0)!='@' // skip anonymous stuff
)
{
printf("%s\n",
d->name().data());
}
}
static void listSymbols()
{
QDictIterator<DefinitionIntf> sli(*Doxygen::symbolMap);
DefinitionIntf *di;
for (sli.toFirst();(di=sli.current());++sli)
{
if (di->definitionType()==DefinitionIntf::TypeSymbolList) // list of symbols
// with same name
{
DefinitionListIterator dli(*(DefinitionList*)di);
Definition *d;
// for each symbol
for (dli.toFirst();(d=dli.current());++dli)
{
listSymbol(d);
}
}
else // single symbol
{
listSymbol((Definition*)di);
}
}
}
static void lookupSymbol(Definition *d)
{
if (d!=Doxygen::globalScope && // skip the global namespace symbol
d->name().at(0)!='@' // skip anonymous stuff
)
{
printf("Symbol info\n");
printf("-----------\n");
printf("Name: %s\n",d->name().data());
printf("File: %s\n",d->getDefFileName().data());
printf("Line: %d\n",d->getDefLine());
// depending on the definition type we can case to the appropriate
// derived to get additional information
switch (d->definitionType())
{
case Definition::TypeClass:
{
ClassDef *cd = (ClassDef *)d;
printf("Kind: %s\n",cd->compoundTypeString().data());
}
break;
case Definition::TypeFile:
{
FileDef *fd = (FileDef *)d;
printf("Kind: File: #includes %d other files\n",
fd->includeFileList() ? fd->includeFileList()->count() : 0);
}
break;
case Definition::TypeNamespace:
{
NamespaceDef *nd = (NamespaceDef *)d;
printf("Kind: Namespace: contains %d classes and %d namespaces\n",
nd->getClassSDict() ? nd->getClassSDict()->count() : 0,
nd->getNamespaceSDict() ? nd->getNamespaceSDict()->count() : 0);
}
break;
case Definition::TypeMember:
{
MemberDef *md = (MemberDef *)d;
printf("Kind: %s\n",md->memberTypeName().data());
}
break;
default:
// ignore groups/pages/packages/dirs for now
break;
}
}
}
static void lookupSymbols(const QCString &sym)
{
if (!sym.isEmpty())
{
DefinitionIntf *di = Doxygen::symbolMap->find(sym);
if (di)
{
if (di->definitionType()==DefinitionIntf::TypeSymbolList)
{
DefinitionListIterator dli(*(DefinitionList*)di);
Definition *d;
// for each symbol with the given name
for (dli.toFirst();(d=dli.current());++dli)
{
lookupSymbol(d);
}
}
else
{
lookupSymbol((Definition*)di);
}
}
else
{
printf("Unknown symbol\n");
}
}
}
int main(int argc,char **argv)
{
char cmd[256];
if (argc<2)
{
printf("Usage: %s [source_file | source_dir]\n",argv[0]);
exit(1);
}
// initialize data structures
initDoxygen();
// setup the non-default configuration options
// we need a place to put intermediate files
Config_getString("OUTPUT_DIRECTORY")="/tmp/doxygen";
// disable html output
Config_getBool("GENERATE_HTML")=FALSE;
// disable latex output
Config_getBool("GENERATE_LATEX")=FALSE;
// be quiet
Config_getBool("QUIET")=TRUE;
// turn off warnings
Config_getBool("WARNINGS")=FALSE;
Config_getBool("WARN_IF_UNDOCUMENTED")=FALSE;
Config_getBool("WARN_IF_DOC_ERROR")=FALSE;
// Extract as much as possible
Config_getBool("EXTRACT_ALL")=TRUE;
Config_getBool("EXTRACT_STATIC")=TRUE;
Config_getBool("EXTRACT_PRIVATE")=TRUE;
Config_getBool("EXTRACT_LOCAL_METHODS")=TRUE;
// Extract source browse information, needed
// to make doxygen gather the cross reference info
Config_getBool("SOURCE_BROWSER")=TRUE;
// set the input
Config_getList("INPUT").append(argv[1]);
// check and finialize the configuration
checkConfiguration();
// parse the files
parseInput();
// iterate over the input files
FileNameListIterator fnli(Doxygen::inputNameList);
FileName *fn;
// foreach file with a certain name
for (fnli.toFirst();(fn=fnli.current());++fnli)
{
FileNameIterator fni(*fn);
FileDef *fd;
// for each file definition
for (;(fd=fni.current());++fni)
{
// get the references (linked and unlinked) found in this file
findXRefSymbols(fd);
}
}
// clean up after us
rmdir("/tmp/doxygen");
while (1)
{
printf("> Type a symbol name or\n> .list for a list of symbols or\n> .quit to exit\n> ");
fgets(cmd,256,stdin);
QCString s(cmd);
if (s.at(s.length()-1)=='\n') s=s.left(s.length()-1); // strip trailing \n
if (s==".list")
listSymbols();
else if (s==".quit")
exit(0);
else
lookupSymbols(s);
}
}
TEMPLATE = app.t
CONFIG = console warn_on debug
HEADERS =
SOURCES = doxyapp.cpp
LIBS += -L../../lib -L../../lib -ldoxygen -lqtools -lmd5 -ldoxycfg -lpng
DESTDIR =
OBJECTS_DIR = ../../objects
TARGET = ../../bin/doxyapp
INCLUDEPATH += ../../qtools ../../src
DEPENDPATH += ../../src
TARGETDEPS = ../../lib/libdoxygen.a
...@@ -47,6 +47,7 @@ QCString getResourcePath() ...@@ -47,6 +47,7 @@ QCString getResourcePath()
return result; return result;
} }
#if 0
#define GRAPHVIZ_PATH "/Applications/Graphviz.app" #define GRAPHVIZ_PATH "/Applications/Graphviz.app"
#define DOT_PATH GRAPHVIZ_PATH "/Contents/MacOS" #define DOT_PATH GRAPHVIZ_PATH "/Contents/MacOS"
#define DOT_LOCATION DOT_PATH "/dot" #define DOT_LOCATION DOT_PATH "/dot"
...@@ -73,6 +74,12 @@ void setDotPath() ...@@ -73,6 +74,12 @@ void setDotPath()
//Config_getBool("HAVE_DOT")=TRUE; //Config_getBool("HAVE_DOT")=TRUE;
} }
} }
#endif
void setDotPath()
{
Config_getString("DOT_PATH")=getResourcePath();
}
#endif #endif
...@@ -512,7 +519,12 @@ Step4::Step4(QWidget *parent) : QWidget(parent,"Step4") ...@@ -512,7 +519,12 @@ Step4::Step4(QWidget *parent) : QWidget(parent,"Step4")
dotGroup->setButton(0); dotGroup->setButton(0);
m_dotOptions->setEnabled(FALSE); m_dotOptions->setEnabled(FALSE);
gbox->addWidget(w,4,0); gbox->addWidget(w,4,0);
#if defined(Q_OS_MACX) // we bundle dot with the mac package
m_diagramMode->setButton(2);
#else
m_diagramMode->setButton(1); m_diagramMode->setButton(1);
#endif
layout->addWidget(m_diagramMode); layout->addWidget(m_diagramMode);
layout->addStretch(1); layout->addStretch(1);
...@@ -678,6 +690,7 @@ MainWidget::MainWidget(QWidget *parent) ...@@ -678,6 +690,7 @@ MainWidget::MainWidget(QWidget *parent)
// initialize config settings // initialize config settings
Config::instance()->init(); Config::instance()->init();
Config::instance()->check(); Config::instance()->check();
Config_getBool("HAVE_DOT")=TRUE;
#if defined(Q_OS_MACX) #if defined(Q_OS_MACX)
setDotPath(); setDotPath();
#endif #endif
...@@ -887,8 +900,8 @@ void MainWidget::launchWizard() ...@@ -887,8 +900,8 @@ void MainWidget::launchWizard()
// -------- Initialize the dialog ---------------- // -------- Initialize the dialog ----------------
// step1 // step1
wizard.setProjectName(Config_getString("PROJECT_NAME")); wizard.setProjectName(QString::fromLocal8Bit(Config_getString("PROJECT_NAME")));
wizard.setProjectNumber(Config_getString("PROJECT_NUMBER")); wizard.setProjectNumber(QString::fromLocal8Bit(Config_getString("PROJECT_NUMBER")));
if (Config_getList("INPUT").count()>0) if (Config_getList("INPUT").count()>0)
{ {
QString dirName=Config_getList("INPUT").getFirst(); QString dirName=Config_getList("INPUT").getFirst();
...@@ -899,7 +912,7 @@ void MainWidget::launchWizard() ...@@ -899,7 +912,7 @@ void MainWidget::launchWizard()
} }
} }
wizard.setRecursiveScan(Config_getBool("RECURSIVE")); wizard.setRecursiveScan(Config_getBool("RECURSIVE"));
wizard.setDestinationDir(Config_getString("OUTPUT_DIRECTORY")); wizard.setDestinationDir(QString::fromLocal8Bit(Config_getString("OUTPUT_DIRECTORY")));
// step2 // step2
wizard.setExtractAll(Config_getBool("EXTRACT_ALL")); wizard.setExtractAll(Config_getBool("EXTRACT_ALL"));
...@@ -979,12 +992,12 @@ void MainWidget::launchWizard() ...@@ -979,12 +992,12 @@ void MainWidget::launchWizard()
// -------- Store the results ---------------- // -------- Store the results ----------------
// step1 // step1
Config_getString("PROJECT_NAME")=wizard.getProjectName(); Config_getString("PROJECT_NAME")=wizard.getProjectName().local8Bit();
Config_getString("PROJECT_NUMBER")=wizard.getProjectNumber(); Config_getString("PROJECT_NUMBER")=wizard.getProjectNumber();
Config_getList("INPUT").clear(); Config_getList("INPUT").clear();
Config_getList("INPUT").append(wizard.getSourceDir()); Config_getList("INPUT").append(wizard.getSourceDir());
Config_getBool("RECURSIVE")=wizard.scanRecursively(); Config_getBool("RECURSIVE")=wizard.scanRecursively();
Config_getString("OUTPUT_DIRECTORY")=wizard.getDestinationDir(); Config_getString("OUTPUT_DIRECTORY")=wizard.getDestinationDir().local8Bit();
// step2 // step2
if (wizard.extractAll()) if (wizard.extractAll())
...@@ -1125,7 +1138,7 @@ void MainWidget::loadConfigFromFile(const QString &fn) ...@@ -1125,7 +1138,7 @@ void MainWidget::loadConfigFromFile(const QString &fn)
else else
{ {
Config::instance()->convertStrToVal(); Config::instance()->convertStrToVal();
#if defined(Q_OS_MACX) #if 0 //defined(Q_OS_MACX)
if (checkIfDotInstalled() && if (checkIfDotInstalled() &&
qstricmp(Config_getString("DOT_PATH"),DOT_PATH)!=0 qstricmp(Config_getString("DOT_PATH"),DOT_PATH)!=0
) )
...@@ -1163,9 +1176,9 @@ void MainWidget::launchExpert() ...@@ -1163,9 +1176,9 @@ void MainWidget::launchExpert()
Expert expert(this); Expert expert(this);
expert.init(); expert.init();
expert.exec(); expert.exec();
#if defined(Q_OS_MACX) //#if defined(Q_OS_MACX)
setDotPath(); // setDotPath();
#endif //#endif
if (expert.hasChanged()) setConfigSaved(FALSE); if (expert.hasChanged()) setConfigSaved(FALSE);
} }
......
...@@ -6,6 +6,7 @@ class QObject; ...@@ -6,6 +6,7 @@ class QObject;
class IInput class IInput
{ {
public: public:
virtual ~IInput() {}
virtual void init() = 0; virtual void init() = 0;
virtual void setEnabled(bool) = 0; virtual void setEnabled(bool) = 0;
virtual QObject *qobject() = 0; virtual QObject *qobject() = 0;
......
...@@ -20,7 +20,7 @@ doxygen_version_minor=4 ...@@ -20,7 +20,7 @@ doxygen_version_minor=4
doxygen_version_revision=7 doxygen_version_revision=7
#NOTE: Setting version_mmn to "NO" will omit mmn info from the package. #NOTE: Setting version_mmn to "NO" will omit mmn info from the package.
doxygen_version_mmn=20060716 doxygen_version_mmn=20060809
bin_dirs=`echo $PATH | sed -e "s/:/ /g"` bin_dirs=`echo $PATH | sed -e "s/:/ /g"`
...@@ -34,6 +34,7 @@ f_prefix=/usr/local ...@@ -34,6 +34,7 @@ f_prefix=/usr/local
f_insttool=NO f_insttool=NO
f_english=NO f_english=NO
f_wizard=NO f_wizard=NO
f_app=NO
f_thread=NO f_thread=NO
f_langs=nl,se,cz,fr,id,it,de,jp,je,es,fi,ru,hr,pl,pt,hu,kr,ke,ro,si,cn,no,br,dk,sk,ua,gr,tw,sr,ca,lt,za,ar,fa f_langs=nl,se,cz,fr,id,it,de,jp,je,es,fi,ru,hr,pl,pt,hu,kr,ke,ro,si,cn,no,br,dk,sk,ua,gr,tw,sr,ca,lt,za,ar,fa
...@@ -81,6 +82,9 @@ while test -n "$1"; do ...@@ -81,6 +82,9 @@ while test -n "$1"; do
--with-doxywizard | -with-doxywizard) --with-doxywizard | -with-doxywizard)
f_wizard=YES f_wizard=YES
;; ;;
--with-doxyapp | -with-doxyapp)
f_app=YES
;;
-h | -help | --help) -h | -help | --help)
f_help=y f_help=y
;; ;;
...@@ -521,7 +525,7 @@ TMAKE_CXXFLAGS += -DENGLISH_ONLY ...@@ -521,7 +525,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/doxywizard/Makefile.in addon/doxmlparser/src/Makefile.in addon/doxmlparser/test/Makefile.in addon/doxmlparser/examples/metrics/Makefile.in libpng/Makefile.in libmd5/Makefile.in" f_inmakefiles="Makefile.in qtools/Makefile.in src/Makefile.in examples/Makefile.in doc/Makefile.in addon/doxywizard/Makefile.in addon/doxmlparser/src/Makefile.in addon/doxmlparser/test/Makefile.in addon/doxmlparser/examples/metrics/Makefile.in libpng/Makefile.in libmd5/Makefile.in addon/doxyapp/Makefile.in"
for i in $f_inmakefiles ; do for i in $f_inmakefiles ; do
SRC=$i SRC=$i
...@@ -544,6 +548,9 @@ EOF ...@@ -544,6 +548,9 @@ EOF
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_app = YES; then
echo " \$(MAKE) -C addon/doxyapp" >> $DST
fi
echo "" >> $DST echo "" >> $DST
echo "doxywizard_install:" >> $DST echo "doxywizard_install:" >> $DST
if test $f_wizard = YES; then if test $f_wizard = YES; then
...@@ -555,7 +562,7 @@ EOF ...@@ -555,7 +562,7 @@ EOF
echo " Created $DST from $SRC..." echo " Created $DST from $SRC..."
done done
f_inprofiles="qtools/qtools.pro.in src/libdoxygen.pro.in src/libdoxycfg.pro.in src/doxygen.pro.in src/doxytag.pro.in addon/doxywizard/doxywizard.pro.in addon/doxmlparser/src/doxmlparser.pro.in addon/doxmlparser/test/xmlparse.pro.in addon/doxmlparser/examples/metrics/metrics.pro.in libpng/libpng.pro.in libmd5/libmd5.pro.in" f_inprofiles="qtools/qtools.pro.in src/libdoxygen.pro.in src/libdoxycfg.pro.in src/doxygen.pro.in src/doxytag.pro.in addon/doxywizard/doxywizard.pro.in addon/doxmlparser/src/doxmlparser.pro.in addon/doxmlparser/test/xmlparse.pro.in addon/doxmlparser/examples/metrics/metrics.pro.in libpng/libpng.pro.in libmd5/libmd5.pro.in addon/doxyapp/doxyapp.pro.in"
for i in $f_inprofiles ; do for i in $f_inprofiles ; do
SRC=$i SRC=$i
......
This diff is collapsed.
This diff is collapsed.
...@@ -25,10 +25,11 @@ class CodeOutputInterface; ...@@ -25,10 +25,11 @@ class CodeOutputInterface;
class FileDef; class FileDef;
class MemberDef; class MemberDef;
extern void parseCCode(CodeOutputInterface &,const char *,const QCString &, void parseCCode(CodeOutputInterface &,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,
MemberDef *memberDef=0); MemberDef *memberDef=0);
extern void resetCCodeParserState(); void resetCCodeParserState();
void codeFreeScanner();
#endif #endif
...@@ -106,6 +106,7 @@ static int g_lastCContext; ...@@ -106,6 +106,7 @@ static int g_lastCContext;
static bool g_insideObjC; static bool g_insideObjC;
static bool g_insideProtocolList; static bool g_insideProtocolList;
static bool g_lexInit = FALSE;
// context for an Objective-C method call // context for an Objective-C method call
struct ObjCCallCtx struct ObjCCallCtx
...@@ -458,7 +459,6 @@ static void startCodeLine() ...@@ -458,7 +459,6 @@ static void startCodeLine()
Definition *d = g_sourceFileDef->getSourceDefinition(g_yyLineNr); Definition *d = g_sourceFileDef->getSourceDefinition(g_yyLineNr);
//printf("startCodeLine %d d=%s\n", g_yyLineNr,d ? d->name().data() : "<null>"); //printf("startCodeLine %d d=%s\n", g_yyLineNr,d ? d->name().data() : "<null>");
//g_code->startLineNumber();
if (!g_includeCodeFragment && d) if (!g_includeCodeFragment && d)
{ {
g_currentDefinition = d; g_currentDefinition = d;
...@@ -498,10 +498,8 @@ static void startCodeLine() ...@@ -498,10 +498,8 @@ static void startCodeLine()
} }
else else
{ {
//g_code->codify(lineNumber);
g_code->writeLineNumber(0,0,0,g_yyLineNr); g_code->writeLineNumber(0,0,0,g_yyLineNr);
} }
//g_code->endLineNumber();
} }
g_code->startCodeLine(); g_code->startCodeLine();
if (g_currentFontClass) if (g_currentFontClass)
...@@ -764,15 +762,20 @@ static MemberDef *setCallContextForVar(const QCString &name) ...@@ -764,15 +762,20 @@ static MemberDef *setCallContextForVar(const QCString &name)
static void addDocCrossReference(MemberDef *src,MemberDef *dst) static void addDocCrossReference(MemberDef *src,MemberDef *dst)
{ {
static bool referencedByRelation = Config_getBool("REFERENCED_BY_RELATION");
static bool referencesRelation = Config_getBool("REFERENCES_RELATION");
static bool callerGraph = Config_getBool("CALLER_GRAPH");
static bool callGraph = Config_getBool("CALL_GRAPH");
if (dst->isTypedef() || dst->isEnumerate()) return; // don't add types if (dst->isTypedef() || dst->isEnumerate()) return; // don't add types
//printf("addDocCrossReference src=%s,dst=%s\n",src->name().data(),dst->name().data()); //printf("addDocCrossReference src=%s,dst=%s\n",src->name().data(),dst->name().data());
if ((Config_getBool("REFERENCED_BY_RELATION") || Config_getBool("CALLER_GRAPH")) && if ((referencedByRelation || callerGraph) &&
(src->isFunction() || src->isSlot()) (src->isFunction() || src->isSlot())
) )
{ {
dst->addSourceReferencedBy(src); dst->addSourceReferencedBy(src);
} }
if ((Config_getBool("REFERENCES_RELATION") || Config_getBool("CALL_GRAPH")) && if ((referencesRelation || callGraph) &&
(src->isFunction() || src->isSlot()) (src->isFunction() || src->isSlot())
) )
{ {
...@@ -828,6 +831,8 @@ static bool getLinkInScope(const QCString &c, // scope ...@@ -828,6 +831,8 @@ static bool getLinkInScope(const QCString &c, // scope
} }
//printf("d->getReference()=`%s' d->getOutputBase()=`%s' name=`%s' member name=`%s'\n",d->getReference().data(),d->getOutputFileBase().data(),d->name().data(),md->name().data()); //printf("d->getReference()=`%s' d->getOutputBase()=`%s' name=`%s' member name=`%s'\n",d->getReference().data(),d->getOutputFileBase().data(),d->name().data(),md->name().data());
ol.linkableSymbol(g_yyLineNr,md->name(),md,
g_currentMemberDef ? g_currentMemberDef : g_currentDefinition);
writeMultiLineCodeLink(ol,md->getReference(), writeMultiLineCodeLink(ol,md->getReference(),
md->getOutputFileBase(), md->getOutputFileBase(),
md->anchor(), md->anchor(),
...@@ -936,6 +941,8 @@ static void generateClassOrGlobalLink(CodeOutputInterface &ol,char *clName, ...@@ -936,6 +941,8 @@ static void generateClassOrGlobalLink(CodeOutputInterface &ol,char *clName,
g_anchorCount++; g_anchorCount++;
} }
} }
ol.linkableSymbol(g_yyLineNr,cd->name(),cd,
g_currentMemberDef ? g_currentMemberDef : g_currentDefinition);
writeMultiLineCodeLink(ol,cd->getReference(),cd->getOutputFileBase(),0,clName); writeMultiLineCodeLink(ol,cd->getReference(),cd->getOutputFileBase(),0,clName);
addToSearchIndex(className); addToSearchIndex(className);
if (md) if (md)
...@@ -977,6 +984,8 @@ static void generateClassOrGlobalLink(CodeOutputInterface &ol,char *clName, ...@@ -977,6 +984,8 @@ static void generateClassOrGlobalLink(CodeOutputInterface &ol,char *clName,
//printf("is a global md=%p g_currentDefinition=%s\n",md,g_currentDefinition?g_currentDefinition->name().data():"<none>"); //printf("is a global md=%p g_currentDefinition=%s\n",md,g_currentDefinition?g_currentDefinition->name().data():"<none>");
if (md->isLinkable()) if (md->isLinkable())
{ {
ol.linkableSymbol(g_yyLineNr,md->name(),md,
g_currentMemberDef ? g_currentMemberDef : g_currentDefinition);
writeMultiLineCodeLink(ol,md->getReference(),md->getOutputFileBase(),md->anchor(),clName); writeMultiLineCodeLink(ol,md->getReference(),md->getOutputFileBase(),md->anchor(),clName);
addToSearchIndex(clName); addToSearchIndex(clName);
if (g_currentMemberDef) if (g_currentMemberDef)
...@@ -989,6 +998,8 @@ static void generateClassOrGlobalLink(CodeOutputInterface &ol,char *clName, ...@@ -989,6 +998,8 @@ static void generateClassOrGlobalLink(CodeOutputInterface &ol,char *clName,
} }
// nothing found, just write out the word // nothing found, just write out the word
ol.linkableSymbol(g_yyLineNr,clName,0,
g_currentMemberDef?g_currentMemberDef:g_currentDefinition);
codifyLines(clName); codifyLines(clName);
addToSearchIndex(clName); addToSearchIndex(clName);
} }
...@@ -1044,6 +1055,8 @@ static bool generateClassMemberLink(CodeOutputInterface &ol,ClassDef *mcd,const ...@@ -1044,6 +1055,8 @@ static bool generateClassMemberLink(CodeOutputInterface &ol,ClassDef *mcd,const
} }
// write the actual link // write the actual link
ol.linkableSymbol(g_yyLineNr,xmd->name(),xmd,
g_currentMemberDef ? g_currentMemberDef : g_currentDefinition);
writeMultiLineCodeLink(ol,xmd->getReference(), writeMultiLineCodeLink(ol,xmd->getReference(),
xmd->getOutputFileBase(),xmd->anchor(),memName); xmd->getOutputFileBase(),xmd->anchor(),memName);
addToSearchIndex(memName); addToSearchIndex(memName);
...@@ -1149,6 +1162,9 @@ static void generateMemberLink(CodeOutputInterface &ol,const QCString &varName, ...@@ -1149,6 +1162,9 @@ static void generateMemberLink(CodeOutputInterface &ol,const QCString &varName,
} }
} }
} }
// nothing found -> write result as is
ol.linkableSymbol(g_yyLineNr,memName,0,
g_currentMemberDef?g_currentMemberDef:g_currentDefinition);
codifyLines(memName); codifyLines(memName);
addToSearchIndex(memName); addToSearchIndex(memName);
return; return;
...@@ -1331,6 +1347,8 @@ static void writeObjCMethodCall(ObjCCallCtx *ctx) ...@@ -1331,6 +1347,8 @@ static void writeObjCMethodCall(ObjCCallCtx *ctx)
{ {
if (ctx->method && ctx->method->isLinkable()) if (ctx->method && ctx->method->isLinkable())
{ {
g_code->linkableSymbol(g_yyLineNr,ctx->method->name(),ctx->method,
g_currentMemberDef ? g_currentMemberDef : g_currentDefinition);
writeMultiLineCodeLink(*g_code, writeMultiLineCodeLink(*g_code,
ctx->method->getReference(), ctx->method->getReference(),
ctx->method->getOutputFileBase(), ctx->method->getOutputFileBase(),
...@@ -1343,6 +1361,8 @@ static void writeObjCMethodCall(ObjCCallCtx *ctx) ...@@ -1343,6 +1361,8 @@ static void writeObjCMethodCall(ObjCCallCtx *ctx)
} }
else else
{ {
g_code->linkableSymbol(g_yyLineNr,pName->data(),0,
g_currentMemberDef ? g_currentMemberDef : g_currentDefinition);
codifyLines(pName->data()); codifyLines(pName->data());
} }
} }
...@@ -1414,6 +1434,8 @@ static void writeObjCMethodCall(ObjCCallCtx *ctx) ...@@ -1414,6 +1434,8 @@ static void writeObjCMethodCall(ObjCCallCtx *ctx)
} }
else if (ctx->objectVar && ctx->objectVar->isLinkable()) // object is class variable else if (ctx->objectVar && ctx->objectVar->isLinkable()) // object is class variable
{ {
g_code->linkableSymbol(g_yyLineNr,ctx->objectVar->name(),ctx->objectVar,
g_currentMemberDef ? g_currentMemberDef : g_currentDefinition);
writeMultiLineCodeLink(*g_code, writeMultiLineCodeLink(*g_code,
ctx->objectVar->getReference(), ctx->objectVar->getReference(),
ctx->objectVar->getOutputFileBase(), ctx->objectVar->getOutputFileBase(),
...@@ -1430,6 +1452,8 @@ static void writeObjCMethodCall(ObjCCallCtx *ctx) ...@@ -1430,6 +1452,8 @@ static void writeObjCMethodCall(ObjCCallCtx *ctx)
) // object is class name ) // object is class name
{ {
ClassDef *cd = ctx->objectType; ClassDef *cd = ctx->objectType;
g_code->linkableSymbol(g_yyLineNr,cd->name(),cd,
g_currentMemberDef ? g_currentMemberDef : g_currentDefinition);
writeMultiLineCodeLink(*g_code, writeMultiLineCodeLink(*g_code,
cd->getReference(), cd->getReference(),
cd->getOutputFileBase(), cd->getOutputFileBase(),
...@@ -1443,6 +1467,8 @@ static void writeObjCMethodCall(ObjCCallCtx *ctx) ...@@ -1443,6 +1467,8 @@ static void writeObjCMethodCall(ObjCCallCtx *ctx)
if (cd && cd->isLinkable()) if (cd && cd->isLinkable())
{ {
if (ctx->objectType==0) ctx->objectType=cd; if (ctx->objectType==0) ctx->objectType=cd;
g_code->linkableSymbol(g_yyLineNr,cd->name(),cd,
g_currentMemberDef ? g_currentMemberDef : g_currentDefinition);
writeMultiLineCodeLink(*g_code, writeMultiLineCodeLink(*g_code,
cd->getReference(), cd->getReference(),
cd->getOutputFileBase(), cd->getOutputFileBase(),
...@@ -1451,6 +1477,8 @@ static void writeObjCMethodCall(ObjCCallCtx *ctx) ...@@ -1451,6 +1477,8 @@ static void writeObjCMethodCall(ObjCCallCtx *ctx)
} }
else else
{ {
g_code->linkableSymbol(g_yyLineNr,pObject->data(),0,
g_currentMemberDef ? g_currentMemberDef : g_currentDefinition);
codifyLines(pObject->data()); codifyLines(pObject->data());
} }
} }
...@@ -1708,6 +1736,9 @@ OPERATOR {ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP} ...@@ -1708,6 +1736,9 @@ OPERATOR {ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP}
g_theVarContext.addVariable(g_parmType,g_parmName); g_theVarContext.addVariable(g_parmType,g_parmName);
g_parmType.resize(0);g_parmName.resize(0); g_parmType.resize(0);g_parmName.resize(0);
} }
<ObjCMethod,ObjCParams,ObjCParamType>{ID} {
generateClassOrGlobalLink(*g_code,yytext);
}
<ObjCMethod,ObjCParams,ObjCParamType>. { <ObjCMethod,ObjCParams,ObjCParamType>. {
g_code->codify(yytext); g_code->codify(yytext);
} }
...@@ -1811,6 +1842,7 @@ OPERATOR {ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP} ...@@ -1811,6 +1842,7 @@ OPERATOR {ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP}
g_inClass=FALSE; g_inClass=FALSE;
//fprintf(stderr,"g_bodyCurlyCount=%d\n",g_bodyCurlyCount);
if (--g_bodyCurlyCount<=0) if (--g_bodyCurlyCount<=0)
{ {
g_insideBody=FALSE; g_insideBody=FALSE;
...@@ -2232,6 +2264,8 @@ OPERATOR {ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP} ...@@ -2232,6 +2264,8 @@ OPERATOR {ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP}
{ {
if (!generateClassMemberLink(*g_code,g_theCallContext.getClass(),yytext)) if (!generateClassMemberLink(*g_code,g_theCallContext.getClass(),yytext))
{ {
g_code->linkableSymbol(g_yyLineNr,yytext,0,
g_currentMemberDef?g_currentMemberDef:g_currentDefinition);
g_code->codify(yytext); g_code->codify(yytext);
addToSearchIndex(yytext); addToSearchIndex(yytext);
} }
...@@ -2239,6 +2273,8 @@ OPERATOR {ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP} ...@@ -2239,6 +2273,8 @@ OPERATOR {ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP}
} }
else else
{ {
g_code->linkableSymbol(g_yyLineNr,yytext,0,
g_currentMemberDef?g_currentMemberDef:g_currentDefinition);
g_code->codify(yytext); g_code->codify(yytext);
addToSearchIndex(yytext); addToSearchIndex(yytext);
g_name.resize(0); g_name.resize(0);
...@@ -2260,6 +2296,8 @@ OPERATOR {ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP} ...@@ -2260,6 +2296,8 @@ OPERATOR {ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP}
//fprintf(stderr,"g_theCallContext.getClass()=%p\n",g_theCallContext.getClass()); //fprintf(stderr,"g_theCallContext.getClass()=%p\n",g_theCallContext.getClass());
if (!generateClassMemberLink(*g_code,g_theCallContext.getClass(),yytext)) if (!generateClassMemberLink(*g_code,g_theCallContext.getClass(),yytext))
{ {
g_code->linkableSymbol(g_yyLineNr,yytext,0,
g_currentMemberDef?g_currentMemberDef:g_currentDefinition);
g_code->codify(yytext); g_code->codify(yytext);
addToSearchIndex(yytext); addToSearchIndex(yytext);
} }
...@@ -3140,6 +3178,7 @@ void parseCCode(CodeOutputInterface &od,const char *className,const QCString &s, ...@@ -3140,6 +3178,7 @@ void parseCCode(CodeOutputInterface &od,const char *className,const QCString &s,
codeYYrestart( codeYYin ); codeYYrestart( codeYYin );
BEGIN( Body ); BEGIN( Body );
codeYYlex(); codeYYlex();
g_lexInit=TRUE;
if (g_needsTermination) if (g_needsTermination)
{ {
endFontClass(); endFontClass();
...@@ -3154,11 +3193,23 @@ void parseCCode(CodeOutputInterface &od,const char *className,const QCString &s, ...@@ -3154,11 +3193,23 @@ void parseCCode(CodeOutputInterface &od,const char *className,const QCString &s,
return; return;
} }
void codeFreeScanner()
{
#if defined(YY_FLEX_SUBMINOR_VERSION)
if (g_lexInit)
{
codeYYlex_destroy();
}
#endif
}
#if !defined(YY_FLEX_SUBMINOR_VERSION) #if !defined(YY_FLEX_SUBMINOR_VERSION)
extern "C" { // some bogus code to keep the compiler happy extern "C" { // some bogus code to keep the compiler happy
void codeYYdummy() { yy_flex_realloc(0,0); } void codeYYdummy() { yy_flex_realloc(0,0); }
} }
#elif YY_FLEX_SUBMINOR_VERSION<33 #elif YY_FLEX_SUBMINOR_VERSION<33
#error "You seem to be using a version of flex newer than 2.5.4. These are currently incompatible with 2.5.4, and do NOT work with doxygen! Please use version 2.5.4 or expect things to be parsed wrongly! A bug report has been submitted (#732132)." #error "You seem to be using a version of flex newer than 2.5.4 but older than 2.5.33. These versions do NOT work with doxygen! Please use version <=2.5.4 or >=2.5.33 or expect things to be parsed wrongly!"
#endif #endif
...@@ -2329,8 +2329,8 @@ void openGroup(Entry *e,const char *,int) ...@@ -2329,8 +2329,8 @@ void openGroup(Entry *e,const char *,int)
if (e->section==Entry::GROUPDOC_SEC) // auto group if (e->section==Entry::GROUPDOC_SEC) // auto group
{ {
g_autoGroupStack.push(new Grouping(e->name,e->groupingPri())); g_autoGroupStack.push(new Grouping(e->name,e->groupingPri()));
printf("==> openGroup(name=%s,sec=%x) g_autoGroupStack=%d\n", //printf("==> openGroup(name=%s,sec=%x) g_autoGroupStack=%d\n",
e->name.data(),e->section,g_autoGroupStack.count()); // e->name.data(),e->section,g_autoGroupStack.count());
} }
else // start of a member group else // start of a member group
{ {
...@@ -2352,8 +2352,8 @@ void openGroup(Entry *e,const char *,int) ...@@ -2352,8 +2352,8 @@ void openGroup(Entry *e,const char *,int)
void closeGroup(Entry *e,const char *fileName,int) void closeGroup(Entry *e,const char *fileName,int)
{ {
printf("==> closeGroup(name=%s,sec=%x) g_autoGroupStack=%d\n", //printf("==> closeGroup(name=%s,sec=%x) g_autoGroupStack=%d\n",
e->name.data(),e->section,g_autoGroupStack.count()); // e->name.data(),e->section,g_autoGroupStack.count());
if (g_memberGroupId!=DOX_NOGROUP) // end of member group if (g_memberGroupId!=DOX_NOGROUP) // end of member group
{ {
MemberGroupInfo *info=Doxygen::memGrpInfoDict.find(g_memberGroupId); MemberGroupInfo *info=Doxygen::memGrpInfoDict.find(g_memberGroupId);
...@@ -2372,7 +2372,7 @@ void closeGroup(Entry *e,const char *fileName,int) ...@@ -2372,7 +2372,7 @@ void closeGroup(Entry *e,const char *fileName,int)
{ {
Grouping *grp = g_autoGroupStack.pop(); Grouping *grp = g_autoGroupStack.pop();
e->groups->removeLast(); e->groups->removeLast();
printf("Removing %s\n",grp->groupname.data()); //printf("Removing %s\n",grp->groupname.data());
delete grp; delete grp;
initGroupInfo(e); initGroupInfo(e);
} }
...@@ -2386,9 +2386,9 @@ void initGroupInfo(Entry *e) ...@@ -2386,9 +2386,9 @@ void initGroupInfo(Entry *e)
e->relates = g_memberGroupRelates; e->relates = g_memberGroupRelates;
if (!g_autoGroupStack.isEmpty()) if (!g_autoGroupStack.isEmpty())
{ {
printf("Appending group %s to %s: count=%d entry=%p\n", //printf("Appending group %s to %s: count=%d entry=%p\n",
g_autoGroupStack.top()->groupname.data(), // g_autoGroupStack.top()->groupname.data(),
e->name.data(),e->groups->count(),e); // e->name.data(),e->groups->count(),e);
e->groups->append(new Grouping(*g_autoGroupStack.top())); e->groups->append(new Grouping(*g_autoGroupStack.top()));
} }
} }
......
...@@ -1196,6 +1196,27 @@ void Config::check() ...@@ -1196,6 +1196,27 @@ void Config::check()
annotationFromBrief.append("an"); annotationFromBrief.append("an");
annotationFromBrief.append("the"); annotationFromBrief.append("the");
} }
if (Config_getBool("CALL_GRAPH") &&
(!Config_getBool("SOURCE_BROWSER") || !Config_getBool("REFERENCES_RELATION"))
)
{
config_err("Warning: turning on CALL_GRAPH requires turning "
"SOURCE_BROWSER and\nREFERENCES_RELATION on as well!\n"
"Assuming SOURCE_BROWSER=YES and REFERENCES_RELATION=YES\n");
Config_getBool("SOURCE_BROWSER")=TRUE;
Config_getBool("REFERENCES_RELATION")=TRUE;
}
if (Config_getBool("CALLER_GRAPH") &&
(!Config_getBool("SOURCE_BROWSER") || !Config_getBool("REFERENCED_BY_RELATION"))
)
{
config_err("Warning: turning on CALLER_GRAPH requires turning "
"SOURCE_BROWSER and\nREFERENCEDBY_RELATION on as well!\n"
"Assuming SOURCE_BROWSER=YES and REFERENCED_BY_RELATION=YES\n");
Config_getBool("SOURCE_BROWSER")=TRUE;
Config_getBool("REFERENCED_BY_RELATION")=TRUE;
}
} }
void Config::init() void Config::init()
......
...@@ -313,7 +313,7 @@ void generateDEFClassSection(ClassDef *cd, ...@@ -313,7 +313,7 @@ void generateDEFClassSection(ClassDef *cd,
MemberList *ml, MemberList *ml,
const char *kind) const char *kind)
{ {
if (cd && ml->count()>0) if (cd && ml && ml->count()>0)
{ {
t << " cp-section = {" << endl; t << " cp-section = {" << endl;
t << " sec-kind = '" << kind << "';" << endl; t << " sec-kind = '" << kind << "';" << endl;
...@@ -408,54 +408,41 @@ void generateDEFForClass(ClassDef *cd,QTextStream &t) ...@@ -408,54 +408,41 @@ void generateDEFForClass(ClassDef *cd,QTextStream &t)
} }
} }
int numMembers = int numMembers = 0;
(cd->pubTypes ? cd->pubTypes->count() : 0)+ QListIterator<MemberList> mli(cd->getMemberLists());
(cd->pubMethods ? cd->pubMethods->count() : 0)+ MemberList *ml;
(cd->pubAttribs ? cd->pubAttribs->count() : 0)+ for (mli.toFirst();(ml=mli.current());++mli)
(cd->pubSlots ? cd->pubSlots->count() : 0)+ {
(cd->signals ? cd->signals->count() : 0)+ if ((ml->listType()&MemberList::detailedLists)==0)
(cd->dcopMethods ? cd->dcopMethods->count() : 0)+ {
(cd->pubStaticMethods ? cd->pubStaticMethods->count() : 0)+ numMembers+=ml->count();
(cd->pubStaticAttribs ? cd->pubStaticAttribs->count() : 0)+ }
(cd->proTypes ? cd->proTypes->count() : 0)+ }
(cd->proMethods ? cd->proMethods->count() : 0)+
(cd->proAttribs ? cd->proAttribs->count() : 0)+
(cd->proSlots ? cd->proSlots->count() : 0)+
(cd->proStaticMethods ? cd->proStaticMethods->count() : 0)+
(cd->proStaticAttribs ? cd->proStaticAttribs->count() : 0)+
(cd->priTypes ? cd->priTypes->count() : 0)+
(cd->priMethods ? cd->priMethods->count() : 0)+
(cd->priAttribs ? cd->priAttribs->count() : 0)+
(cd->priSlots ? cd->priSlots->count() : 0)+
(cd->priStaticMethods ? cd->priStaticMethods->count() : 0)+
(cd->priStaticAttribs ? cd->priStaticAttribs->count() : 0)+
(cd->friends ? cd->friends->count() : 0)+
(cd->related ? cd->related->count() : 0);
if (numMembers>0) if (numMembers>0)
{ {
generateDEFClassSection(cd,t,cd->pubTypes,"public-type"); generateDEFClassSection(cd,t,cd->getMemberList(MemberList::pubTypes),"public-type");
generateDEFClassSection(cd,t,cd->pubMethods,"public-func"); generateDEFClassSection(cd,t,cd->getMemberList(MemberList::pubMethods),"public-func");
generateDEFClassSection(cd,t,cd->pubAttribs,"public-attrib"); generateDEFClassSection(cd,t,cd->getMemberList(MemberList::pubAttribs),"public-attrib");
generateDEFClassSection(cd,t,cd->pubSlots,"public-slot"); generateDEFClassSection(cd,t,cd->getMemberList(MemberList::pubSlots),"public-slot");
generateDEFClassSection(cd,t,cd->signals,"signal"); generateDEFClassSection(cd,t,cd->getMemberList(MemberList::signals),"signal");
generateDEFClassSection(cd,t,cd->dcopMethods,"dcop-func"); generateDEFClassSection(cd,t,cd->getMemberList(MemberList::dcopMethods),"dcop-func");
generateDEFClassSection(cd,t,cd->properties,"property"); generateDEFClassSection(cd,t,cd->getMemberList(MemberList::properties),"property");
generateDEFClassSection(cd,t,cd->pubStaticMethods,"public-static-func"); generateDEFClassSection(cd,t,cd->getMemberList(MemberList::pubStaticMethods),"public-static-func");
generateDEFClassSection(cd,t,cd->pubStaticAttribs,"public-static-attrib"); generateDEFClassSection(cd,t,cd->getMemberList(MemberList::pubStaticAttribs),"public-static-attrib");
generateDEFClassSection(cd,t,cd->proTypes,"protected-type"); generateDEFClassSection(cd,t,cd->getMemberList(MemberList::proTypes),"protected-type");
generateDEFClassSection(cd,t,cd->proMethods,"protected-func"); generateDEFClassSection(cd,t,cd->getMemberList(MemberList::proMethods),"protected-func");
generateDEFClassSection(cd,t,cd->proAttribs,"protected-attrib"); generateDEFClassSection(cd,t,cd->getMemberList(MemberList::proAttribs),"protected-attrib");
generateDEFClassSection(cd,t,cd->proSlots,"protected-slot"); generateDEFClassSection(cd,t,cd->getMemberList(MemberList::proSlots),"protected-slot");
generateDEFClassSection(cd,t,cd->proStaticMethods,"protected-static-func"); generateDEFClassSection(cd,t,cd->getMemberList(MemberList::proStaticMethods),"protected-static-func");
generateDEFClassSection(cd,t,cd->proStaticAttribs,"protected-static-attrib"); generateDEFClassSection(cd,t,cd->getMemberList(MemberList::proStaticAttribs),"protected-static-attrib");
generateDEFClassSection(cd,t,cd->priTypes,"private-type"); generateDEFClassSection(cd,t,cd->getMemberList(MemberList::priTypes),"private-type");
generateDEFClassSection(cd,t,cd->priMethods,"private-func"); generateDEFClassSection(cd,t,cd->getMemberList(MemberList::priMethods),"private-func");
generateDEFClassSection(cd,t,cd->priAttribs,"private-attrib"); generateDEFClassSection(cd,t,cd->getMemberList(MemberList::priAttribs),"private-attrib");
generateDEFClassSection(cd,t,cd->priSlots,"private-slot"); generateDEFClassSection(cd,t,cd->getMemberList(MemberList::priSlots),"private-slot");
generateDEFClassSection(cd,t,cd->priStaticMethods,"private-static-func"); generateDEFClassSection(cd,t,cd->getMemberList(MemberList::priStaticMethods),"private-static-func");
generateDEFClassSection(cd,t,cd->priStaticAttribs,"private-static-attrib"); generateDEFClassSection(cd,t,cd->getMemberList(MemberList::priStaticAttribs),"private-static-attrib");
generateDEFClassSection(cd,t,cd->friends,"signal"); generateDEFClassSection(cd,t,cd->getMemberList(MemberList::friends),"signal");
generateDEFClassSection(cd,t,cd->related,"related"); generateDEFClassSection(cd,t,cd->getMemberList(MemberList::related),"related");
} }
t << " cp-filename = '" << cd->getDefFileName() << "';" << endl; t << " cp-filename = '" << cd->getDefFileName() << "';" << endl;
...@@ -512,12 +499,12 @@ void generateDEFForNamespace(NamespaceDef *nd,QTextStream &t) ...@@ -512,12 +499,12 @@ void generateDEFForNamespace(NamespaceDef *nd,QTextStream &t)
writeDEFString(t,nd->name()); writeDEFString(t,nd->name());
t << ';' << endl; t << ';' << endl;
generateDEFSection(nd,t,&nd->decDefineMembers,"define"); generateDEFSection(nd,t,nd->getMemberList(MemberList::decDefineMembers),"define");
generateDEFSection(nd,t,&nd->decProtoMembers,"prototype"); generateDEFSection(nd,t,nd->getMemberList(MemberList::decProtoMembers),"prototype");
generateDEFSection(nd,t,&nd->decTypedefMembers,"typedef"); generateDEFSection(nd,t,nd->getMemberList(MemberList::decTypedefMembers),"typedef");
generateDEFSection(nd,t,&nd->decEnumMembers,"enum"); generateDEFSection(nd,t,nd->getMemberList(MemberList::decEnumMembers),"enum");
generateDEFSection(nd,t,&nd->decFuncMembers,"func"); generateDEFSection(nd,t,nd->getMemberList(MemberList::decFuncMembers),"func");
generateDEFSection(nd,t,&nd->decVarMembers,"var"); generateDEFSection(nd,t,nd->getMemberList(MemberList::decVarMembers),"var");
t << " ns-filename = '" << nd->getDefFileName() << "';" << endl; t << " ns-filename = '" << nd->getDefFileName() << "';" << endl;
t << " ns-fileline = '" << nd->getDefLine() << "';" << endl; t << " ns-fileline = '" << nd->getDefLine() << "';" << endl;
...@@ -539,12 +526,12 @@ void generateDEFForFile(FileDef *fd,QTextStream &t) ...@@ -539,12 +526,12 @@ void generateDEFForFile(FileDef *fd,QTextStream &t)
writeDEFString(t,fd->name()); writeDEFString(t,fd->name());
t << ';' << endl; t << ';' << endl;
generateDEFSection(fd,t,fd->decDefineMembers,"define"); generateDEFSection(fd,t,fd->getMemberList(MemberList::decDefineMembers),"define");
generateDEFSection(fd,t,fd->decProtoMembers,"prototype"); generateDEFSection(fd,t,fd->getMemberList(MemberList::decProtoMembers),"prototype");
generateDEFSection(fd,t,fd->decTypedefMembers,"typedef"); generateDEFSection(fd,t,fd->getMemberList(MemberList::decTypedefMembers),"typedef");
generateDEFSection(fd,t,fd->decEnumMembers,"enum"); generateDEFSection(fd,t,fd->getMemberList(MemberList::decEnumMembers),"enum");
generateDEFSection(fd,t,fd->decFuncMembers,"func"); generateDEFSection(fd,t,fd->getMemberList(MemberList::decFuncMembers),"func");
generateDEFSection(fd,t,fd->decVarMembers,"var"); generateDEFSection(fd,t,fd->getMemberList(MemberList::decVarMembers),"var");
t << " file-full-name = '" << fd->getDefFileName() << "';" << endl; t << " file-full-name = '" << fd->getDefFileName() << "';" << endl;
t << " file-first-line = '" << fd->getDefLine() << "';" << endl; t << " file-first-line = '" << fd->getDefLine() << "';" << endl;
......
...@@ -46,14 +46,41 @@ static void addToMap(const char *name,Definition *d) ...@@ -46,14 +46,41 @@ static void addToMap(const char *name,Definition *d)
if (index!=-1) symbolName=symbolName.mid(index+2); if (index!=-1) symbolName=symbolName.mid(index+2);
if (!symbolName.isEmpty()) if (!symbolName.isEmpty())
{ {
DefinitionList *dl=Doxygen::symbolMap->find(symbolName); //printf("******* adding symbol `%s' (%p)\n",symbolName.data(),d);
if (dl==0) DefinitionIntf *di=Doxygen::symbolMap->find(symbolName);
//printf(" addToMap(%p): looking for symbol %s: %p\n",d,symbolName.data(),di);
if (di==0) // new Symbol
{ {
dl = new DefinitionList; //printf(" new symbol!\n");
Doxygen::symbolMap->append(symbolName,dl); Doxygen::symbolMap->insert(symbolName,d);
} }
//printf("******* adding symbol `%s' (%p)\n",symbolName.data(),d); else // existing symbol
dl->append(d); {
//printf(" existing symbol: ");
if (di->definitionType()==DefinitionIntf::TypeSymbolList) // already multiple symbols
{
//printf("adding to exiting list\n");
DefinitionList *dl = (DefinitionList*)di;
dl->append(d);
}
else // going from one to two symbols
{
Doxygen::symbolMap->take(symbolName);
DefinitionList *dl = new DefinitionList;
//printf("replacing symbol by list %p with elements %p and %p\n",dl,di,d);
dl->append((Definition*)di);
dl->append(d);
Doxygen::symbolMap->insert(symbolName,dl);
}
}
// auto resize if needed
static int sizeIndex=9;
if (Doxygen::symbolMap->size()>SDict_primes[sizeIndex])
{
Doxygen::symbolMap->resize(SDict_primes[++sizeIndex]);
}
d->setSymbolName(symbolName); d->setSymbolName(symbolName);
} }
} }
...@@ -66,12 +93,26 @@ static void removeFromMap(Definition *d) ...@@ -66,12 +93,26 @@ static void removeFromMap(Definition *d)
if (!symbolName.isEmpty()) if (!symbolName.isEmpty())
{ {
//printf("******* removing symbol `%s' (%p)\n",symbolName.data(),d); //printf("******* removing symbol `%s' (%p)\n",symbolName.data(),d);
DefinitionList *dl=Doxygen::symbolMap->find(symbolName); DefinitionIntf *di=Doxygen::symbolMap->find(symbolName);
if (dl) if (di)
{ {
ASSERT(dl!=0); ASSERT(di!=0);
bool b = dl->removeRef(d); if (di!=d) // symbolName not unique
ASSERT(b==TRUE); {
//printf(" removing from list: %p!\n",di);
DefinitionList *dl = (DefinitionList*)di;
bool b = dl->removeRef(d);
ASSERT(b==TRUE);
if (dl->isEmpty())
{
Doxygen::symbolMap->take(symbolName);
}
}
else // symbolName unique
{
//printf(" removing symbol %p\n",di);
Doxygen::symbolMap->take(symbolName);
}
} }
} }
} }
......
...@@ -54,18 +54,27 @@ struct BodyInfo ...@@ -54,18 +54,27 @@ struct BodyInfo
FileDef *fileDef; // file definition containing the function body FileDef *fileDef; // file definition containing the function body
}; };
/*! The common base class of all entity definitions found in the sources. */ /*! Abstract interface for a Definition or DefinitionList */
class Definition class DefinitionIntf
{ {
public: public:
DefinitionIntf() {}
virtual ~DefinitionIntf() {}
/*! Types of derived classes */ /*! Types of derived classes */
enum DefType enum DefType
{ {
TypeClass, TypeMember, TypeFile, TypeGroup, TypeClass, TypeMember, TypeFile, TypeGroup,
TypeNamespace, TypePackage, TypePage, TypeDir TypeNamespace, TypePackage, TypePage, TypeDir,
TypeSymbolList
}; };
/*! Use this for dynamic inspection of the type of the derived class */ /*! Use this for dynamic inspection of the type of the derived class */
virtual DefType definitionType() const = 0; virtual DefType definitionType() const = 0;
};
/*! The common base class of all entity definitions found in the sources. */
class Definition : public DefinitionIntf
{
public:
/*! Create a new definition */ /*! Create a new definition */
Definition( Definition(
...@@ -76,16 +85,24 @@ class Definition ...@@ -76,16 +85,24 @@ class Definition
/*! Destroys the definition */ /*! Destroys the definition */
virtual ~Definition(); virtual ~Definition();
//-----------------------------------------------------------------------------------
// ---- getters -----
//-----------------------------------------------------------------------------------
/*! Returns the name of the definition */ /*! Returns the name of the definition */
const QCString& name() const { return m_name; } const QCString& name() const { return m_name; }
/*! Returns the local name without any scope qualifiers. */
QCString localName() const;
/*! Returns the base name of the output file that contains this /*! Returns the base name of the output file that contains this
* definition. * definition.
*/ */
virtual QCString qualifiedName(); virtual QCString qualifiedName();
/*! Returns the local name without any scope qualifiers. */ /*! Returns the name of this definition as it appears in the symbol map.
QCString localName() const; */
QCString symbolName() const { return m_symbolName; }
/*! Returns the base file name (without extension) of this definition. /*! Returns the base file name (without extension) of this definition.
* as it is referenced to/written to disk. * as it is referenced to/written to disk.
...@@ -98,15 +115,6 @@ class Definition ...@@ -98,15 +115,6 @@ class Definition
/*! Returns the detailed description of this definition */ /*! Returns the detailed description of this definition */
QCString documentation() const { return m_details ? m_details->doc : QCString(""); } QCString documentation() const { return m_details ? m_details->doc : QCString(""); }
/*! Returns the brief description of this definition */
QCString briefDescription() const { return m_brief ? m_brief->doc : QCString(""); }
/*! Sets a new \a name for the definition */
void setName(const char *name) { m_name=name; }
/*! Sets the documentation of this definition to \a d. */
void setDocumentation(const char *d,const char *docFile,int docLine,bool stripWhiteSpace=TRUE);
/*! Returns the line number at which the detailed documentation was found. */ /*! Returns the line number at which the detailed documentation was found. */
int docLine() const { return m_details ? m_details->line : 1; } int docLine() const { return m_details ? m_details->line : 1; }
...@@ -115,10 +123,8 @@ class Definition ...@@ -115,10 +123,8 @@ class Definition
*/ */
QCString docFile() const { return m_details ? m_details->file : QCString("<"+m_name+">"); } QCString docFile() const { return m_details ? m_details->file : QCString("<"+m_name+">"); }
/*! Sets the brief description of this definition to \a b. /*! Returns the brief description of this definition */
* A dot is added to the sentence if not available. QCString briefDescription() const { return m_brief ? m_brief->doc : QCString(""); }
*/
void setBriefDescription(const char *b,const char *briefFile,int briefLine);
/*! Returns the line number at which the brief description was found. */ /*! Returns the line number at which the brief description was found. */
int briefLine() const { return m_brief ? m_brief->line : 1; } int briefLine() const { return m_brief ? m_brief->line : 1; }
...@@ -166,6 +172,8 @@ class Definition ...@@ -166,6 +172,8 @@ class Definition
virtual bool isVisible() const virtual bool isVisible() const
{ return m_hidden || isLinkable(); } { return m_hidden || isLinkable(); }
bool isHidden() const { return m_hidden; }
/*! If this definition was imported via a tag file, this function /*! If this definition was imported via a tag file, this function
* returns the tagfile for the external project. This can be * returns the tagfile for the external project. This can be
* translated into an external link target via * translated into an external link target via
...@@ -176,12 +184,37 @@ class Definition ...@@ -176,12 +184,37 @@ class Definition
/*! Returns TRUE if this definition is imported via a tag file. */ /*! Returns TRUE if this definition is imported via a tag file. */
virtual bool isReference() const { return !m_ref.isEmpty(); } virtual bool isReference() const { return !m_ref.isEmpty(); }
/*! Sets the tag file id via which this definition was imported. */ int getStartBodyLine() const { return m_body ? m_body->startLine : -1; }
void setReference(const char *r) { m_ref=r; } int getEndBodyLine() const { return m_body ? m_body->endLine : -1; }
FileDef *getBodyDef() { return m_body ? m_body->fileDef : 0; }
/*! Returns the name of this definition as it appears in the symbol map. GroupList *partOfGroups() const { return m_partOfGroups; }
const QList<ListItemInfo> *xrefListItems() const;
virtual Definition *findInnerCompound(const char *name);
virtual Definition *getOuterScope() const { return m_outerScope; }
MemberSDict *getReferencesMembers() const { return m_sourceRefsDict; }
MemberSDict *getReferencedByMembers() const { return m_sourceRefByDict; }
//-----------------------------------------------------------------------------------
// ---- setters -----
//-----------------------------------------------------------------------------------
/*! Sets a new \a name for the definition */
void setName(const char *name) { m_name=name; }
/*! Sets the documentation of this definition to \a d. */
void setDocumentation(const char *d,const char *docFile,int docLine,bool stripWhiteSpace=TRUE);
/*! Sets the brief description of this definition to \a b.
* A dot is added to the sentence if not available.
*/ */
QCString symbolName() const { return m_symbolName; } void setBriefDescription(const char *b,const char *briefFile,int briefLine);
/*! Sets the tag file id via which this definition was imported. */
void setReference(const char *r) { m_ref=r; }
/*! Sets the name of this definition as it should appear in the symbol map. /*! Sets the name of this definition as it should appear in the symbol map.
*/ */
...@@ -192,47 +225,37 @@ class Definition ...@@ -192,47 +225,37 @@ class Definition
*/ */
void addSectionsToDefinition(QList<SectionInfo> *anchorList); void addSectionsToDefinition(QList<SectionInfo> *anchorList);
/*! Writes the documentation anchors of the definition to
* the Doxygen::tagFile stream.
*/
void writeDocAnchorsToTagFile();
bool isHidden() const { return m_hidden; }
// source references // source references
void setBodySegment(int bls,int ble); void setBodySegment(int bls,int ble);
void setBodyDef(FileDef *fd); void setBodyDef(FileDef *fd);
int getStartBodyLine() const { return m_body ? m_body->startLine : -1; }
int getEndBodyLine() const { return m_body ? m_body->endLine : -1; }
FileDef *getBodyDef() { return m_body ? m_body->fileDef : 0; }
void writeSourceDef(OutputList &ol,const char *scopeName);
void writeInlineCode(OutputList &ol,const char *scopeName);
void writeSourceRefs(OutputList &ol,const char *scopeName);
void writeSourceReffedBy(OutputList &ol,const char *scopeName);
void addSourceReferencedBy(MemberDef *d); void addSourceReferencedBy(MemberDef *d);
void addSourceReferences(MemberDef *d); void addSourceReferences(MemberDef *d);
void setRefItems(const QList<ListItemInfo> *sli); void setRefItems(const QList<ListItemInfo> *sli);
void mergeRefItems(Definition *d); void mergeRefItems(Definition *d);
const QList<ListItemInfo> *xrefListItems() const;
virtual Definition *findInnerCompound(const char *name);
virtual Definition *getOuterScope() const { return m_outerScope; }
virtual void addInnerCompound(Definition *d); virtual void addInnerCompound(Definition *d);
virtual void setOuterScope(Definition *d); virtual void setOuterScope(Definition *d);
MemberSDict *getReferencesMembers() const { return m_sourceRefsDict; } void setHidden(bool b) { m_hidden = b; }
MemberSDict *getReferencedByMembers() const { return m_sourceRefByDict; }
void makePartOfGroup(GroupDef *gd); //-----------------------------------------------------------------------------------
GroupList *partOfGroups() const { return m_partOfGroups; } // --- actions ----
QCString convertNameToFile(const char *name,bool allowDots=FALSE) const; //-----------------------------------------------------------------------------------
QCString convertNameToFile(const char *name,bool allowDots=FALSE) const;
void writeSourceDef(OutputList &ol,const char *scopeName);
void writeInlineCode(OutputList &ol,const char *scopeName);
void writeSourceRefs(OutputList &ol,const char *scopeName);
void writeSourceReffedBy(OutputList &ol,const char *scopeName);
void makePartOfGroup(GroupDef *gd);
void writePathFragment(OutputList &ol) const; void writePathFragment(OutputList &ol) const;
void writeNavigationPath(OutputList &ol) const; void writeNavigationPath(OutputList &ol) const;
virtual void writeQuickMemberLinks(OutputList &,MemberDef *) const {} virtual void writeQuickMemberLinks(OutputList &,MemberDef *) const {}
void setHidden(bool b) { m_hidden = b; } /*! Writes the documentation anchors of the definition to
* the Doxygen::tagFile stream.
*/
void writeDocAnchorsToTagFile();
protected: protected:
void setLocalName(const QCString name) { m_localName=name; } void setLocalName(const QCString name) { m_localName=name; }
...@@ -241,7 +264,13 @@ class Definition ...@@ -241,7 +264,13 @@ class Definition
int getXRefListId(const char *listName) const; int getXRefListId(const char *listName) const;
void writeSourceRefList(OutputList &ol,const char *scopeName, void writeSourceRefList(OutputList &ol,const char *scopeName,
const QCString &text,MemberSDict *members,bool); const QCString &text,MemberSDict *members,bool);
//-----------------------------------------------------------------------------------
// --- member variables
//-----------------------------------------------------------------------------------
SectionDict *m_sectionDict; // dictionary of all sections SectionDict *m_sectionDict; // dictionary of all sections
MemberSDict *m_sourceRefByDict; MemberSDict *m_sourceRefByDict;
MemberSDict *m_sourceRefsDict; MemberSDict *m_sourceRefsDict;
...@@ -271,10 +300,11 @@ class Definition ...@@ -271,10 +300,11 @@ class Definition
QCString m_defFileExt; QCString m_defFileExt;
}; };
class DefinitionList : public QList<Definition> class DefinitionList : public QList<Definition>, public DefinitionIntf
{ {
public: public:
~DefinitionList() {} ~DefinitionList() {}
DefType definitionType() const { return TypeSymbolList; }
int compareItems(GCI item1,GCI item2) int compareItems(GCI item1,GCI item2)
{ {
return stricmp(((Definition *)item1)->name(), return stricmp(((Definition *)item1)->name(),
......
...@@ -70,8 +70,6 @@ class DirDef : public Definition ...@@ -70,8 +70,6 @@ class DirDef : public Definition
void writeDetailedDocumentation(OutputList &ol); void writeDetailedDocumentation(OutputList &ol);
void writeDocumentation(OutputList &ol); void writeDocumentation(OutputList &ol);
void writeDepGraph(QTextStream &t); void writeDepGraph(QTextStream &t);
//void writePathFragment(OutputList &ol) const;
//void writeNavigationPath(OutputList &ol);
static DirDef *mergeDirectoryInTree(const QCString &path); static DirDef *mergeDirectoryInTree(const QCString &path);
bool visited; bool visited;
......
...@@ -3582,6 +3582,31 @@ void DocSimpleSect::appendLinkWord(const QString &word) ...@@ -3582,6 +3582,31 @@ void DocSimpleSect::appendLinkWord(const QString &word)
g_inSeeBlock=FALSE; g_inSeeBlock=FALSE;
} }
QCString DocSimpleSect::typeString() const
{
switch (m_type)
{
case Unknown: break;
case See: return "see";
case Return: return "return";
case Author: // fall through
case Authors: return "author";
case Version: return "version";
case Since: return "since";
case Date: return "date";
case Note: return "note";
case Warning: return "warning";
case Pre: return "pre";
case Post: return "post";
case Invar: return "invariant";
case Remark: return "remark";
case Attention: return "attention";
case User: return "user";
case Rcs: return "rcs";
}
return "unknown";
}
//-------------------------------------------------------------------------- //--------------------------------------------------------------------------
int DocParamList::parse(const QString &cmdName) int DocParamList::parse(const QString &cmdName)
......
...@@ -915,6 +915,7 @@ class DocSimpleSect : public CompAccept<DocSimpleSect>, public DocNode ...@@ -915,6 +915,7 @@ class DocSimpleSect : public CompAccept<DocSimpleSect>, public DocNode
virtual ~DocSimpleSect(); virtual ~DocSimpleSect();
Kind kind() const { return Kind_SimpleSect; } Kind kind() const { return Kind_SimpleSect; }
Type type() const { return m_type; } Type type() const { return m_type; }
QCString typeString() const;
DocNode *parent() const { return m_parent; } DocNode *parent() const { return m_parent; }
void accept(DocVisitor *v); void accept(DocVisitor *v);
int parse(bool userTitle); int parse(bool userTitle);
......
...@@ -629,29 +629,29 @@ void DotNode::writeBox(QTextStream &t, ...@@ -629,29 +629,29 @@ void DotNode::writeBox(QTextStream &t,
{ {
t << "{" << convertLabel(m_label); t << "{" << convertLabel(m_label);
t << "\\n|"; t << "\\n|";
writeBoxMemberList(t,'+',m_classDef->pubAttribs,m_classDef); writeBoxMemberList(t,'+',m_classDef->getMemberList(MemberList::pubAttribs),m_classDef);
writeBoxMemberList(t,'+',m_classDef->pubStaticAttribs,m_classDef); writeBoxMemberList(t,'+',m_classDef->getMemberList(MemberList::pubStaticAttribs),m_classDef);
writeBoxMemberList(t,'~',m_classDef->pacAttribs,m_classDef); writeBoxMemberList(t,'~',m_classDef->getMemberList(MemberList::pacAttribs),m_classDef);
writeBoxMemberList(t,'~',m_classDef->pacStaticAttribs,m_classDef); writeBoxMemberList(t,'~',m_classDef->getMemberList(MemberList::pacStaticAttribs),m_classDef);
writeBoxMemberList(t,'#',m_classDef->proAttribs,m_classDef); writeBoxMemberList(t,'#',m_classDef->getMemberList(MemberList::proAttribs),m_classDef);
writeBoxMemberList(t,'#',m_classDef->proStaticAttribs,m_classDef); writeBoxMemberList(t,'#',m_classDef->getMemberList(MemberList::proStaticAttribs),m_classDef);
writeBoxMemberList(t,'-',m_classDef->priAttribs,m_classDef); writeBoxMemberList(t,'-',m_classDef->getMemberList(MemberList::priAttribs),m_classDef);
writeBoxMemberList(t,'-',m_classDef->priStaticAttribs,m_classDef); writeBoxMemberList(t,'-',m_classDef->getMemberList(MemberList::priStaticAttribs),m_classDef);
t << "|"; t << "|";
writeBoxMemberList(t,'+',m_classDef->pubMethods,m_classDef); writeBoxMemberList(t,'+',m_classDef->getMemberList(MemberList::pubMethods),m_classDef);
writeBoxMemberList(t,'+',m_classDef->pubStaticMethods,m_classDef); writeBoxMemberList(t,'+',m_classDef->getMemberList(MemberList::pubStaticMethods),m_classDef);
writeBoxMemberList(t,'+',m_classDef->pubSlots,m_classDef); writeBoxMemberList(t,'+',m_classDef->getMemberList(MemberList::pubSlots),m_classDef);
writeBoxMemberList(t,'~',m_classDef->pacMethods,m_classDef); writeBoxMemberList(t,'~',m_classDef->getMemberList(MemberList::pacMethods),m_classDef);
writeBoxMemberList(t,'~',m_classDef->pacStaticMethods,m_classDef); writeBoxMemberList(t,'~',m_classDef->getMemberList(MemberList::pacStaticMethods),m_classDef);
writeBoxMemberList(t,'#',m_classDef->proMethods,m_classDef); writeBoxMemberList(t,'#',m_classDef->getMemberList(MemberList::proMethods),m_classDef);
writeBoxMemberList(t,'#',m_classDef->proStaticMethods,m_classDef); writeBoxMemberList(t,'#',m_classDef->getMemberList(MemberList::proStaticMethods),m_classDef);
writeBoxMemberList(t,'#',m_classDef->proSlots,m_classDef); writeBoxMemberList(t,'#',m_classDef->getMemberList(MemberList::proSlots),m_classDef);
writeBoxMemberList(t,'-',m_classDef->priMethods,m_classDef); writeBoxMemberList(t,'-',m_classDef->getMemberList(MemberList::priMethods),m_classDef);
writeBoxMemberList(t,'-',m_classDef->priStaticMethods,m_classDef); writeBoxMemberList(t,'-',m_classDef->getMemberList(MemberList::priStaticMethods),m_classDef);
writeBoxMemberList(t,'-',m_classDef->priSlots,m_classDef); writeBoxMemberList(t,'-',m_classDef->getMemberList(MemberList::priSlots),m_classDef);
if (m_classDef->memberGroupSDict) if (m_classDef->getMemberGroupSDict())
{ {
MemberGroupSDict::Iterator mgdi(*m_classDef->memberGroupSDict); MemberGroupSDict::Iterator mgdi(*m_classDef->getMemberGroupSDict());
MemberGroup *mg; MemberGroup *mg;
for (mgdi.toFirst();(mg=mgdi.current());++mgdi) for (mgdi.toFirst();(mg=mgdi.current());++mgdi)
{ {
...@@ -2774,7 +2774,7 @@ void DotGroupCollaboration::buildGraph(GroupDef* gd,int) ...@@ -2774,7 +2774,7 @@ void DotGroupCollaboration::buildGraph(GroupDef* gd,int)
// Write collaboration // Write collaboration
// Add members // Add members
addMemberList( gd->getMembers() ); addMemberList( gd->getMemberList(MemberList::allMembersList) );
// Add classes // Add classes
if ( gd->getClasses() && gd->getClasses()->count() ) if ( gd->getClasses() && gd->getClasses()->count() )
......
...@@ -27,6 +27,7 @@ ...@@ -27,6 +27,7 @@
#include <stdlib.h> #include <stdlib.h>
#include <sys/stat.h> #include <sys/stat.h>
#include <qtextcodec.h> #include <qtextcodec.h>
#include <unistd.h>
#include "version.h" #include "version.h"
#include "doxygen.h" #include "doxygen.h"
...@@ -66,6 +67,7 @@ ...@@ -66,6 +67,7 @@
#include "parserintf.h" #include "parserintf.h"
#include "htags.h" #include "htags.h"
#include "pyscanner.h" #include "pyscanner.h"
#include "code.h"
#define RECURSE_ENTRYTREE(func,var) \ #define RECURSE_ENTRYTREE(func,var) \
...@@ -125,7 +127,7 @@ bool Doxygen::parseSourcesNeeded = FALSE; ...@@ -125,7 +127,7 @@ bool Doxygen::parseSourcesNeeded = FALSE;
double Doxygen::sysElapsedTime = 0.0; double Doxygen::sysElapsedTime = 0.0;
QTime Doxygen::runningTime; QTime Doxygen::runningTime;
SearchIndex * Doxygen::searchIndex=0; SearchIndex * Doxygen::searchIndex=0;
SDict<DefinitionList> *Doxygen::symbolMap; QDict<DefinitionIntf> *Doxygen::symbolMap;
bool Doxygen::outputToWizard=FALSE; bool Doxygen::outputToWizard=FALSE;
QDict<int> * Doxygen::htmlDirMap = 0; QDict<int> * Doxygen::htmlDirMap = 0;
QCache<LookupInfo> Doxygen::lookupCache(50000,50000); QCache<LookupInfo> Doxygen::lookupCache(50000,50000);
...@@ -1406,7 +1408,9 @@ static void findUsingDirectives(EntryNav *rootNav) ...@@ -1406,7 +1408,9 @@ static void findUsingDirectives(EntryNav *rootNav)
// see if the using statement was found inside a namespace or inside // see if the using statement was found inside a namespace or inside
// the global file scope. // the global file scope.
if (rootNav->parent() && rootNav->parent()->section() == Entry::NAMESPACE_SEC) if (rootNav->parent() && rootNav->parent()->section()==Entry::NAMESPACE_SEC &&
(fd==0 || fd->name().right(5)!=".java") // not a .java file
)
{ {
nsName=stripAnonymousNamespaceScope(rootNav->parent()->name()); nsName=stripAnonymousNamespaceScope(rootNav->parent()->name());
if (!nsName.isEmpty()) if (!nsName.isEmpty())
...@@ -1582,8 +1586,13 @@ static void findUsingDeclarations(EntryNav *rootNav) ...@@ -1582,8 +1586,13 @@ static void findUsingDeclarations(EntryNav *rootNav)
// file scope). // file scope).
QCString name = substitute(root->name,".","::"); QCString name = substitute(root->name,".","::");
MemberDef *mtd=0; //MemberDef *mtd=0;
usingCd = getResolvedClass(nd,fd,name,&mtd); //usingCd = getResolvedClass(nd,fd,name,&mtd);
usingCd = getClass(name);
if (usingCd==0)
{
usingCd = Doxygen::hiddenClasses.find(name);
}
//printf("%s -> %p\n",root->name.data(),usingCd); //printf("%s -> %p\n",root->name.data(),usingCd);
if (usingCd==0) // definition not in the input => add an artificial class if (usingCd==0) // definition not in the input => add an artificial class
...@@ -1592,7 +1601,7 @@ static void findUsingDeclarations(EntryNav *rootNav) ...@@ -1592,7 +1601,7 @@ static void findUsingDeclarations(EntryNav *rootNav)
name.data(),root->section,root->tArgLists ? (int)root->tArgLists->count() : -1); name.data(),root->section,root->tArgLists ? (int)root->tArgLists->count() : -1);
usingCd = new ClassDef( usingCd = new ClassDef(
"<using>",1, "<using>",1,
root->name,ClassDef::Class); name,ClassDef::Class);
Doxygen::hiddenClasses.append(root->name,usingCd); Doxygen::hiddenClasses.append(root->name,usingCd);
usingCd->setClassIsArtificial(); usingCd->setClassIsArtificial();
} }
...@@ -1602,6 +1611,7 @@ static void findUsingDeclarations(EntryNav *rootNav) ...@@ -1602,6 +1611,7 @@ static void findUsingDeclarations(EntryNav *rootNav)
usingCd->name().data(),nd?nd->name().data():fd->name().data()); usingCd->name().data(),nd?nd->name().data():fd->name().data());
} }
#if 0
if (mtd) // add the typedef to the correct scope if (mtd) // add the typedef to the correct scope
{ {
if (nd) if (nd)
...@@ -1615,7 +1625,9 @@ static void findUsingDeclarations(EntryNav *rootNav) ...@@ -1615,7 +1625,9 @@ static void findUsingDeclarations(EntryNav *rootNav)
fd->addUsingDeclaration(mtd); fd->addUsingDeclaration(mtd);
} }
} }
else if (usingCd) // add the class to the correct scope else
#endif
if (usingCd) // add the class to the correct scope
{ {
if (nd) if (nd)
{ {
...@@ -2371,8 +2383,9 @@ static void buildVarList(EntryNav *rootNav) ...@@ -2371,8 +2383,9 @@ static void buildVarList(EntryNav *rootNav)
scope=root->relates; scope=root->relates;
} }
// note: changed from scope to classScope on 2-10-2005 cd=getClass(scope);
if (!classScope.isEmpty() && !name.isEmpty() && (cd=getClass(classScope))) if (cd==0 && classScope!=scope) cd=getClass(classScope);
if (cd)
{ {
MemberDef *md=0; MemberDef *md=0;
...@@ -4946,7 +4959,9 @@ static void findMember(EntryNav *rootNav, ...@@ -4946,7 +4959,9 @@ static void findMember(EntryNav *rootNav,
} }
if (root->relates.isEmpty() && rootNav->parent() && if (root->relates.isEmpty() && rootNav->parent() &&
(rootNav->parent()->section()&Entry::SCOPE_MASK) && ((rootNav->parent()->section()&Entry::SCOPE_MASK) ||
(rootNav->parent()->section()==Entry::OBJCIMPL_SEC)
) &&
!rootNav->parent()->name().isEmpty()) // see if we can combine scopeName !rootNav->parent()->name().isEmpty()) // see if we can combine scopeName
// with the scope in which it was found // with the scope in which it was found
{ {
...@@ -5373,6 +5388,7 @@ static void findMember(EntryNav *rootNav, ...@@ -5373,6 +5388,7 @@ static void findMember(EntryNav *rootNav,
mn->append(md); mn->append(md);
cd->insertMember(md); cd->insertMember(md);
md->setRefItems(root->sli); md->setRefItems(root->sli);
delete tArgList;
} }
else else
{ {
...@@ -5711,6 +5727,7 @@ static void filterMemberDocumentation(EntryNav *rootNav) ...@@ -5711,6 +5727,7 @@ static void filterMemberDocumentation(EntryNav *rootNav)
"findMemberDocumentation(): root->type=`%s' root->inside=`%s' root->name=`%s' root->args=`%s' section=%x root->memSpec=%d root->mGrpId=%d\n", "findMemberDocumentation(): root->type=`%s' root->inside=`%s' root->name=`%s' root->args=`%s' section=%x root->memSpec=%d root->mGrpId=%d\n",
root->type.data(),root->inside.data(),root->name.data(),root->args.data(),root->section,root->memSpec,root->mGrpId root->type.data(),root->inside.data(),root->name.data(),root->args.data(),root->section,root->memSpec,root->mGrpId
); );
//printf("rootNav->parent()->name()=%s\n",rootNav->parent()->name().data());
bool isFunc=TRUE; bool isFunc=TRUE;
if (root->relatesDup && !root->relates.isEmpty()) if (root->relatesDup && !root->relates.isEmpty())
...@@ -7426,7 +7443,7 @@ static void generateNamespaceDocs() ...@@ -7426,7 +7443,7 @@ static void generateNamespaceDocs()
nd->writeDocumentation(*outputList); nd->writeDocumentation(*outputList);
} }
// for each class in the namespace... // for each class in the namespace...
ClassSDict::Iterator cli(*nd->classSDict); ClassSDict::Iterator cli(*nd->getClassSDict());
for ( ; cli.current() ; ++cli ) for ( ; cli.current() ; ++cli )
{ {
ClassDef *cd=cli.current(); ClassDef *cd=cli.current();
...@@ -8267,8 +8284,8 @@ void initDoxygen() ...@@ -8267,8 +8284,8 @@ void initDoxygen()
setlocale(LC_ALL,""); setlocale(LC_ALL,"");
setlocale(LC_NUMERIC,"C"); setlocale(LC_NUMERIC,"C");
#endif #endif
Doxygen::symbolMap = new SDict<DefinitionList>(1000); Doxygen::symbolMap = new QDict<DefinitionIntf>(1000);
Doxygen::symbolMap->setAutoDelete(TRUE); //Doxygen::symbolMap->setAutoDelete(TRUE);
Doxygen::globalScope = new NamespaceDef("<globalScope>",1,"<globalScope>"); Doxygen::globalScope = new NamespaceDef("<globalScope>",1,"<globalScope>");
Doxygen::runningTime.start(); Doxygen::runningTime.start();
...@@ -8315,6 +8332,26 @@ void cleanUpDoxygen() ...@@ -8315,6 +8332,26 @@ void cleanUpDoxygen()
delete theTranslator; delete theTranslator;
delete outputList; delete outputList;
Mappers::freeMappers(); Mappers::freeMappers();
codeFreeScanner();
// iterate through Doxygen::symbolMap and delete all
// DefinitionList objects, since they have no owner
QDictIterator<DefinitionIntf> dli(*Doxygen::symbolMap);
DefinitionIntf *di;
for (dli.toFirst();(di=dli.current());)
{
if (di->definitionType()==DefinitionIntf::TypeSymbolList)
{
DefinitionIntf *tmp = Doxygen::symbolMap->take(dli.currentKey());
delete (DefinitionList *)tmp;
}
else
{
++dli;
}
}
//delete Doxygen::symbolMap; <- we cannot do this unless all static lists //delete Doxygen::symbolMap; <- we cannot do this unless all static lists
// (such as Doxygen::namespaceSDict) // (such as Doxygen::namespaceSDict)
// with objects based on Definition are made // with objects based on Definition are made
...@@ -8595,6 +8632,14 @@ void readConfiguration(int argc, char **argv) ...@@ -8595,6 +8632,14 @@ void readConfiguration(int argc, char **argv)
cleanUpDoxygen(); cleanUpDoxygen();
exit(0); exit(0);
} }
/* Perlmod wants to know the path to the config file.*/
QFileInfo configFileInfo(configName);
setPerlModDoxyfile(configFileInfo.absFilePath());
}
void checkConfiguration()
{
Config::instance()->substituteEnvironmentVars(); Config::instance()->substituteEnvironmentVars();
Config::instance()->convertStrToVal(); Config::instance()->convertStrToVal();
...@@ -8620,9 +8665,6 @@ void readConfiguration(int argc, char **argv) ...@@ -8620,9 +8665,6 @@ void readConfiguration(int argc, char **argv)
/* Set the global html file extension. */ /* Set the global html file extension. */
Doxygen::htmlFileExtension = Config_getString("HTML_FILE_EXTENSION"); Doxygen::htmlFileExtension = Config_getString("HTML_FILE_EXTENSION");
/* Perlmod wants to know the path to the config file.*/
QFileInfo configFileInfo(configName);
setPerlModDoxyfile(configFileInfo.absFilePath());
Doxygen::xrefLists->setAutoDelete(TRUE); Doxygen::xrefLists->setAutoDelete(TRUE);
...@@ -8941,6 +8983,16 @@ void parseInput() ...@@ -8941,6 +8983,16 @@ void parseInput()
exit(1); exit(1);
} }
// we are done with input scanning now, so free up the buffers used by flex
// (can be around 4MB)
preFreeScanner();
scanFreeScanner();
pyscanFreeScanner();
//delete rootNav;
//g_storage.close();
//exit(1);
/************************************************************************** /**************************************************************************
* Gather information * * Gather information *
**************************************************************************/ **************************************************************************/
......
...@@ -110,7 +110,7 @@ class Doxygen ...@@ -110,7 +110,7 @@ class Doxygen
static double sysElapsedTime; static double sysElapsedTime;
static QTime runningTime; static QTime runningTime;
static SearchIndex *searchIndex; static SearchIndex *searchIndex;
static SDict<DefinitionList> *symbolMap; static QDict<DefinitionIntf> *symbolMap;
static bool outputToWizard; static bool outputToWizard;
static QDict<int> *htmlDirMap; static QDict<int> *htmlDirMap;
static QCache<LookupInfo> lookupCache; static QCache<LookupInfo> lookupCache;
...@@ -122,6 +122,7 @@ class Doxygen ...@@ -122,6 +122,7 @@ class Doxygen
void initDoxygen(); void initDoxygen();
void readConfiguration(int argc, char **argv); void readConfiguration(int argc, char **argv);
void checkConfiguration();
void parseInput(); void parseInput();
void generateOutput(); void generateOutput();
......
...@@ -24,6 +24,7 @@ int Entry::num=0; ...@@ -24,6 +24,7 @@ int Entry::num=0;
Entry::Entry() Entry::Entry()
{ {
//printf("Entry::Entry(%p)\n",this);
num++; num++;
m_parent=0; m_parent=0;
section = EMPTY_SEC; section = EMPTY_SEC;
...@@ -33,7 +34,7 @@ Entry::Entry() ...@@ -33,7 +34,7 @@ Entry::Entry()
extends->setAutoDelete(TRUE); extends->setAutoDelete(TRUE);
groups = new QList<Grouping>; groups = new QList<Grouping>;
groups->setAutoDelete(TRUE); groups->setAutoDelete(TRUE);
anchors = new QList<SectionInfo>; anchors = new QList<SectionInfo>; // Doxygen::sectionDict takes ownership of the items!
argList = new ArgumentList; argList = new ArgumentList;
argList->setAutoDelete(TRUE); argList->setAutoDelete(TRUE);
//printf("Entry::Entry() tArgList=0\n"); //printf("Entry::Entry() tArgList=0\n");
...@@ -49,6 +50,7 @@ Entry::Entry() ...@@ -49,6 +50,7 @@ Entry::Entry()
Entry::Entry(const Entry &e) Entry::Entry(const Entry &e)
{ {
//printf("Entry::Entry(%p):copy\n",this);
num++; num++;
section = e.section; section = e.section;
protection = e.protection; protection = e.protection;
...@@ -171,17 +173,17 @@ Entry::Entry(const Entry &e) ...@@ -171,17 +173,17 @@ Entry::Entry(const Entry &e)
Entry::~Entry() Entry::~Entry()
{ {
//printf("Entry::~Entry(%p) num=%d\n",this,num);
//printf("Deleting entry %d name %s type %x children %d\n", //printf("Deleting entry %d name %s type %x children %d\n",
// num,name.data(),section,sublist->count()); // num,name.data(),section,sublist->count());
//delete sublist; // each element is now own by a EntryNav so we do no longer own delete m_sublist; // each element is now own by a EntryNav so we do no longer own
// our children. // our children.
delete extends; delete extends;
delete groups; delete groups;
delete anchors; delete anchors;
delete argList; delete argList;
delete tArgLists; delete tArgLists;
//delete mtArgList;
delete tagInfo; delete tagInfo;
delete sli; delete sli;
num--; num--;
...@@ -200,6 +202,7 @@ void Entry::addSubEntry(Entry *current) ...@@ -200,6 +202,7 @@ void Entry::addSubEntry(Entry *current)
void Entry::reset() void Entry::reset()
{ {
//printf("Entry::reset()\n");
name.resize(0); name.resize(0);
type.resize(0); type.resize(0);
args.resize(0); args.resize(0);
...@@ -273,12 +276,14 @@ void Entry::createSubtreeIndex(EntryNav *nav,QFile &storage,FileDef *fd) ...@@ -273,12 +276,14 @@ void Entry::createSubtreeIndex(EntryNav *nav,QFile &storage,FileDef *fd)
{ {
childNode->createSubtreeIndex(childNav,storage,fd); childNode->createSubtreeIndex(childNav,storage,fd);
} }
//m_sublist->setAutoDelete(FALSE);
m_sublist->clear(); m_sublist->clear();
} }
} }
void Entry::createNavigationIndex(EntryNav *rootNav,QFile &storage,FileDef *fd) void Entry::createNavigationIndex(EntryNav *rootNav,QFile &storage,FileDef *fd)
{ {
//printf("createNavigationIndex(%p) sublist=%p\n",this,m_sublist);
if (m_sublist) if (m_sublist)
{ {
//printf("saveEntries: %d children\n",root->sublist->count()); //printf("saveEntries: %d children\n",root->sublist->count());
...@@ -290,6 +295,7 @@ void Entry::createNavigationIndex(EntryNav *rootNav,QFile &storage,FileDef *fd) ...@@ -290,6 +295,7 @@ void Entry::createNavigationIndex(EntryNav *rootNav,QFile &storage,FileDef *fd)
createSubtreeIndex(rootNav,storage,fd); createSubtreeIndex(rootNav,storage,fd);
} }
// remove all entries from root // remove all entries from root
//m_sublist->setAutoDelete(FALSE);
m_sublist->clear(); m_sublist->clear();
} }
} }
...@@ -535,6 +541,7 @@ ArgumentList *unmarshalArgumentList(QFile &f) ...@@ -535,6 +541,7 @@ ArgumentList *unmarshalArgumentList(QFile &f)
uint count = unmarshalUInt(f); uint count = unmarshalUInt(f);
if (count==NULL_LIST) return 0; // null list if (count==NULL_LIST) return 0; // null list
ArgumentList *result = new ArgumentList; ArgumentList *result = new ArgumentList;
result->setAutoDelete(TRUE);
//printf("unmarshalArgumentList: %d\n",count); //printf("unmarshalArgumentList: %d\n",count);
for (i=0;i<count;i++) for (i=0;i<count;i++)
{ {
...@@ -560,6 +567,7 @@ QList<ArgumentList> *unmarshalArgumentLists(QFile &f) ...@@ -560,6 +567,7 @@ QList<ArgumentList> *unmarshalArgumentLists(QFile &f)
uint count = unmarshalUInt(f); uint count = unmarshalUInt(f);
if (count==NULL_LIST) return 0; // null list if (count==NULL_LIST) return 0; // null list
QList<ArgumentList> *result = new QList<ArgumentList>; QList<ArgumentList> *result = new QList<ArgumentList>;
result->setAutoDelete(TRUE);
//printf("unmarshalArgumentLists: %d\n",count); //printf("unmarshalArgumentLists: %d\n",count);
for (i=0;i<count;i++) for (i=0;i<count;i++)
{ {
...@@ -574,6 +582,7 @@ QList<BaseInfo> *unmarshalBaseInfoList(QFile &f) ...@@ -574,6 +582,7 @@ QList<BaseInfo> *unmarshalBaseInfoList(QFile &f)
uint count = unmarshalUInt(f); uint count = unmarshalUInt(f);
if (count==NULL_LIST) return 0; // null list if (count==NULL_LIST) return 0; // null list
QList<BaseInfo> *result = new QList<BaseInfo>; QList<BaseInfo> *result = new QList<BaseInfo>;
result->setAutoDelete(TRUE);
for (i=0;i<count;i++) for (i=0;i<count;i++)
{ {
QCString name = unmarshalQCString(f); QCString name = unmarshalQCString(f);
...@@ -590,6 +599,7 @@ QList<Grouping> *unmarshalGroupingList(QFile &f) ...@@ -590,6 +599,7 @@ QList<Grouping> *unmarshalGroupingList(QFile &f)
uint count = unmarshalUInt(f); uint count = unmarshalUInt(f);
if (count==NULL_LIST) return 0; // null list if (count==NULL_LIST) return 0; // null list
QList<Grouping> *result = new QList<Grouping>; QList<Grouping> *result = new QList<Grouping>;
result->setAutoDelete(TRUE);
for (i=0;i<count;i++) for (i=0;i<count;i++)
{ {
QCString name = unmarshalQCString(f); QCString name = unmarshalQCString(f);
...@@ -605,6 +615,7 @@ QList<SectionInfo> *unmarshalSectionInfoList(QFile &f) ...@@ -605,6 +615,7 @@ QList<SectionInfo> *unmarshalSectionInfoList(QFile &f)
uint count = unmarshalUInt(f); uint count = unmarshalUInt(f);
if (count==NULL_LIST) return 0; // null list if (count==NULL_LIST) return 0; // null list
QList<SectionInfo> *result = new QList<SectionInfo>; QList<SectionInfo> *result = new QList<SectionInfo>;
result->setAutoDelete(TRUE);
for (i=0;i<count;i++) for (i=0;i<count;i++)
{ {
QCString label = unmarshalQCString(f); QCString label = unmarshalQCString(f);
...@@ -623,6 +634,7 @@ QList<ListItemInfo> *unmarshalItemInfoList(QFile &f) ...@@ -623,6 +634,7 @@ QList<ListItemInfo> *unmarshalItemInfoList(QFile &f)
uint count = unmarshalUInt(f); uint count = unmarshalUInt(f);
if (count==NULL_LIST) return 0; // null list if (count==NULL_LIST) return 0; // null list
QList<ListItemInfo> *result = new QList<ListItemInfo>; QList<ListItemInfo> *result = new QList<ListItemInfo>;
result->setAutoDelete(TRUE);
for (i=0;i<count;i++) for (i=0;i<count;i++)
{ {
ListItemInfo *lii = new ListItemInfo; ListItemInfo *lii = new ListItemInfo;
...@@ -710,6 +722,7 @@ bool loadEntry(Entry *e,QFile &f) ...@@ -710,6 +722,7 @@ bool loadEntry(Entry *e,QFile &f)
e->virt = (Specifier)unmarshalInt(f); e->virt = (Specifier)unmarshalInt(f);
e->args = unmarshalQCString(f); e->args = unmarshalQCString(f);
e->bitfields = unmarshalQCString(f); e->bitfields = unmarshalQCString(f);
delete e->argList;
e->argList = unmarshalArgumentList(f); e->argList = unmarshalArgumentList(f);
e->tArgLists = unmarshalArgumentLists(f); e->tArgLists = unmarshalArgumentLists(f);
e->program = unmarshalQCString(f); e->program = unmarshalQCString(f);
...@@ -734,8 +747,11 @@ bool loadEntry(Entry *e,QFile &f) ...@@ -734,8 +747,11 @@ bool loadEntry(Entry *e,QFile &f)
e->bodyLine = unmarshalInt(f); e->bodyLine = unmarshalInt(f);
e->endBodyLine = unmarshalInt(f); e->endBodyLine = unmarshalInt(f);
e->mGrpId = unmarshalInt(f); e->mGrpId = unmarshalInt(f);
delete e->extends;
e->extends = unmarshalBaseInfoList(f); e->extends = unmarshalBaseInfoList(f);
delete e->groups;
e->groups = unmarshalGroupingList(f); e->groups = unmarshalGroupingList(f);
delete e->anchors;
e->anchors = unmarshalSectionInfoList(f); e->anchors = unmarshalSectionInfoList(f);
e->fileName = unmarshalQCString(f); e->fileName = unmarshalQCString(f);
e->startLine = unmarshalInt(f); e->startLine = unmarshalInt(f);
...@@ -832,8 +848,8 @@ void EntryNav::releaseEntry() ...@@ -832,8 +848,8 @@ void EntryNav::releaseEntry()
{ {
if (!m_noLoad) if (!m_noLoad)
{ {
delete m_info;
//printf("EntryNav::releaseEntry %p\n",m_info); //printf("EntryNav::releaseEntry %p\n",m_info);
delete m_info;
m_info=0; m_info=0;
} }
} }
......
This diff is collapsed.
...@@ -127,6 +127,8 @@ class FileDef : public Definition ...@@ -127,6 +127,8 @@ class FileDef : public Definition
} }
bool isIncluded(const QCString &name) const; bool isIncluded(const QCString &name) const;
bool isJava() const { return m_isJava; }
void writeDetailedDocumentation(OutputList &ol); void writeDetailedDocumentation(OutputList &ol);
void writeDocumentation(OutputList &ol); void writeDocumentation(OutputList &ol);
void writeMemberDocumentation(OutputList &ol); void writeMemberDocumentation(OutputList &ol);
...@@ -168,9 +170,13 @@ class FileDef : public Definition ...@@ -168,9 +170,13 @@ class FileDef : public Definition
void addListReferences(); void addListReferences();
bool isDocumentationFile() const; bool isDocumentationFile() const;
//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);
MemberList *getMemberList(MemberList::ListType lt) const;
const QList<MemberList> &getMemberLists() const { return m_memberLists; }
#if 0
MemberList *allMemberList; MemberList *allMemberList;
// members in the declaration part of the documentation // members in the declaration part of the documentation
...@@ -188,12 +194,12 @@ class FileDef : public Definition ...@@ -188,12 +194,12 @@ class FileDef : public Definition
MemberList *docEnumMembers; MemberList *docEnumMembers;
MemberList *docFuncMembers; MemberList *docFuncMembers;
MemberList *docVarMembers; MemberList *docVarMembers;
#endif
/* user defined member groups */ /* user defined member groups */
MemberGroupSDict *memberGroupSDict; MemberGroupSDict *getMemberGroupSDict() const { return memberGroupSDict; }
NamespaceSDict *getNamespaceSDict() const { return namespaceSDict; }
NamespaceSDict *namespaceSDict; ClassSDict *getClassSDict() const { return classSDict; }
ClassSDict *classSDict;
bool visited; bool visited;
...@@ -204,6 +210,11 @@ class FileDef : public Definition ...@@ -204,6 +210,11 @@ class FileDef : public Definition
void acquireFileVersion(); void acquireFileVersion();
private: private:
MemberList *createMemberList(MemberList::ListType lt);
void addMemberToList(MemberList::ListType lt,MemberDef *md);
void writeMemberDeclarations(OutputList &ol,MemberList::ListType lt,const QCString &title);
void writeMemberDocumentation(OutputList &ol,MemberList::ListType lt,const QCString &title);
QDict<IncludeInfo> *includeDict; QDict<IncludeInfo> *includeDict;
QList<IncludeInfo> *includeList; QList<IncludeInfo> *includeList;
QDict<IncludeInfo> *includedByDict; QDict<IncludeInfo> *includedByDict;
...@@ -218,9 +229,14 @@ class FileDef : public Definition ...@@ -218,9 +229,14 @@ class FileDef : public Definition
QIntDict<Definition> *srcDefDict; QIntDict<Definition> *srcDefDict;
QIntDict<MemberDef> *srcMemberDict; QIntDict<MemberDef> *srcMemberDict;
bool isSource; bool isSource;
bool m_isJava;
QCString fileVersion; QCString fileVersion;
PackageDef *package; PackageDef *package;
DirDef *dir; DirDef *dir;
QList<MemberList> m_memberLists;
MemberGroupSDict *memberGroupSDict;
NamespaceSDict *namespaceSDict;
ClassSDict *classSDict;
}; };
......
...@@ -107,7 +107,8 @@ void FormulaList::generateBitmaps(const char *path) ...@@ -107,7 +107,8 @@ void FormulaList::generateBitmaps(const char *path)
if (latexCmd.isEmpty()) latexCmd="latex"; if (latexCmd.isEmpty()) latexCmd="latex";
if (iSystem(latexCmd,"_formulas.tex")!=0) if (iSystem(latexCmd,"_formulas.tex")!=0)
{ {
err("Problems running latex. Check your installation or look for typos in _formulas.tex!\n"); err("Problems running latex. Check your installation or look "
"for typos in _formulas.tex and check _formulas.log!\n");
formulaError=TRUE; formulaError=TRUE;
//return; //return;
} }
...@@ -286,7 +287,7 @@ void FormulaList::generateBitmaps(const char *path) ...@@ -286,7 +287,7 @@ void FormulaList::generateBitmaps(const char *path)
} }
// remove intermediate files produced by latex // remove intermediate files produced by latex
thisDir.remove("_formulas.dvi"); thisDir.remove("_formulas.dvi");
thisDir.remove("_formulas.log"); if (!formulaError) thisDir.remove("_formulas.log"); // keep file in case of errors
thisDir.remove("_formulas.aux"); thisDir.remove("_formulas.aux");
} }
// remove the latex file itself // remove the latex file itself
......
This diff is collapsed.
...@@ -92,26 +92,11 @@ class GroupDef : public Definition ...@@ -92,26 +92,11 @@ class GroupDef : public Definition
void setGroupScope(Definition *d) { groupScope = d; } void setGroupScope(Definition *d) { groupScope = d; }
Definition *getGroupScope() const { return groupScope; } Definition *getGroupScope() const { return groupScope; }
// members in the declaration part of the documentation MemberList *getMemberList(MemberList::ListType lt) const;
MemberList decDefineMembers; const QList<MemberList> &getMemberLists() const { return m_memberLists; }
MemberList decProtoMembers;
MemberList decTypedefMembers;
MemberList decEnumMembers;
MemberList decEnumValMembers;
MemberList decFuncMembers;
MemberList decVarMembers;
// members in the documentation part of the documentation
MemberList docDefineMembers;
MemberList docProtoMembers;
MemberList docTypedefMembers;
MemberList docEnumMembers;
MemberList docEnumValMembers;
MemberList docFuncMembers;
MemberList docVarMembers;
/* user defined member groups */ /* user defined member groups */
MemberGroupSDict *memberGroupSDict; MemberGroupSDict *getMemberGroupSDict() const { return memberGroupSDict; }
FileList * getFiles() const { return fileList; } FileList * getFiles() const { return fileList; }
ClassSDict * getClasses() const { return classSDict; } ClassSDict * getClasses() const { return classSDict; }
...@@ -119,12 +104,18 @@ class GroupDef : public Definition ...@@ -119,12 +104,18 @@ class GroupDef : public Definition
GroupList * getSubGroups() const { return groupList; } GroupList * getSubGroups() const { return groupList; }
PageSDict * getPages() const { return pageDict; } PageSDict * getPages() const { return pageDict; }
DirList * getDirs() const { return dirList; } DirList * getDirs() const { return dirList; }
MemberList* getMembers() const { return allMemberList; } //MemberList* getMembers() const { return allMemberList; }
protected: protected:
void addMemberListToGroup(MemberList *,bool (MemberDef::*)() const); void addMemberListToGroup(MemberList *,bool (MemberDef::*)() const);
private: private:
MemberList *createMemberList(MemberList::ListType lt);
void addMemberToList(MemberList::ListType lt,MemberDef *md);
void writeMemberDeclarations(OutputList &ol,MemberList::ListType lt,const QCString &title);
void writeMemberDocumentation(OutputList &ol,MemberList::ListType lt,const QCString &title);
void removeMemberFromList(MemberList::ListType lt,MemberDef *md);
QCString title; // title of the group QCString title; // title of the group
bool titleSet; // true if title is not the same as the name bool titleSet; // true if title is not the same as the name
QCString fileName; // base name of the generated file QCString fileName; // base name of the generated file
...@@ -141,6 +132,9 @@ class GroupDef : public Definition ...@@ -141,6 +132,9 @@ class GroupDef : public Definition
Definition *groupScope; Definition *groupScope;
QList<MemberList> m_memberLists;
MemberGroupSDict *memberGroupSDict;
}; };
class GroupSDict : public SDict<GroupDef> class GroupSDict : public SDict<GroupDef>
......
...@@ -444,7 +444,7 @@ void HtmlDocVisitor::visitPost(DocRoot *) ...@@ -444,7 +444,7 @@ void HtmlDocVisitor::visitPost(DocRoot *)
void HtmlDocVisitor::visitPre(DocSimpleSect *s) void HtmlDocVisitor::visitPre(DocSimpleSect *s)
{ {
if (m_hide) return; if (m_hide) return;
m_t << "<dl compact><dt><b>"; m_t << "<dl class=\"" << s->typeString() << "\" compact><dt><b>";
switch(s->type()) switch(s->type())
{ {
case DocSimpleSect::See: case DocSimpleSect::See:
......
...@@ -222,6 +222,8 @@ class HtmlGenerator : public OutputGenerator ...@@ -222,6 +222,8 @@ class HtmlGenerator : public OutputGenerator
void writeCodeAnchor(const char *anchor) void writeCodeAnchor(const char *anchor)
{ t << "<a name=\"" << anchor << "\"></a>"; } { t << "<a name=\"" << anchor << "\"></a>"; }
void linkableSymbol(int,const char *,Definition *,Definition *) {}
static void writeSearchPage(); static void writeSearchPage();
private: private:
......
...@@ -2637,12 +2637,55 @@ void writeGraphInfo(OutputList &ol) ...@@ -2637,12 +2637,55 @@ void writeGraphInfo(OutputList &ol)
ol.popGeneratorState(); ol.popGeneratorState();
} }
void writeGroupIndexItem(GroupDef *gd,MemberList *ml,const QCString &title,
HtmlHelp *htmlHelp,FTVHelp *ftvHelp)
{
if (ml && ml->count()>0)
{
bool first=TRUE;
MemberDef *md=ml->first();
while (md)
{
if (md->isDetailedSectionVisible(TRUE,FALSE))
{
if (first)
{
first=FALSE;
if (htmlHelp)
{
htmlHelp->addContentsItem(TRUE, convertToHtml(title), gd->getOutputFileBase(),0);
htmlHelp->incContentsDepth();
}
if (ftvHelp)
{
ftvHelp->addContentsItem(TRUE, gd->getReference(), gd->getOutputFileBase(), 0, title);
ftvHelp->incContentsDepth();
}
}
if (htmlHelp)
{
htmlHelp->addContentsItem(FALSE,md->name(),md->getOutputFileBase(),md->anchor());
}
if (ftvHelp)
{
ftvHelp->addContentsItem(FALSE,md->getReference(),md->getOutputFileBase(),md->anchor(),md->name());
}
}
md=ml->next();
}
if (htmlHelp && !first) htmlHelp->decContentsDepth();
if (ftvHelp && !first) ftvHelp->decContentsDepth();
}
}
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
/*! /*!
* write groups as hierarchical trees * write groups as hierarchical trees
* \author KPW * \author KPW
*/ */
void writeGroupTreeNode(OutputList &ol, GroupDef *gd,int level) void writeGroupTreeNode(OutputList &ol, GroupDef *gd,int level)
{ {
HtmlHelp *htmlHelp=0; HtmlHelp *htmlHelp=0;
...@@ -2680,12 +2723,15 @@ void writeGroupTreeNode(OutputList &ol, GroupDef *gd,int level) ...@@ -2680,12 +2723,15 @@ void writeGroupTreeNode(OutputList &ol, GroupDef *gd,int level)
int numSubItems = 0; int numSubItems = 0;
if ( Config_getBool("TOC_EXPAND")) if ( Config_getBool("TOC_EXPAND"))
{ {
numSubItems += gd->docDefineMembers.count(); QListIterator<MemberList> mli(gd->getMemberLists());
numSubItems += gd->docTypedefMembers.count(); MemberList *ml;
numSubItems += gd->docEnumMembers.count(); for (mli.toFirst();(ml=mli.current());++mli)
numSubItems += gd->docFuncMembers.count(); {
numSubItems += gd->docVarMembers.count(); if (ml->listType()&MemberList::documentationLists)
numSubItems += gd->docProtoMembers.count(); {
numSubItems += ml->count();
}
}
numSubItems += gd->namespaceSDict->count(); numSubItems += gd->namespaceSDict->count();
numSubItems += gd->classSDict->count(); numSubItems += gd->classSDict->count();
numSubItems += gd->fileList->count(); numSubItems += gd->fileList->count();
...@@ -2759,6 +2805,20 @@ void writeGroupTreeNode(OutputList &ol, GroupDef *gd,int level) ...@@ -2759,6 +2805,20 @@ void writeGroupTreeNode(OutputList &ol, GroupDef *gd,int level)
if (Config_getBool("TOC_EXPAND")) if (Config_getBool("TOC_EXPAND"))
{ {
writeGroupIndexItem(gd,gd->getMemberList(MemberList::docDefineMembers),
theTranslator->trDefines(),htmlHelp,ftvHelp);
writeGroupIndexItem(gd,gd->getMemberList(MemberList::docTypedefMembers),
theTranslator->trTypedefs(),htmlHelp,ftvHelp);
writeGroupIndexItem(gd,gd->getMemberList(MemberList::docEnumMembers),
theTranslator->trEnumerations(),htmlHelp,ftvHelp);
writeGroupIndexItem(gd,gd->getMemberList(MemberList::docFuncMembers),
theTranslator->trFunctions(),htmlHelp,ftvHelp);
writeGroupIndexItem(gd,gd->getMemberList(MemberList::docVarMembers),
theTranslator->trVariables(),htmlHelp,ftvHelp);
writeGroupIndexItem(gd,gd->getMemberList(MemberList::docProtoMembers),
theTranslator->trFuncProtos(),htmlHelp,ftvHelp);
#if 0
// write members // write members
struct MemInfo struct MemInfo
{ {
...@@ -2821,6 +2881,7 @@ void writeGroupTreeNode(OutputList &ol, GroupDef *gd,int level) ...@@ -2821,6 +2881,7 @@ void writeGroupTreeNode(OutputList &ol, GroupDef *gd,int level)
} }
} }
#endif
// write namespaces // write namespaces
NamespaceSDict *namespaceSDict=gd->namespaceSDict; NamespaceSDict *namespaceSDict=gd->namespaceSDict;
......
...@@ -212,6 +212,7 @@ class LatexGenerator : public OutputGenerator ...@@ -212,6 +212,7 @@ class LatexGenerator : public OutputGenerator
void endFontClass() {} void endFontClass() {}
void writeCodeAnchor(const char *) {} void writeCodeAnchor(const char *) {}
void linkableSymbol(int,const char *,Definition *,Definition *) {}
private: private:
LatexGenerator(const LatexGenerator &); LatexGenerator(const LatexGenerator &);
......
...@@ -198,6 +198,7 @@ SOURCES = ce_lex.cpp \ ...@@ -198,6 +198,7 @@ SOURCES = ce_lex.cpp \
win32:TMAKE_CXXFLAGS += -DQT_NODLL win32:TMAKE_CXXFLAGS += -DQT_NODLL
win32-msvc:TMAKE_CXXFLAGS += -Zm200 win32-msvc:TMAKE_CXXFLAGS += -Zm200
win32-g++:TMAKE_CXXFLAGS += -fno-exceptions -fno-rtti win32-g++:TMAKE_CXXFLAGS += -fno-exceptions -fno-rtti
linux-g++:TMAKE_CXXFLAGS += -fno-exceptions -fno-rtti
INCLUDEPATH += ../qtools INCLUDEPATH += ../qtools
INCLUDEPATH += ../libpng INCLUDEPATH += ../libpng
INCLUDEPATH += ../libmd5 INCLUDEPATH += ../libmd5
......
...@@ -33,6 +33,7 @@ int main(int argc,char **argv) ...@@ -33,6 +33,7 @@ int main(int argc,char **argv)
initDoxygen(); initDoxygen();
readConfiguration(argc,argv); readConfiguration(argc,argv);
checkConfiguration();
parseInput(); parseInput();
generateOutput(); generateOutput();
return 0; return 0;
......
...@@ -267,6 +267,7 @@ class ManGenerator : public OutputGenerator ...@@ -267,6 +267,7 @@ class ManGenerator : public OutputGenerator
//void endSectionRefList() {} //void endSectionRefList() {}
void writeCodeAnchor(const char *) {} void writeCodeAnchor(const char *) {}
void linkableSymbol(int,const char *,Definition *,Definition *) {}
private: private:
bool firstCol; bool firstCol;
......
...@@ -461,7 +461,7 @@ void MemberDef::insertReimplementedBy(MemberDef *md) ...@@ -461,7 +461,7 @@ void MemberDef::insertReimplementedBy(MemberDef *md)
{ {
m_templateMaster->insertReimplementedBy(md); m_templateMaster->insertReimplementedBy(md);
} }
if (redefinedBy==0) redefinedBy = new MemberList; if (redefinedBy==0) redefinedBy = new MemberList(MemberList::redefinedBy);
if (redefinedBy->findRef(md)==-1) if (redefinedBy->findRef(md)==-1)
{ {
redefinedBy->inSort(md); redefinedBy->inSort(md);
...@@ -480,7 +480,7 @@ MemberList *MemberDef::reimplementedBy() const ...@@ -480,7 +480,7 @@ MemberList *MemberDef::reimplementedBy() const
void MemberDef::insertEnumField(MemberDef *md) void MemberDef::insertEnumField(MemberDef *md)
{ {
if (enumFields==0) enumFields=new MemberList; if (enumFields==0) enumFields=new MemberList(MemberList::enumFields);
enumFields->append(md); enumFields->append(md);
} }
......
...@@ -259,8 +259,6 @@ class MemberDef : public Definition ...@@ -259,8 +259,6 @@ class MemberDef : public Definition
void setFromAnonymousMember(MemberDef *m) { annMemb=m; } void setFromAnonymousMember(MemberDef *m) { annMemb=m; }
bool fromAnonymousScope() const { return annScope; } bool fromAnonymousScope() const { return annScope; }
bool anonymousDeclShown() const { return annUsed; } bool anonymousDeclShown() const { return annUsed; }
//void setIndentDepth( int i) { indDepth=i; }
//int indentDepth() { return indDepth; }
// callgraph related members // callgraph related members
bool hasCallGraph() const { return m_hasCallGraph; } bool hasCallGraph() const { return m_hasCallGraph; }
...@@ -283,11 +281,6 @@ class MemberDef : public Definition ...@@ -283,11 +281,6 @@ class MemberDef : public Definition
MemberDef *inheritsDocsFrom() const { return m_docProvider; } MemberDef *inheritsDocsFrom() const { return m_docProvider; }
//QCString getBodyAnchor() const
//{
// return bodyMemb ? bodyMemb->anchor() : anchor();
//}
//void setBodyMember(MemberDef *md) { bodyMemb = md; }
void setDocsForDefinition(bool b) { docsForDefinition = b; } void setDocsForDefinition(bool b) { docsForDefinition = b; }
void setGroupAlias(MemberDef *md) { groupAlias = md; } void setGroupAlias(MemberDef *md) { groupAlias = md; }
MemberDef *getGroupAlias() const { return groupAlias; } MemberDef *getGroupAlias() const { return groupAlias; }
......
...@@ -39,7 +39,7 @@ MemberGroup::MemberGroup(Definition *parent, ...@@ -39,7 +39,7 @@ MemberGroup::MemberGroup(Definition *parent,
int id,const char *hdr,const char *d,const char *docFile) int id,const char *hdr,const char *d,const char *docFile)
{ {
//printf("New member group id=%d header=%s desc=%s\n",id,hdr,d); //printf("New member group id=%d header=%s desc=%s\n",id,hdr,d);
memberList = new MemberList; memberList = new MemberList(MemberList::memberGroup);
grpId = id; grpId = id;
grpHeader = hdr; grpHeader = hdr;
doc = d; doc = d;
...@@ -47,6 +47,7 @@ MemberGroup::MemberGroup(Definition *parent, ...@@ -47,6 +47,7 @@ MemberGroup::MemberGroup(Definition *parent,
inSameSection = TRUE; inSameSection = TRUE;
inDeclSection = 0; inDeclSection = 0;
m_numDecMembers = -1; m_numDecMembers = -1;
m_numDocMembers = -1;
m_parent = parent; m_parent = parent;
m_docFile = docFile; m_docFile = docFile;
//printf("Member group docs=`%s'\n",doc.data()); //printf("Member group docs=`%s'\n",doc.data());
...@@ -141,6 +142,16 @@ int MemberGroup::countDecMembers(/*bool sectionPerType*/) ...@@ -141,6 +142,16 @@ int MemberGroup::countDecMembers(/*bool sectionPerType*/)
return m_numDecMembers; return m_numDecMembers;
} }
int MemberGroup::countDocMembers()
{
if (m_numDocMembers==-1)
{
memberList->countDocMembers();
m_numDocMembers = memberList->numDocMembers();
}
return m_numDocMembers;
}
void MemberGroup::distributeMemberGroupDocumentation() void MemberGroup::distributeMemberGroupDocumentation()
{ {
//printf("MemberGroup::distributeMemberGroupDocumentation() %s\n",grpHeader.data()); //printf("MemberGroup::distributeMemberGroupDocumentation() %s\n",grpHeader.data());
......
...@@ -55,7 +55,8 @@ class MemberGroup ...@@ -55,7 +55,8 @@ class MemberGroup
QCString documentation() { return doc; } QCString documentation() { return doc; }
bool allMembersInSameSection() { return inSameSection; } bool allMembersInSameSection() { return inSameSection; }
void addToDeclarationSection(); void addToDeclarationSection();
int countDecMembers(/*bool sectionPerType*/); int countDecMembers();
int countDocMembers();
void distributeMemberGroupDocumentation(); void distributeMemberGroupDocumentation();
void findSectionsInDocumentation(); void findSectionsInDocumentation();
int varCount() const; int varCount() const;
...@@ -83,6 +84,7 @@ class MemberGroup ...@@ -83,6 +84,7 @@ class MemberGroup
MemberList *inDeclSection; MemberList *inDeclSection;
bool inSameSection; bool inSameSection;
int m_numDecMembers; int m_numDecMembers;
int m_numDocMembers;
Definition *m_parent; Definition *m_parent;
QCString m_docFile; QCString m_docFile;
}; };
......
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
#include "outputlist.h" #include "outputlist.h"
#include "groupdef.h" #include "groupdef.h"
MemberList::MemberList() : QList<MemberDef>() MemberList::MemberList(ListType lt) : m_listType(lt)
{ {
memberGroupList=0; memberGroupList=0;
m_numDecMembers=-1; // special value indicating that computation is needed m_numDecMembers=-1; // special value indicating that computation is needed
...@@ -139,7 +139,7 @@ void MemberList::countDocMembers(bool countEnumValues) ...@@ -139,7 +139,7 @@ void MemberList::countDocMembers(bool countEnumValues)
MemberGroup *mg; MemberGroup *mg;
for (;(mg=mgli.current());++mgli) for (;(mg=mgli.current());++mgli)
{ {
mg->countDecMembers(); mg->countDocMembers();
m_numDocMembers+=mg->numDocMembers(); m_numDocMembers+=mg->numDocMembers();
} }
} }
......
...@@ -29,8 +29,79 @@ class MemberGroupList; ...@@ -29,8 +29,79 @@ class MemberGroupList;
class MemberList : public QList<MemberDef> class MemberList : public QList<MemberDef>
{ {
public: public:
MemberList(); enum ListType
{
privateLists = 0x0800,
detailedLists = 0x1000,
declarationLists = 0x2000,
documentationLists = 0x4000,
pubMethods = 0,
proMethods = 1,
pacMethods = 2,
priMethods = 3 + privateLists,
pubStaticMethods = 4,
proStaticMethods = 5,
pacStaticMethods = 6,
priStaticMethods = 7 + privateLists,
pubSlots = 8,
proSlots = 9,
priSlots = 10 + privateLists,
pubAttribs = 11,
proAttribs = 12,
pacAttribs = 13,
priAttribs = 14 + privateLists,
pubStaticAttribs = 15,
proStaticAttribs = 16,
pacStaticAttribs = 17,
priStaticAttribs = 18 + privateLists,
pubTypes = 19,
proTypes = 20,
pacTypes = 21,
priTypes = 22 + privateLists,
related = 23,
signals = 24,
friends = 25,
dcopMethods = 26,
properties = 27,
events = 28,
typedefMembers = 29 + detailedLists,
enumMembers = 30 + detailedLists,
enumValMembers = 31 + detailedLists,
functionMembers = 32 + detailedLists,
relatedMembers = 33 + detailedLists,
variableMembers = 34 + detailedLists,
propertyMembers = 35 + detailedLists,
eventMembers = 36 + detailedLists,
constructors = 37 + detailedLists,
allMembersList = 38,
decDefineMembers = 39 + declarationLists,
decProtoMembers = 40 + declarationLists,
decTypedefMembers = 41 + declarationLists,
decEnumMembers = 42 + declarationLists,
decFuncMembers = 43 + declarationLists,
decVarMembers = 44 + declarationLists,
decEnumValMembers = 45 + declarationLists,
docDefineMembers = 46 + documentationLists,
docProtoMembers = 47 + documentationLists,
docTypedefMembers = 48 + documentationLists,
docEnumMembers = 49 + documentationLists,
docFuncMembers = 50 + documentationLists,
docVarMembers = 51 + documentationLists,
docEnumValMembers = 52 + documentationLists,
redefinedBy = 53,
enumFields = 54,
memberGroup = 55
};
MemberList(ListType lt);
~MemberList(); ~MemberList();
ListType listType() const { return m_listType; }
bool insert(uint index,const MemberDef *md); bool insert(uint index,const MemberDef *md);
void inSort(const MemberDef *md); void inSort(const MemberDef *md);
void append(const MemberDef *md); void append(const MemberDef *md);
...@@ -71,6 +142,7 @@ class MemberList : public QList<MemberDef> ...@@ -71,6 +142,7 @@ class MemberList : public QList<MemberDef>
MemberGroupList *memberGroupList; MemberGroupList *memberGroupList;
bool m_inGroup; // is this list part of a group definition bool m_inGroup; // is this list part of a group definition
bool m_inFile; // is this list part of a file definition bool m_inFile; // is this list part of a file definition
ListType m_listType;
}; };
class MemberListIterator : public QListIterator<MemberDef> class MemberListIterator : public QListIterator<MemberDef>
......
This diff is collapsed.
This diff is collapsed.
...@@ -36,6 +36,7 @@ class DotGroupCollaboration; ...@@ -36,6 +36,7 @@ class DotGroupCollaboration;
class DocNode; class DocNode;
class MemberDef; class MemberDef;
class GroupDef; class GroupDef;
class Definition;
/*! \brief Output interface for code parser. /*! \brief Output interface for code parser.
*/ */
...@@ -69,6 +70,8 @@ class CodeOutputInterface ...@@ -69,6 +70,8 @@ class CodeOutputInterface
virtual void startFontClass(const char *) = 0; virtual void startFontClass(const char *) = 0;
virtual void endFontClass() = 0; virtual void endFontClass() = 0;
virtual void writeCodeAnchor(const char *name) = 0; virtual void writeCodeAnchor(const char *name) = 0;
virtual void linkableSymbol(int line,const char *symName,
Definition *symDef,Definition *context) = 0;
}; };
/*! \brief Base Interface used for generating output outside of the /*! \brief Base Interface used for generating output outside of the
......
...@@ -391,6 +391,7 @@ class OutputList : public OutputDocInterface ...@@ -391,6 +391,7 @@ class OutputList : public OutputDocInterface
og=outputs->next(); og=outputs->next();
} }
} }
void linkableSymbol(int,const char *,Definition *,Definition *) {}
private: private:
void debug(); void debug();
......
This diff is collapsed.
...@@ -28,5 +28,6 @@ void initPreprocessor(); ...@@ -28,5 +28,6 @@ void initPreprocessor();
void cleanUpPreprocessor(); void cleanUpPreprocessor();
void addSearchDir(const char *dir); void addSearchDir(const char *dir);
void preprocessFile(const char *fileName,BufStr &output); void preprocessFile(const char *fileName,BufStr &output);
void preFreeScanner();
#endif #endif
This diff is collapsed.
This diff is collapsed.
...@@ -54,4 +54,6 @@ class PythonLanguageScanner : public ParserInterface ...@@ -54,4 +54,6 @@ class PythonLanguageScanner : public ParserInterface
void parsePrototype(const char *text); void parsePrototype(const char *text);
}; };
void pyscanFreeScanner();
#endif #endif
This diff is collapsed.
...@@ -270,6 +270,7 @@ class RTFGenerator : public OutputGenerator ...@@ -270,6 +270,7 @@ class RTFGenerator : public OutputGenerator
//void endSectionRefList() {} //void endSectionRefList() {}
void writeCodeAnchor(const char *) {} void writeCodeAnchor(const char *) {}
void linkableSymbol(int,const char *,Definition *,Definition *) {}
static bool preProcessFileInplace(const char *path,const char *name); static bool preProcessFileInplace(const char *path,const char *name);
......
...@@ -49,4 +49,6 @@ class CLanguageScanner : public ParserInterface ...@@ -49,4 +49,6 @@ class CLanguageScanner : public ParserInterface
void parsePrototype(const char *text); void parsePrototype(const char *text);
}; };
void scanFreeScanner();
#endif #endif
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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