From 61e51f0c7b139596e54aaea4c4d684b59cbfae57 Mon Sep 17 00:00:00 2001 From: Dimitri van Heesch Date: Tue, 22 Jan 2002 17:56:24 +0000 Subject: Doxygen-1.2.13-20020122 --- Doxyfile | 4 +- INSTALL | 4 +- Makefile.in | 2 + README | 4 +- VERSION | 2 +- addon/doxmlparser/Doxyfile | 2 +- addon/doxmlparser/examples/metrics/Makefile.in | 13 + addon/doxmlparser/examples/metrics/main.cpp | 252 +++++++++++++++++++ addon/doxmlparser/examples/metrics/metrics.pro.in | 20 ++ addon/doxmlparser/include/doxmlintf.h | 107 ++++++-- addon/doxmlparser/src/basehandler.h | 40 ++- addon/doxmlparser/src/baseiterator.h | 2 +- addon/doxmlparser/src/compoundhandler.cpp | 154 ++++++++++-- addon/doxmlparser/src/compoundhandler.h | 41 +-- addon/doxmlparser/src/debug.cpp | 24 ++ addon/doxmlparser/src/debug.h | 7 + addon/doxmlparser/src/dochandler.cpp | 148 ++++++----- addon/doxmlparser/src/dochandler.h | 21 +- addon/doxmlparser/src/doxmlintf.h | 107 ++++++-- addon/doxmlparser/src/doxmlparser.pro.in | 6 +- addon/doxmlparser/src/linkedtexthandler.cpp | 36 ++- addon/doxmlparser/src/linkedtexthandler.h | 3 +- addon/doxmlparser/src/mainhandler.cpp | 289 ++++++++++++++++------ addon/doxmlparser/src/mainhandler.h | 77 +++--- addon/doxmlparser/src/memberhandler.cpp | 97 +++++++- addon/doxmlparser/src/memberhandler.h | 36 ++- addon/doxmlparser/src/paramhandler.cpp | 20 +- addon/doxmlparser/src/paramhandler.h | 2 +- addon/doxmlparser/src/sectionhandler.cpp | 84 ++++++- addon/doxmlparser/src/sectionhandler.h | 37 ++- addon/doxmlparser/test/main.cpp | 17 +- addon/doxywizard/Makefile.in | 2 +- addon/doxywizard/Makefile.win_nmake.in | 2 +- addon/doxywizard/doxywizard.cpp | 2 +- addon/doxywizard/doxywizard.h | 2 +- addon/doxywizard/doxywizard.pro.in | 2 +- addon/doxywizard/inputbool.cpp | 2 +- addon/doxywizard/inputbool.h | 2 +- addon/doxywizard/inputint.cpp | 2 +- addon/doxywizard/inputint.h | 2 +- addon/doxywizard/inputstring.cpp | 2 +- addon/doxywizard/inputstring.h | 2 +- addon/doxywizard/inputstrlist.cpp | 2 +- addon/doxywizard/inputstrlist.h | 2 +- addon/doxywizard/pagewidget.cpp | 2 +- addon/doxywizard/pagewidget.h | 2 +- addon/doxywizard/pixmaps.cpp | 2 +- addon/doxywizard/pixmaps.h | 2 +- addon/doxywizard/qtbc.h | 2 +- configure | 4 +- doc/Makefile.win_make.in | 2 +- doc/Makefile.win_nmake.in | 2 +- doc/config.doc | 22 +- doc/install.doc | 3 + doc/language.doc | 24 +- doc/language.tpl | 20 +- doc/translator.pl | 197 ++++++++++++++- packages/rpm/doxygen.spec | 199 ++++++++++----- src/Makefile.in | 2 +- src/bufstr.h | 2 +- src/classdef.cpp | 24 +- src/classdef.h | 2 +- src/classlist.cpp | 2 +- src/classlist.h | 2 +- src/code.h | 2 +- src/code.l | 18 +- src/config.l | 21 +- src/constexp.h | 2 +- src/constexp.l | 2 +- src/cppvalue.cpp | 2 +- src/cppvalue.h | 2 +- src/debug.cpp | 2 +- src/debug.h | 2 +- src/declinfo.h | 2 +- src/declinfo.l | 2 +- src/defargs.h | 2 +- src/defargs.l | 2 +- src/defgen.cpp | 2 +- src/defgen.h | 2 +- src/define.cpp | 2 +- src/define.h | 2 +- src/definition.cpp | 4 +- src/definition.h | 2 +- src/diagram.cpp | 2 +- src/diagram.h | 2 +- src/doc.h | 2 +- src/doc.l | 2 +- src/dot.cpp | 2 +- src/dot.h | 2 +- src/doxygen.cpp | 60 +++-- src/doxygen.h | 2 +- src/doxygen.pro.in | 2 +- src/doxysearch.cpp | 2 +- src/doxytag.l | 4 +- src/entry.cpp | 2 +- src/entry.h | 2 +- src/example.h | 2 +- src/filedef.cpp | 2 +- src/filedef.h | 2 +- src/filename.cpp | 2 +- src/filename.h | 2 +- src/formula.cpp | 2 +- src/formula.h | 2 +- src/gifenc.cpp | 2 +- src/gifenc.h | 2 +- src/groupdef.cpp | 2 +- src/groupdef.h | 2 +- src/htmlgen.cpp | 98 +++++--- src/htmlgen.h | 2 +- src/htmlhelp.cpp | 2 +- src/htmlhelp.h | 2 +- src/image.cpp | 2 +- src/image.h | 2 +- src/index.cpp | 2 +- src/index.h | 2 +- src/instdox.cpp | 2 +- src/instdox.h | 2 +- src/language.cpp | 2 +- src/language.h | 2 +- src/latexgen.cpp | 12 +- src/latexgen.h | 2 +- src/libdoxycfg.pro.in | 2 +- src/libdoxycfg.t | 2 +- src/libdoxygen.pro.in | 2 +- src/libdoxygen.t | 2 +- src/logos.cpp | 2 +- src/logos.h | 2 +- src/main.cpp | 2 +- src/mangen.cpp | 2 +- src/mangen.h | 2 +- src/memberdef.cpp | 28 ++- src/memberdef.h | 2 +- src/membergroup.cpp | 2 +- src/membergroup.h | 2 +- src/memberlist.cpp | 2 +- src/memberlist.h | 2 +- src/membername.cpp | 2 +- src/membername.h | 2 +- src/message.cpp | 2 +- src/message.h | 2 +- src/namespacedef.cpp | 2 +- src/namespacedef.h | 2 +- src/outputgen.cpp | 2 +- src/outputgen.h | 2 +- src/outputlist.cpp | 2 +- src/outputlist.h | 2 +- src/packagedef.cpp | 2 +- src/packagedef.h | 2 +- src/page.h | 2 +- src/pre.h | 2 +- src/pre.l | 6 +- src/qtbc.h | 2 +- src/reflist.cpp | 2 +- src/reflist.h | 2 +- src/rtfgen.cpp | 2 +- src/rtfgen.h | 2 +- src/scanner.h | 2 +- src/scanner.l | 9 +- src/searchindex.cpp | 2 +- src/searchindex.h | 2 +- src/section.h | 2 +- src/sortdict.h | 2 +- src/suffixtree.cpp | 2 +- src/suffixtree.h | 2 +- src/tagreader.cpp | 37 +-- src/tagreader.h | 2 +- src/translator.cpp | 2 +- src/translator.h | 9 +- src/translator_adapter.h | 18 +- src/translator_br.h | 4 +- src/translator_cn.h | 37 +-- src/translator_cz.h | 4 +- src/translator_de.h | 4 +- src/translator_dk.h | 2 +- src/translator_en.h | 22 +- src/translator_es.h | 2 +- src/translator_fi.h | 2 +- src/translator_fr.h | 4 +- src/translator_gr.h | 2 +- src/translator_hr.h | 4 +- src/translator_hu.h | 2 +- src/translator_it.h | 4 +- src/translator_jp.h | 230 ++++++++--------- src/translator_kr.h | 4 +- src/translator_nl.h | 19 +- src/translator_no.h | 2 +- src/translator_pl.h | 2 +- src/translator_pt.h | 4 +- src/translator_ro.h | 2 +- src/translator_ru.h | 11 +- src/translator_se.h | 2 +- src/translator_si.h | 2 +- src/translator_sk.h | 4 +- src/util.cpp | 4 +- src/util.h | 2 +- src/version.h | 2 +- src/xmlgen.cpp | 283 ++++++++++++++------- src/xmlgen.h | 2 +- 198 files changed, 2472 insertions(+), 905 deletions(-) create mode 100644 addon/doxmlparser/examples/metrics/Makefile.in create mode 100644 addon/doxmlparser/examples/metrics/main.cpp create mode 100644 addon/doxmlparser/examples/metrics/metrics.pro.in create mode 100644 addon/doxmlparser/src/debug.cpp create mode 100644 addon/doxmlparser/src/debug.h diff --git a/Doxyfile b/Doxyfile index 692f99d..376d7dd 100644 --- a/Doxyfile +++ b/Doxyfile @@ -95,7 +95,7 @@ IGNORE_PREFIX = #--------------------------------------------------------------------------- # configuration options related to the HTML output #--------------------------------------------------------------------------- -GENERATE_HTML = YES +GENERATE_HTML = NO HTML_OUTPUT = HTML_HEADER = HTML_FOOTER = @@ -168,7 +168,7 @@ PERL_PATH = /usr/bin/perl # Configuration options related to the dot tool #--------------------------------------------------------------------------- CLASS_DIAGRAMS = NO -HAVE_DOT = YES +HAVE_DOT = NO CLASS_GRAPH = YES COLLABORATION_GRAPH = YES TEMPLATE_RELATIONS = YES diff --git a/INSTALL b/INSTALL index 2cba327..aec9e0e 100644 --- a/INSTALL +++ b/INSTALL @@ -1,6 +1,6 @@ -DOXYGEN Version 1.2.13.1 +DOXYGEN Version 1.2.13-20020121 Please read the installation section of the manual for instructions. -------- -Dimitri van Heesch (05 January 2002) +Dimitri van Heesch (21 January 2002) diff --git a/Makefile.in b/Makefile.in index 7a2968a..8e0df82 100644 --- a/Makefile.in +++ b/Makefile.in @@ -10,6 +10,7 @@ clean: FORCE cd addon/doxywizard ; $(MAKE) clean cd addon/doxmlparser/src ; $(MAKE) clean cd addon/doxmlparser/test ; $(MAKE) clean + cd addon/doxmlparser/examples/metrics ; $(MAKE) clean -rm -f bin/doxy* -rm -f objects/*.o @@ -18,6 +19,7 @@ distclean: clean cd addon/doxywizard ; $(MAKE) distclean cd addon/doxmlparser/src ; $(MAKE) distclean cd addon/doxmlparser/test ; $(MAKE) distclean + cd addon/doxmlparser/examples/metrics ; $(MAKE) distclean -rm -f lib/lib* -rm -f bin/doxy* -rm -f html diff --git a/README b/README index c6e56f8..d26beda 100644 --- a/README +++ b/README @@ -1,4 +1,4 @@ -DOXYGEN Version 1.2.13.1 +DOXYGEN Version 1.2.13_20020121 Please read INSTALL for compilation instructions. @@ -17,4 +17,4 @@ to subscribe to the lists or to visit the archives. Enjoy, -Dimitri van Heesch (dimitri@stack.nl) (05 January 2002) +Dimitri van Heesch (dimitri@stack.nl) (21 January 2002) diff --git a/VERSION b/VERSION index ed9d0d3..8c82b56 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.2.13.1 +1.2.13-20020121 diff --git a/addon/doxmlparser/Doxyfile b/addon/doxmlparser/Doxyfile index 6225af2..50d205a 100644 --- a/addon/doxmlparser/Doxyfile +++ b/addon/doxmlparser/Doxyfile @@ -43,7 +43,7 @@ SHOW_USED_FILES = YES #--------------------------------------------------------------------------- # configuration options related to warning and progress messages #--------------------------------------------------------------------------- -QUIET = YES +QUIET = NO WARNINGS = YES WARN_IF_UNDOCUMENTED = YES WARN_FORMAT = diff --git a/addon/doxmlparser/examples/metrics/Makefile.in b/addon/doxmlparser/examples/metrics/Makefile.in new file mode 100644 index 0000000..83cbc28 --- /dev/null +++ b/addon/doxmlparser/examples/metrics/Makefile.in @@ -0,0 +1,13 @@ +all clean depend: Makefile.metrics + $(MAKE) -f Makefile.metrics $@ + +distclean: clean + $(RM) -rf Makefile.metrics metrics.pro Makefile obj + +tmake: + $(ENV) $(PERL) $(TMAKE) metrics.pro >Makefile.metrics + +Makefile.metrics: metrics.pro + $(ENV) $(PERL) $(TMAKE) metrics.pro >Makefile.metrics + +install: diff --git a/addon/doxmlparser/examples/metrics/main.cpp b/addon/doxmlparser/examples/metrics/main.cpp new file mode 100644 index 0000000..6c2ad1a --- /dev/null +++ b/addon/doxmlparser/examples/metrics/main.cpp @@ -0,0 +1,252 @@ +/****************************************************************************** + * + * $Id$ + * + * + * Copyright (C) 1997-2002 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. + * + */ + +/*! \mainpage Metrics + * This is a small example that shows how to use doxygen's XML output and + * the doxmlparser library. The example shows some very basic code metrics. + */ + +#include +#include + +bool isDocumented(IDocRoot *brief,IDocRoot *detailed) +{ + bool found=FALSE; + if (brief) + { + IDocIterator *docIt = brief->contents(); + if (docIt->current()) // method has brief description + { + found=TRUE; + } + docIt->release(); + } + if (detailed && !found) + { + IDocIterator *docIt = detailed->contents(); + if (docIt->current()) + { + found=TRUE; + } + docIt->release(); + } + return found; +} + +int main(int argc,char **argv) +{ + if (argc!=2) + { + printf("Usage: %s xml_output_dir\n",argv[0]); + exit(1); + } + + int numClasses=0; + int numDocClasses=0; + int numStructs=0; + int numUnions=0; + int numInterfaces=0; + int numExceptions=0; + int numNamespaces=0; + int numFiles=0; + int numGroups=0; + int numPages=0; + int numPackages=0; + int numPubMethods=0; + int numProMethods=0; + int numPriMethods=0; + int numDocPubMethods=0; + int numDocProMethods=0; + int numDocPriMethods=0; + int numFunctions=0; + int numAttributes=0; + int numVariables=0; + int numDocFunctions=0; + int numDocAttributes=0; + int numDocVariables=0; + int numParams=0; + + IDoxygen *dox = createObjectModel(); + + dox->setDebugLevel(0); + + if (!dox->readXMLDir(argv[1])) + { + printf("Error reading %s/index.xml\n",argv[1]); + exit(1); + } + + ICompoundIterator *cli = dox->compounds(); + ICompound *comp; + for (cli->toFirst();(comp=cli->current());cli->toNext()) + { + printf("Processing %s...\n",comp->name().data()); + bool hasDocs = isDocumented(comp->briefDescription(),comp->detailedDescription()); + switch (comp->kind()) + { + case ICompound::Class: + numClasses++; + if (hasDocs) numDocClasses++; + break; + case ICompound::Struct: numStructs++; break; + case ICompound::Union: numUnions++; break; + case ICompound::Interface: numInterfaces++; break; + case ICompound::Exception: numExceptions++; break; + case ICompound::Namespace: numNamespaces++; break; + case ICompound::File: numFiles++; break; + case ICompound::Group: numGroups++; break; + case ICompound::Page: numPages++; break; + case ICompound::Package: numPackages++; break; + default: break; + } + + ISectionIterator *sli = comp->sections(); + ISection *sec; + for (sli->toFirst();(sec=sli->current());sli->toNext()) + { + IMemberIterator *mli = sec->members(); + IMember *mem; + for (mli->toFirst();(mem=mli->current());mli->toNext()) + { + IParamIterator *pli = mem->params(); + IParam *par; + if (comp->kind()==ICompound::Class || + comp->kind()==ICompound::Struct || + comp->kind()==ICompound::Interface + ) + { + if (mem->kind()==IMember::Function || + mem->kind()==IMember::Prototype || + mem->kind()==IMember::Signal || + mem->kind()==IMember::Slot || + mem->kind()==IMember::DCOP + ) // is a "method" + { + if (mem->section()->isPublic()) + { + numPubMethods++; + if (isDocumented(mem->briefDescription(),mem->detailedDescription())) + { + numDocPubMethods++; + } + } + else if (mem->section()->isProtected()) + { + numProMethods++; + if (isDocumented(mem->briefDescription(),mem->detailedDescription())) + { + numDocProMethods++; + } + } + else if (mem->section()->isPrivate()) + { + numPriMethods++; + if (isDocumented(mem->briefDescription(),mem->detailedDescription())) + { + numDocPriMethods++; + } + } + } + else if (mem->kind()==IMember::Variable || + mem->kind()==IMember::Property + ) // is an "attribute" + { + numAttributes++; + if (isDocumented(mem->briefDescription(),mem->detailedDescription())) + { + numDocAttributes++; + } + } + } + else if (comp->kind()==ICompound::File || + comp->kind()==ICompound::Namespace + ) + { + if (mem->kind()==IMember::Function || + mem->kind()==IMember::Prototype || + mem->kind()==IMember::Signal || + mem->kind()==IMember::Slot || + mem->kind()==IMember::DCOP + ) // is a "method" + { + numFunctions++; + if (isDocumented(mem->briefDescription(),mem->detailedDescription())) + { + numDocFunctions++; + } + } + else if (mem->kind()==IMember::Variable || + mem->kind()==IMember::Property + ) // is an "attribute" + { + numVariables++; + if (isDocumented(mem->briefDescription(),mem->detailedDescription())) + { + numDocVariables++; + } + } + } + + for (pli->toFirst();(par=pli->current());pli->toNext()) + { + numParams++; + } + if (mem->typeString()!="void") + { + numParams++; // count non-void return types as well + } + pli->release(); + } + mli->release(); + } + sli->release(); + + comp->release(); + } + cli->release(); + + dox->release(); + + int numMethods = numPubMethods+numProMethods+numPriMethods; + int numDocMethods = numDocPubMethods+numDocProMethods+numDocPriMethods; + + printf("Metrics:\n"); + printf("-----------------------------------\n"); + if (numClasses>0) printf("Classes: %10d (%d documented)\n",numClasses,numDocClasses); + if (numStructs>0) printf("Structs: %10d\n",numStructs); + if (numUnions>0) printf("Unions: %10d\n",numUnions); + if (numInterfaces>0) printf("Interfaces: %10d\n",numInterfaces); + if (numExceptions>0) printf("Exceptions: %10d\n",numExceptions); + if (numNamespaces>0) printf("Namespaces: %10d\n",numNamespaces); + if (numFiles>0) printf("Files: %10d\n",numFiles); + if (numGroups>0) printf("Groups: %10d\n",numGroups); + if (numPages>0) printf("Pages: %10d\n",numPages); + if (numPackages>0) printf("Packages: %10d\n",numPackages); + if (numMethods>0) printf("Methods: %10d (%d documented)\n",numMethods,numDocMethods); + if (numPubMethods>0) printf(" Public: %10d (%d documented)\n",numPubMethods,numDocPubMethods); + if (numProMethods>0) printf(" Protected: %10d (%d documented)\n",numProMethods,numDocProMethods); + if (numPriMethods>0) printf(" Private: %10d (%d documented)\n",numPriMethods,numDocPriMethods); + if (numFunctions>0) printf("Functions: %10d (%d documented)\n",numFunctions,numDocFunctions); + if (numAttributes>0) printf("Attributes: %10d (%d documented)\n",numAttributes,numDocAttributes); + if (numVariables>0) printf("Variables: %10d (%d documented)\n",numVariables,numDocVariables); + if (numParams>0) printf("Params: %10d\n",numParams); + printf("-----------------------------------\n"); + if (numClasses>0) printf("Avg. #methods/compound: %10f\n",(double)numMethods/(double)numClasses); + if (numMethods>0) printf("Avg. #params/method: %10f\n",(double)numParams/(double)numMethods); + printf("-----------------------------------\n"); + + return 0; +} + diff --git a/addon/doxmlparser/examples/metrics/metrics.pro.in b/addon/doxmlparser/examples/metrics/metrics.pro.in new file mode 100644 index 0000000..6dd344f --- /dev/null +++ b/addon/doxmlparser/examples/metrics/metrics.pro.in @@ -0,0 +1,20 @@ +TEMPLATE = app.t +CONFIG = console warn_on $extraopts +HEADERS = +SOURCES = main.cpp +unix:LIBS += -L../../../../lib -L../../lib -ldoxmlparser -lqtools +win32:INCLUDEPATH += . +win32-mingw:LIBS += -L../../../../lib -L../../lib -ldoxmlparser -lqtools +win32-msvc:LIBS += doxmlparser.lib qtools.lib shell32.lib +win32-msvc:TMAKE_LFLAGS += /LIBPATH:..\..\..\..\lib;..\..\lib +win32-borland:LIBS += doxmlparser.lib qtools.lib shell32.lib +win32-borland:TMAKE_LFLAGS += -L..\..\..\..\lib -L..\..\lib +win32:TMAKE_CXXFLAGS += -DQT_NODLL +DESTDIR = +OBJECTS_DIR = obj +TARGET = metrics +DEPENDPATH = ../../include +INCLUDEPATH += ../../../../qtools ../../include +unix:TARGETDEPS = ../../lib/libdoxmlparser.a +win32:TARGETDEPS = ..\..\lib\doxmlparser.lib + diff --git a/addon/doxmlparser/include/doxmlintf.h b/addon/doxmlparser/include/doxmlintf.h index 390e9bb..0ca2cc8 100644 --- a/addon/doxmlparser/include/doxmlintf.h +++ b/addon/doxmlparser/include/doxmlintf.h @@ -5,12 +5,15 @@ class IMember; class IDocIterator; +class ICompound; +class ISection; class ILinkedText { public: enum Kind { Kind_Text, Kind_Ref }; virtual Kind kind() const = 0; + virtual ~ILinkedText() {} }; class ILT_Text : public ILinkedText @@ -49,6 +52,7 @@ class IParam virtual QString attrib() const = 0; virtual QString arraySpecifier() const = 0; virtual ILinkedTextIterator *defaultValue() const = 0; + virtual ~IParam() {} }; class IParamIterator @@ -67,6 +71,7 @@ class IMemberReference public: virtual IMember *member() const = 0; virtual QString memberName() const = 0; + virtual ~IMemberReference() {} }; class IMemberReferenceIterator @@ -85,6 +90,7 @@ class IEnumValue public: virtual QString name() const = 0; virtual QString initializer() const = 0; + virtual ~IEnumValue() {} }; class IEnumValueIterator @@ -136,6 +142,7 @@ class IDoc Root // 30 -> IDocRoot }; virtual Kind kind() const = 0; + virtual ~IDoc() {} }; class IDocMarkup : public IDoc @@ -234,7 +241,7 @@ class IDocRef : public IDoc { public: enum TargetKind { Member, Compound }; - virtual QString id() const = 0; + virtual QString refId() const = 0; virtual TargetKind targetKind() const = 0; virtual QString external() const = 0; virtual QString text() const = 0; @@ -340,11 +347,19 @@ class IDocIterator class IMember { public: - virtual QString kind() const = 0; + enum MemberKind { Invalid=0, + Define, Property, Variable, Typedef, Enum, + Function, Signal, Prototype, Friend, DCOP, Slot + }; + virtual ICompound *compound() const = 0; + virtual ISection *section() const = 0; + virtual MemberKind kind() const = 0; + virtual QString kindString() const = 0; virtual QString id() const = 0; virtual QString protection() const = 0; virtual QString virtualness() const = 0; virtual ILinkedTextIterator *type() const = 0; + virtual QString typeString() const = 0; virtual QString name() const = 0; virtual bool isConst() const = 0; virtual bool isVolatile() const = 0; @@ -362,6 +377,7 @@ class IMember virtual IEnumValueIterator *enumValues() const = 0; virtual IDocRoot *briefDescription() const = 0; virtual IDocRoot *detailedDescription() const = 0; + virtual ~IMember() {} }; class IMemberIterator @@ -378,8 +394,26 @@ class IMemberIterator class ISection { public: - virtual QString kind() const = 0; + enum SectionKind { Invalid=0, + UserDefined, + PubTypes, PubFuncs, PubAttribs, PubSlots, + Signals, DCOPFuncs, Properties, + PubStatFuncs, PubStatAttribs, + ProTypes, ProFuncs, ProAttribs, ProSlots, + ProStatFuncs, ProStatAttribs, + PriTypes, PriFuncs, PriAttribs, PriSlots, + PriStatFuncs, PriStatAttribs, + Friend, Related, Defines, Prototypes, Typedefs, + Enums, Functions, Variables + }; + virtual QString kindString() const = 0; + virtual SectionKind kind() const = 0; virtual IMemberIterator *members() const = 0; + virtual bool isStatic() const = 0; + virtual bool isPublic() const = 0; + virtual bool isPrivate() const = 0; + virtual bool isProtected() const = 0; + virtual ~ISection() {} }; class ISectionIterator @@ -396,21 +430,42 @@ class ISectionIterator class ICompound { public: + enum CompoundKind { Invalid=0, + Class, Struct, Union, Interface, Exception, + Namespace, File, Group, Page, Package + }; virtual QString name() const = 0; virtual QString id() const = 0; - virtual QString kind() const = 0; + virtual CompoundKind kind() const = 0; + virtual QString kindString() const = 0; virtual ISectionIterator *sections() const = 0; virtual IDocRoot *briefDescription() const = 0; virtual IDocRoot *detailedDescription() const = 0; + + /*! Returns an interface to a member given its id. + * @param id The member id. + */ + virtual IMember *memberById(const QString &id) const = 0; + + /*! Returns a list of all members within the compound having a certain + * name. Overloading is the reason why there can be more than one member. + * @param name The name of the member. + */ + virtual IMemberIterator *memberByName(const QString &name) const = 0; + + /*! Decreases the reference counter for this compound. If it reaches + * zero, the memory for the compound will be released. + */ + virtual void release() = 0; }; class ICompoundIterator { public: - virtual ICompound *toFirst() = 0; - virtual ICompound *toLast() = 0; - virtual ICompound *toNext() = 0; - virtual ICompound *toPrev() = 0; + virtual void toFirst() = 0; + virtual void toLast() = 0; + virtual void toNext() = 0; + virtual void toPrev() = 0; virtual ICompound *current() const = 0; virtual void release() = 0; }; @@ -419,6 +474,7 @@ class ICompoundIterator class IDoxygen { public: + /*! Returns an iterator that can be used to iterate over the list * of compounds found in the project. */ @@ -435,28 +491,43 @@ class IDoxygen */ virtual ICompound *compoundByName(const QString &name) const = 0; - /*! Returns an interface to a member given its id. + /*! Returns an interface to a compound containing a member given it the + * member's id. Given the ICompound interface one can use the same id + * to obtain the IMember interface. * @param id The member id. */ - virtual IMember *memberById(const QString &id) const = 0; + virtual ICompound *memberById(const QString &id) const = 0; - /*! Returns a list of all members with a certain name. + /*! Returns a list of all compounds containing at least one members + * with a certain name. Each compound can be asked to return the + * list of members with that name. * @param name The name of the member. */ - virtual IMemberIterator *memberByName(const QString &name) const = 0; - + virtual ICompoundIterator *memberByName(const QString &name) const = 0; + /*! Releases the memory for the object hierarchy obtained by * createdObjecModelFromXML(). First release all iterators before calling * this function. */ virtual void release() = 0; + + /*! Sets the debug level. + * - 0 all debugging messages are disabled (the default). + * - 1 display important messages only + * - 2 display any messages. + */ + virtual void setDebugLevel(int level) = 0; + + /*! Reads an XML directory produced by doxygen and builds up a data + * structure representing the contents of the XML files in the directory. + */ + virtual bool readXMLDir(const char *xmlDirName) = 0; }; -/*! Factory method that creates an object model given an XML file generated - * by doxygen. - * @param xmlFileName The name of the XML to parse. - * @returns An iterface to the object model. +/*! Factory method that creates an empty object model for a doxygen generated XML file. + * Use the readXMLDir() method to build the model from an XML output + * directory containing doxygen output. */ -IDoxygen *createObjectModelFromXML(const char *xmlFileName); +IDoxygen *createObjectModel(); #endif diff --git a/addon/doxmlparser/src/basehandler.h b/addon/doxmlparser/src/basehandler.h index d62cf74..89f9504 100644 --- a/addon/doxmlparser/src/basehandler.h +++ b/addon/doxmlparser/src/basehandler.h @@ -3,7 +3,7 @@ * $Id$ * * - * Copyright (C) 1997-2001 by Dimitri van Heesch. + * Copyright (C) 1997-2002 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 @@ -20,11 +20,14 @@ #include #include +#include "debug.h" + class IBaseHandler { public: virtual void setDelegate(QXmlDefaultHandler *delegate) = 0; virtual QXmlDefaultHandler *delegate() const = 0; + virtual ~IBaseHandler() {} }; class IFallBackHandler @@ -33,6 +36,7 @@ class IFallBackHandler virtual bool handleStartElement(const QString & name, const QXmlAttributes & attrib) = 0; virtual bool handleEndElement(const QString &name) = 0; + virtual ~IFallBackHandler() {} }; template class ElementMapper @@ -104,9 +108,15 @@ template class ElementMapper QDict m_endHandlers; }; -template class BaseHandler : public IBaseHandler, - public QXmlDefaultHandler, - public ElementMapper +struct LocatorContainer +{ + static QXmlLocator *s_theLocator; +}; + +template class BaseHandler : public QXmlDefaultHandler, + public ElementMapper, + public LocatorContainer, + public IBaseHandler { public: BaseHandler() : m_delegateHandler(0), m_fallBackHandler(0) @@ -136,7 +146,9 @@ template class BaseHandler : public IBaseHandler, if (!m_skipUntil.isEmpty()) // skip mode { if (m_skipUntil==name) m_skipCount++; - printf("skipping start tag %s count=%d\n",name.data(),m_skipCount); + debug(1,"line %d, col %d: skipping start tag %s count=%d\n", + s_theLocator->lineNumber(),s_theLocator->columnNumber(), + name.data(),m_skipCount); return TRUE; } @@ -150,7 +162,9 @@ template class BaseHandler : public IBaseHandler, !m_fallBackHandler->handleStartElement(name,attrib) ) { - printf("found unexpected tag `%s', skipping until matching end tag\n",name.data()); + debug(1,"line %d, col %d: found unexpected tag `%s', skipping until matching end tag\n", + s_theLocator->lineNumber(),s_theLocator->columnNumber(), + name.data()); m_skipUntil = name; m_skipCount=1; } @@ -167,7 +181,9 @@ template class BaseHandler : public IBaseHandler, if (name==m_skipUntil) { m_skipCount--; - printf("skipping end tag %s count=%d\n",name.data(),m_skipCount); + debug(1,"line %d, col %d: skipping end tag %s count=%d\n", + s_theLocator->lineNumber(),s_theLocator->columnNumber(), + name.data(),m_skipCount); if (m_skipCount==0) { m_skipUntil=""; @@ -198,7 +214,9 @@ template class BaseHandler : public IBaseHandler, return m_delegateHandler->skippedEntity(s); } - printf("Skipped unhandled entity %s\n",s.data()); + debug(1,"line %d, col %d: Skipped unhandled entity %s\n", + s_theLocator->lineNumber(),s_theLocator->columnNumber(), + s.data()); return TRUE; } @@ -237,6 +255,12 @@ template class BaseHandler : public IBaseHandler, return m_fallBackHandler; } + void setDocumentLocator( QXmlLocator * locator ) + { + debug(2,"setDocumentLocator(%p)\n",locator); + s_theLocator = locator; + } + protected: QString m_curString; QString m_skipUntil; diff --git a/addon/doxmlparser/src/baseiterator.h b/addon/doxmlparser/src/baseiterator.h index 52a4c4e..847d1ef 100644 --- a/addon/doxmlparser/src/baseiterator.h +++ b/addon/doxmlparser/src/baseiterator.h @@ -3,7 +3,7 @@ * $Id$ * * - * Copyright (C) 1997-2001 by Dimitri van Heesch. + * Copyright (C) 1997-2002 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 diff --git a/addon/doxmlparser/src/compoundhandler.cpp b/addon/doxmlparser/src/compoundhandler.cpp index 1ce6c6b..18a8c0c 100644 --- a/addon/doxmlparser/src/compoundhandler.cpp +++ b/addon/doxmlparser/src/compoundhandler.cpp @@ -3,7 +3,7 @@ * $Id$ * * - * Copyright (C) 1997-2001 by Dimitri van Heesch. + * Copyright (C) 1997-2002 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 @@ -16,14 +16,97 @@ #include "mainhandler.h" #include "compoundhandler.h" #include "dochandler.h" +#include "debug.h" -CompoundHandler::CompoundHandler(IBaseHandler *parent) - : m_parent(parent), m_brief(0), m_detailed(0), m_programListing(0) +class CompoundErrorHandler : public QXmlErrorHandler +{ + public: + virtual ~CompoundErrorHandler() {} + bool warning( const QXmlParseException & ) + { + return FALSE; + } + bool error( const QXmlParseException & ) + { + return FALSE; + } + bool fatalError( const QXmlParseException &exception ) + { + debug(1,"Fatal error at line %d column %d: %s\n", + exception.lineNumber(),exception.columnNumber(), + exception.message().data()); + return FALSE; + } + QString errorString() { return ""; } + + private: + QString errorMsg; +}; + +//---------------------------------------------------------------------------- + +class CompoundTypeMap +{ + public: + CompoundTypeMap() + { + m_map.setAutoDelete(TRUE); + m_map.insert("class",new int(ICompound::Class)); + m_map.insert("struct",new int(ICompound::Struct)); + m_map.insert("union",new int(ICompound::Union)); + m_map.insert("interface",new int(ICompound::Interface)); + m_map.insert("exception",new int(ICompound::Exception)); + m_map.insert("namespace",new int(ICompound::Namespace)); + m_map.insert("file",new int(ICompound::File)); + m_map.insert("group",new int(ICompound::Group)); + m_map.insert("page",new int(ICompound::Page)); + m_map.insert("package",new int(ICompound::Package)); + } + virtual ~CompoundTypeMap() + { + } + ICompound::CompoundKind map(const QString &s) + { + int *val = m_map.find(s); + if (val==0) + { + debug(1,"Warning: `%s' is an invalid compound type\n",s.data()); + return ICompound::Invalid; + } + else return (ICompound::CompoundKind)*val; + } + private: + QDict m_map; +}; + +static CompoundTypeMap *s_typeMap; + +void compoundhandler_init() +{ + s_typeMap = new CompoundTypeMap; +} + +void compoundhandler_exit() +{ + delete s_typeMap; +} + +//---------------------------------------------------------------------------- + +CompoundHandler::CompoundHandler(const QString &xmlDir) + : m_brief(0), m_detailed(0), m_programListing(0), + m_xmlDir(xmlDir), m_refCount(1), m_memberDict(257), m_memberNameDict(257), + m_mainHandler(0) { m_superClasses.setAutoDelete(TRUE); m_subClasses.setAutoDelete(TRUE); m_sections.setAutoDelete(TRUE); + m_memberNameDict.setAutoDelete(TRUE); + addStartHandler("doxygen"); + addEndHandler("doxygen"); + + addStartHandler("compounddef",this,&CompoundHandler::startCompound); addEndHandler("compounddef",this,&CompoundHandler::endCompound); addStartHandler("compoundname"); @@ -45,10 +128,12 @@ CompoundHandler::CompoundHandler(IBaseHandler *parent) addEndHandler("location"); addStartHandler("programlisting",this,&CompoundHandler::startProgramListing); + } CompoundHandler::~CompoundHandler() { + debug(2,"CompoundHandler::~CompoundHandler()\n"); delete m_brief; delete m_detailed; delete m_programListing; @@ -84,28 +169,27 @@ void CompoundHandler::startProgramListing(const QXmlAttributes& attrib) void CompoundHandler::startCompound(const QXmlAttributes& attrib) { - m_parent->setDelegate(this); m_id = attrib.value("id"); - m_kind = attrib.value("kind"); - printf("startCompound(id=`%s' type=`%s')\n",m_id.data(),m_kind.data()); + m_kindString = attrib.value("kind"); + m_kind = s_typeMap->map(m_kindString); + debug(2,"startCompound(id=`%s' type=`%s')\n",m_id.data(),m_kindString.data()); } -void CompoundHandler::startLocation(const QXmlAttributes& attrib) +void CompoundHandler::endCompound() { - m_defFile = attrib.value("file"); - m_defLine = attrib.value("line").toInt(); + debug(2,"endCompound()\n"); } -void CompoundHandler::endCompound() +void CompoundHandler::startLocation(const QXmlAttributes& attrib) { - printf("endCompound()\n"); - m_parent->setDelegate(0); + m_defFile = attrib.value("file"); + m_defLine = attrib.value("line").toInt(); } void CompoundHandler::endCompoundName() { m_name = m_curString.stripWhiteSpace(); - printf("Compound name `%s'\n",m_name.data()); + debug(2,"Compound name `%s'\n",m_name.data()); } void CompoundHandler::addSuperClass(const QXmlAttributes& attrib) @@ -115,7 +199,7 @@ void CompoundHandler::addSuperClass(const QXmlAttributes& attrib) attrib.value("prot"), attrib.value("virt") ); - printf("super class id=`%s' prot=`%s' virt=`%s'\n", + debug(2,"super class id=`%s' prot=`%s' virt=`%s'\n", sc->m_id.data(), sc->m_protection.data(), sc->m_virtualness.data()); @@ -129,20 +213,56 @@ void CompoundHandler::addSubClass(const QXmlAttributes& attrib) attrib.value("prot"), attrib.value("virt") ); - printf("sub class id=`%s' prot=`%s' virt=`%s'\n", + debug(2,"sub class id=`%s' prot=`%s' virt=`%s'\n", sc->m_id.data(), sc->m_protection.data(), sc->m_virtualness.data()); m_subClasses.append(sc); } -void CompoundHandler::initialize(MainHandler *m) +bool CompoundHandler::parseXML(const QString &compId) +{ + QFile xmlFile(m_xmlDir+"/"+compId+".xml"); + if (!xmlFile.exists()) return FALSE; + CompoundErrorHandler errorHandler; + QXmlInputSource source( xmlFile ); + QXmlSimpleReader reader; + reader.setContentHandler( this ); + reader.setErrorHandler( &errorHandler ); + reader.parse( source ); + return TRUE; +} + +void CompoundHandler::initialize(MainHandler *mh) { + m_mainHandler = mh; QListIterator msi(m_sections); SectionHandler *sec; for (;(sec=(SectionHandler *)msi.current());++msi) { - sec->initialize(m); + sec->initialize(this); + } +} + +void CompoundHandler::insertMember(MemberHandler *mh) +{ + m_memberDict.insert(mh->id(),mh); + QList *mhl = m_memberNameDict.find(mh->id()); + if (mhl==0) + { + mhl = new QList; + m_memberNameDict.insert(mh->name(),mhl); + } + mhl->append(mh); +} + +void CompoundHandler::release() +{ + debug(2,"CompoundHandler::release() %d->%d\n",m_refCount,m_refCount-1); + if (--m_refCount<=0) + { + m_mainHandler->unloadCompound(this); + delete this; } } diff --git a/addon/doxmlparser/src/compoundhandler.h b/addon/doxmlparser/src/compoundhandler.h index 99db5d8..762641f 100644 --- a/addon/doxmlparser/src/compoundhandler.h +++ b/addon/doxmlparser/src/compoundhandler.h @@ -3,7 +3,7 @@ * $Id$ * * - * Copyright (C) 1997-2001 by Dimitri van Heesch. + * Copyright (C) 1997-2002 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 @@ -28,13 +28,6 @@ class MainHandler; class DocHandler; class ProgramListingHandler; -class CompoundIterator : public BaseIterator -{ - public: - CompoundIterator(const QList &list) : - BaseIterator(list) {} -}; - class CompoundHandler : public ICompound, public BaseHandler { public: @@ -48,22 +41,34 @@ class CompoundHandler : public ICompound, public BaseHandler virtual void startDetailedDesc(const QXmlAttributes& attrib); virtual void startLocation(const QXmlAttributes& attrib); virtual void startProgramListing(const QXmlAttributes& attrib); + virtual void addref() { m_refCount++; } - CompoundHandler(IBaseHandler *parent); + CompoundHandler(const QString &dirName); virtual ~CompoundHandler(); - void initialize(MainHandler *m); + bool parseXML(const QString &compId); + void initialize(MainHandler *mh); + void insertMember(MemberHandler *mh); // ICompound implementation QString name() const { return m_name; } QString id() const { return m_id; } - QString kind() const { return m_kind; } + CompoundKind kind() const { return m_kind; } + QString kindString() const { return m_kindString; } ISectionIterator *sections() const { return new SectionIterator(m_sections); } virtual IDocRoot *briefDescription() const { return m_brief; } virtual IDocRoot *detailedDescription() const { return m_detailed; } - + virtual IMember *memberById(const QString &id) const + { return m_memberDict[id]; } + virtual IMemberIterator *memberByName(const QString &name) const + { + QList *ml = m_memberNameDict[name]; + if (ml==0) return 0; + return new MemberIterator(*ml); + } + virtual void release(); private: struct SuperClass @@ -87,15 +92,23 @@ class CompoundHandler : public ICompound, public BaseHandler QList m_superClasses; QList m_subClasses; QList m_sections; - IBaseHandler *m_parent; DocHandler *m_brief; DocHandler *m_detailed; ProgramListingHandler *m_programListing; QString m_id; - QString m_kind; + QString m_kindString; + CompoundKind m_kind; QString m_name; QString m_defFile; int m_defLine; + QString m_xmlDir; + int m_refCount; + QDict m_memberDict; + QDict > m_memberNameDict; + MainHandler *m_mainHandler; }; +void compoundhandler_init(); +void compoundhandler_exit(); + #endif diff --git a/addon/doxmlparser/src/debug.cpp b/addon/doxmlparser/src/debug.cpp new file mode 100644 index 0000000..a8be32c --- /dev/null +++ b/addon/doxmlparser/src/debug.cpp @@ -0,0 +1,24 @@ +#include +#include +#include + +#include "debug.h" + +static int s_debugLevel = 0; + +void debug(int level,const char *msg,...) +{ + if (level<=s_debugLevel) + { + va_list args; + va_start(args, msg); + vfprintf(stderr, msg, args); + va_end(args); + } +} + +void setDebugLevel(int level) +{ + s_debugLevel = level; +} + diff --git a/addon/doxmlparser/src/debug.h b/addon/doxmlparser/src/debug.h new file mode 100644 index 0000000..c77f7fe --- /dev/null +++ b/addon/doxmlparser/src/debug.h @@ -0,0 +1,7 @@ +#ifndef _DEBUG_H +#define _DEBUG_H + +void debug(int level,const char *msg,...); +void setDebugLevel(int level); + +#endif diff --git a/addon/doxmlparser/src/dochandler.cpp b/addon/doxmlparser/src/dochandler.cpp index b670de2..344e457 100644 --- a/addon/doxmlparser/src/dochandler.cpp +++ b/addon/doxmlparser/src/dochandler.cpp @@ -3,7 +3,7 @@ * $Id$ * * - * Copyright (C) 1997-2001 by Dimitri van Heesch. + * Copyright (C) 1997-2002 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 @@ -14,6 +14,7 @@ */ #include "dochandler.h" +#include "debug.h" #include class TypeNameMapper @@ -51,8 +52,17 @@ class TypeNameMapper QMap m_typeNameMap; }; -static TypeNameMapper g_typeMapper; +static TypeNameMapper *s_typeMapper; +void dochandler_init() +{ + s_typeMapper = new TypeNameMapper; +} + +void dochandler_exit() +{ + delete s_typeMapper; +} //---------------------------------------------------------------------- // MarkupHandler @@ -92,7 +102,7 @@ void MarkupHandler::addTextNode() if (!m_curString.isEmpty()) { m_children.append(new TextNode(m_curString,m_curMarkup)); - printf("addTextNode() text=%s markup=%x\n",m_curString.data(),m_curMarkup); + debug(2,"addTextNode() text=%s markup=%x\n",m_curString.data(),m_curMarkup); m_curString=""; } } @@ -216,12 +226,12 @@ ListItemHandler::~ListItemHandler() void ListItemHandler::startListItem(const QXmlAttributes& /*attrib*/) { m_parent->setDelegate(this); - printf("start list item handler\n"); + debug(2,"start list item handler\n"); } void ListItemHandler::endListItem() { - printf("end list item handler\n"); + debug(2,"end list item handler\n"); m_parent->setDelegate(0); } @@ -336,7 +346,7 @@ void ParameterHandler::startParameterName(const QXmlAttributes& /*attrib*/) void ParameterHandler::endParameterName() { m_name = m_curString; - printf("parameter %s\n",m_name.data()); + debug(2,"parameter %s\n",m_name.data()); m_curString=""; m_parent->setDelegate(0); } @@ -386,9 +396,9 @@ void ParameterListHandler::startParameterList(const QXmlAttributes& attrib) else if (kind=="param") m_type=Param; else { - printf("Error: invalid parameterlist type: %s\n",kind.data()); + debug(1,"Error: invalid parameterlist type: %s\n",kind.data()); } - printf("parameterlist kind=%s\n",kind.data()); + debug(2,"parameterlist kind=%s\n",kind.data()); m_parent->setDelegate(this); } @@ -432,7 +442,7 @@ LinkHandler::~LinkHandler() void LinkHandler::startLink(const QXmlAttributes& attrib) { m_parent->setDelegate(this); - printf("Start link\n"); + debug(2,"Start link\n"); m_ref = attrib.value("linkend"); m_curString=""; } @@ -442,7 +452,7 @@ void LinkHandler::endLink() m_text = m_curString; m_curString=""; m_parent->setDelegate(0); - printf("End link\n"); + debug(2,"End link\n"); } //---------------------------------------------------------------------- @@ -462,7 +472,7 @@ EMailHandler::~EMailHandler() void EMailHandler::startEMail(const QXmlAttributes& /*attrib*/) { m_parent->setDelegate(this); - printf("Start email\n"); + debug(2,"Start email\n"); m_curString=""; } @@ -471,7 +481,7 @@ void EMailHandler::endEMail() m_address = m_curString; m_curString=""; m_parent->setDelegate(0); - printf("End email\n"); + debug(2,"End email\n"); } //---------------------------------------------------------------------- @@ -491,7 +501,7 @@ ULinkHandler::~ULinkHandler() void ULinkHandler::startULink(const QXmlAttributes& attrib) { m_parent->setDelegate(this); - printf("Start ulink\n"); + debug(2,"Start ulink\n"); m_url = attrib.value("url"); m_curString=""; } @@ -501,7 +511,7 @@ void ULinkHandler::endULink() m_text = m_curString; m_curString=""; m_parent->setDelegate(0); - printf("End ulink\n"); + debug(2,"End ulink\n"); } //---------------------------------------------------------------------- @@ -521,13 +531,13 @@ LineBreakHandler::~LineBreakHandler() void LineBreakHandler::startLineBreak(const QXmlAttributes& /*attrib*/) { m_parent->setDelegate(this); - printf("Start linebreak\n"); + debug(2,"Start linebreak\n"); } void LineBreakHandler::endLineBreak() { m_parent->setDelegate(0); - printf("End linebreak\n"); + debug(2,"End linebreak\n"); } //---------------------------------------------------------------------- @@ -547,13 +557,13 @@ HRulerHandler::~HRulerHandler() void HRulerHandler::startHRuler(const QXmlAttributes& /*attrib*/) { m_parent->setDelegate(this); - printf("Start hruler\n"); + debug(2,"Start hruler\n"); } void HRulerHandler::endHRuler() { m_parent->setDelegate(0); - printf("End hruler\n"); + debug(2,"End hruler\n"); } //---------------------------------------------------------------------- @@ -573,9 +583,12 @@ RefHandler::~RefHandler() void RefHandler::startRef(const QXmlAttributes& attrib) { m_parent->setDelegate(this); - m_refId = attrib.value("idref"); - m_anchor = attrib.value("anchor"); - printf("Start ref refId=%s anchor=%s\n",m_refId.data(),m_anchor.data()); + m_refId = attrib.value("refid"); + m_refId = attrib.value("external"); + ASSERT(attrib.value("kindref")=="compound" || + attrib.value("kindref")=="member"); + m_targetKind = attrib.value("kindref")=="compound" ? Compound : Member; + debug(2,"Start ref refId=%s\n",m_refId.data()); m_curString=""; } @@ -583,7 +596,7 @@ void RefHandler::endRef() { m_linkText = m_curString; m_parent->setDelegate(0); - printf("End ref: text=`%s'\n",m_linkText.data()); + debug(2,"End ref: text=`%s'\n",m_linkText.data()); } @@ -609,7 +622,7 @@ TitleHandler::~TitleHandler() void TitleHandler::startTitle(const QXmlAttributes& /*attrib*/) { m_parent->setDelegate(this); - printf("Start title\n"); + debug(2,"Start title\n"); m_curString=""; } @@ -617,7 +630,7 @@ void TitleHandler::endTitle() { addTextNode(); m_parent->setDelegate(0); - printf("End title\n"); + debug(2,"End title\n"); } void TitleHandler::addTextNode() @@ -625,7 +638,7 @@ void TitleHandler::addTextNode() if (!m_curString.isEmpty()) { m_children.append(new TextNode(m_curString,m_markupHandler->markup())); - printf("addTextNode() text=\"%s\" markup=%x\n", + debug(2,"addTextNode() text=\"%s\" markup=%x\n", m_curString.data(),m_markupHandler->markup()); m_curString=""; } @@ -661,14 +674,14 @@ SimpleSectHandler::~SimpleSectHandler() void SimpleSectHandler::startSimpleSect(const QXmlAttributes& attrib) { - m_type = g_typeMapper.stringToType(attrib.value("kind")); - printf("start simple section %s\n",attrib.value("kind").data()); + m_type = s_typeMapper->stringToType(attrib.value("kind")); + debug(2,"start simple section %s\n",attrib.value("kind").data()); m_parent->setDelegate(this); } void SimpleSectHandler::endSimpleSect() { - printf("end simple section\n"); + debug(2,"end simple section\n"); m_parent->setDelegate(0); } @@ -708,25 +721,25 @@ VariableListEntryHandler::~VariableListEntryHandler() void VariableListEntryHandler::startVarListEntry(const QXmlAttributes& /*attrib*/) { m_parent->setDelegate(this); - printf("start varlistentry\n"); + debug(2,"start varlistentry\n"); } void VariableListEntryHandler::endVarListEntry() { m_parent->setDelegate(0); - printf("end varlistentry\n"); + debug(2,"end varlistentry\n"); } void VariableListEntryHandler::startListItem(const QXmlAttributes& /*attrib*/) { m_parent->setDelegate(this); - printf("start listitem\n"); + debug(2,"start listitem\n"); } void VariableListEntryHandler::endListItem() { m_parent->setDelegate(0); - printf("end listitem\n"); + debug(2,"end listitem\n"); } void VariableListEntryHandler::startTerm(const QXmlAttributes& /*attrib*/) @@ -737,7 +750,7 @@ void VariableListEntryHandler::startTerm(const QXmlAttributes& /*attrib*/) void VariableListEntryHandler::endTerm() { m_term = m_curString; - printf("term=%s\n",m_term.data()); + debug(2,"term=%s\n",m_term.data()); } void VariableListEntryHandler::startParagraph(const QXmlAttributes& attrib) @@ -769,12 +782,12 @@ VariableListHandler::~VariableListHandler() void VariableListHandler::startVariableList(const QXmlAttributes& /*attrib*/) { m_parent->setDelegate(this); - printf("start variablelist\n"); + debug(2,"start variablelist\n"); } void VariableListHandler::endVariableList() { - printf("end variablelist\n"); + debug(2,"end variablelist\n"); m_parent->setDelegate(0); } @@ -799,7 +812,9 @@ void VariableListHandler::startListItem(const QXmlAttributes& attrib) HighlightHandler::HighlightHandler(IBaseHandler *parent) : m_parent(parent) { + m_children.setAutoDelete(TRUE); addEndHandler("highlight",this,&HighlightHandler::endHighlight); + addStartHandler("ref",this,&HighlightHandler::startRef); } HighlightHandler::~HighlightHandler() @@ -815,11 +830,30 @@ void HighlightHandler::startHighlight(const QXmlAttributes& attrib) void HighlightHandler::endHighlight() { - m_text = m_curString; - printf("highlight class=`%s' text=`%s'\n",m_class.data(),m_text.data()); + addTextNode(); + debug(2,"highlight class=`%s'\n",m_class.data()); m_parent->setDelegate(0); } +void HighlightHandler::startRef(const QXmlAttributes& attrib) +{ + addTextNode(); + RefHandler *rh = new RefHandler(this); + m_children.append(rh); + rh->startRef(attrib); +} + +void HighlightHandler::addTextNode() +{ + if (!m_curString.isEmpty()) + { + m_children.append(new TextNode(m_curString,IDocMarkup::Normal)); + debug(2,"addTextNode() text=\"%s\"\n", + m_curString.data()); + m_curString=""; + } +} + //---------------------------------------------------------------------- // CodeLineHandler //---------------------------------------------------------------------- @@ -842,20 +876,20 @@ CodeLineHandler::~CodeLineHandler() void CodeLineHandler::startCodeLine(const QXmlAttributes& /*attrib*/) { m_parent->setDelegate(this); - printf("start codeline\n"); + debug(2,"start codeline\n"); } void CodeLineHandler::endCodeLine() { addTextNode(); - printf("end codeline\n"); + debug(2,"end codeline\n"); m_parent->setDelegate(0); } void CodeLineHandler::startLineNumber(const QXmlAttributes& attrib) { m_parent->setDelegate(this); - printf("start linenumber\n"); + debug(2,"start linenumber\n"); m_lineNumber = attrib.value("line").toInt(); m_refId = attrib.value("refid"); } @@ -886,7 +920,7 @@ void CodeLineHandler::addTextNode() if (!m_curString.isEmpty()) { m_children.append(new TextNode(m_curString,IDocMarkup::Normal)); - printf("addTextNode() text=\"%s\"\n", + debug(2,"addTextNode() text=\"%s\"\n", m_curString.data()); m_curString=""; } @@ -914,12 +948,12 @@ ProgramListingHandler::~ProgramListingHandler() void ProgramListingHandler::startProgramListing(const QXmlAttributes& /*attrib*/) { m_parent->setDelegate(this); - printf("start programlisting\n"); + debug(2,"start programlisting\n"); } void ProgramListingHandler::endProgramListing() { - printf("end programlisting\n"); + debug(2,"end programlisting\n"); m_parent->setDelegate(0); } @@ -972,7 +1006,7 @@ void FormulaHandler::startFormula(const QXmlAttributes& attrib) void FormulaHandler::endFormula() { m_text = m_curString; - printf("formula id=`%s' text=`%s'\n",m_id.data(),m_text.data()); + debug(2,"formula id=`%s' text=`%s'\n",m_id.data(),m_text.data()); m_parent->setDelegate(0); } @@ -1000,7 +1034,7 @@ void ImageHandler::startImage(const QXmlAttributes& attrib) void ImageHandler::endImage() { m_caption = m_curString; - printf("image name=`%s' caption=`%s'\n",m_name.data(),m_caption.data()); + debug(2,"image name=`%s' caption=`%s'\n",m_name.data(),m_caption.data()); m_parent->setDelegate(0); } @@ -1028,7 +1062,7 @@ void DotFileHandler::startDotFile(const QXmlAttributes& attrib) void DotFileHandler::endDotFile() { m_caption = m_curString; - printf("image name=`%s' caption=`%s'\n",m_name.data(),m_caption.data()); + debug(2,"image name=`%s' caption=`%s'\n",m_name.data(),m_caption.data()); m_parent->setDelegate(0); } @@ -1052,13 +1086,13 @@ IndexEntryHandler::~IndexEntryHandler() void IndexEntryHandler::startIndexEntry(const QXmlAttributes& /*attrib*/) { - printf("start index entry\n"); + debug(2,"start index entry\n"); m_parent->setDelegate(this); } void IndexEntryHandler::endIndexEntry() { - printf("index entry primary=`%s' secondary=`%s'\n", + debug(2,"index entry primary=`%s' secondary=`%s'\n", m_primary.data(),m_secondary.data()); m_parent->setDelegate(0); } @@ -1171,7 +1205,7 @@ void TableHandler::startTable(const QXmlAttributes& attrib) { m_parent->setDelegate(this); m_numColumns = attrib.value("cols").toInt(); - printf("table cols=%d\n",m_numColumns); + debug(2,"table cols=%d\n",m_numColumns); } void TableHandler::endTable() @@ -1237,13 +1271,13 @@ ParagraphHandler::~ParagraphHandler() void ParagraphHandler::startParagraph(const QXmlAttributes& /*attrib*/) { m_parent->setDelegate(this); - printf("para\n"); + debug(2,"para\n"); } void ParagraphHandler::endParagraph() { addTextNode(); - printf("end para\n"); + debug(2,"end para\n"); m_parent->setDelegate(0); } @@ -1388,7 +1422,7 @@ void ParagraphHandler::addTextNode() if (!m_curString.isEmpty()) { m_children.append(new TextNode(m_curString,m_markupHandler->markup())); - printf("addTextNode() text=\"%s\" markup=%x\n", + debug(2,"addTextNode() text=\"%s\" markup=%x\n", m_curString.data(),m_markupHandler->markup()); m_curString=""; } @@ -1423,7 +1457,7 @@ DocSectionHandler::~DocSectionHandler() void DocSectionHandler::startDocSection(const QXmlAttributes& attrib) { m_parent->setDelegate(this); - printf("Start docsection\n"); + debug(2,"Start docsection\n"); m_id = attrib.value("id"); m_curString=""; } @@ -1432,7 +1466,7 @@ void DocSectionHandler::endDocSection() { addTextNode(); m_parent->setDelegate(0); - printf("End docsection\n"); + debug(2,"End docsection\n"); } void DocSectionHandler::addTextNode() @@ -1440,7 +1474,7 @@ void DocSectionHandler::addTextNode() if (!m_curString.isEmpty()) { m_children.append(new TextNode(m_curString,m_markupHandler->markup())); - printf("addTextNode() text=\"%s\" markup=%x\n", + debug(2,"addTextNode() text=\"%s\" markup=%x\n", m_curString.data(),m_markupHandler->markup()); m_curString=""; } @@ -1483,12 +1517,12 @@ DocHandler::~DocHandler() void DocHandler::startDoc(const QXmlAttributes& /*attrib*/) { m_parent->setDelegate(this); - printf("start dochandler\n"); + debug(2,"start dochandler\n"); } void DocHandler::endDoc() { - printf("end dochandler\n"); + debug(2,"end dochandler\n"); m_parent->setDelegate(0); } diff --git a/addon/doxmlparser/src/dochandler.h b/addon/doxmlparser/src/dochandler.h index e72ad41..3aaef72 100644 --- a/addon/doxmlparser/src/dochandler.h +++ b/addon/doxmlparser/src/dochandler.h @@ -3,7 +3,7 @@ * $Id$ * * - * Copyright (C) 1997-2001 by Dimitri van Heesch. + * Copyright (C) 1997-2002 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 @@ -449,11 +449,16 @@ class RefHandler : public IDocRef, public BaseHandler // IDocRef virtual Kind kind() const { return Ref; } virtual QString refId() const { return m_refId; } + virtual TargetKind targetKind() const { return m_targetKind; } + virtual QString external() const { return m_extId; } + virtual QString text() const { return m_linkText; } private: IBaseHandler *m_parent; - QString m_refId; - QString m_linkText; + QString m_refId; + QString m_extId; + QString m_linkText; + TargetKind m_targetKind; }; //----------------------------------------------------------------------------- @@ -582,7 +587,7 @@ class VariableListHandler : public IDocVariableList, public BaseHandler { public: @@ -590,14 +595,17 @@ class HighlightHandler : public IDocHighlight, public BaseHandler m_children; }; //----------------------------------------------------------------------------- @@ -915,4 +923,7 @@ class DocIterator : public BaseIterator BaseIterator(handler.m_children) {} }; +void dochandler_init(); +void dochandler_exit(); + #endif diff --git a/addon/doxmlparser/src/doxmlintf.h b/addon/doxmlparser/src/doxmlintf.h index 390e9bb..0ca2cc8 100644 --- a/addon/doxmlparser/src/doxmlintf.h +++ b/addon/doxmlparser/src/doxmlintf.h @@ -5,12 +5,15 @@ class IMember; class IDocIterator; +class ICompound; +class ISection; class ILinkedText { public: enum Kind { Kind_Text, Kind_Ref }; virtual Kind kind() const = 0; + virtual ~ILinkedText() {} }; class ILT_Text : public ILinkedText @@ -49,6 +52,7 @@ class IParam virtual QString attrib() const = 0; virtual QString arraySpecifier() const = 0; virtual ILinkedTextIterator *defaultValue() const = 0; + virtual ~IParam() {} }; class IParamIterator @@ -67,6 +71,7 @@ class IMemberReference public: virtual IMember *member() const = 0; virtual QString memberName() const = 0; + virtual ~IMemberReference() {} }; class IMemberReferenceIterator @@ -85,6 +90,7 @@ class IEnumValue public: virtual QString name() const = 0; virtual QString initializer() const = 0; + virtual ~IEnumValue() {} }; class IEnumValueIterator @@ -136,6 +142,7 @@ class IDoc Root // 30 -> IDocRoot }; virtual Kind kind() const = 0; + virtual ~IDoc() {} }; class IDocMarkup : public IDoc @@ -234,7 +241,7 @@ class IDocRef : public IDoc { public: enum TargetKind { Member, Compound }; - virtual QString id() const = 0; + virtual QString refId() const = 0; virtual TargetKind targetKind() const = 0; virtual QString external() const = 0; virtual QString text() const = 0; @@ -340,11 +347,19 @@ class IDocIterator class IMember { public: - virtual QString kind() const = 0; + enum MemberKind { Invalid=0, + Define, Property, Variable, Typedef, Enum, + Function, Signal, Prototype, Friend, DCOP, Slot + }; + virtual ICompound *compound() const = 0; + virtual ISection *section() const = 0; + virtual MemberKind kind() const = 0; + virtual QString kindString() const = 0; virtual QString id() const = 0; virtual QString protection() const = 0; virtual QString virtualness() const = 0; virtual ILinkedTextIterator *type() const = 0; + virtual QString typeString() const = 0; virtual QString name() const = 0; virtual bool isConst() const = 0; virtual bool isVolatile() const = 0; @@ -362,6 +377,7 @@ class IMember virtual IEnumValueIterator *enumValues() const = 0; virtual IDocRoot *briefDescription() const = 0; virtual IDocRoot *detailedDescription() const = 0; + virtual ~IMember() {} }; class IMemberIterator @@ -378,8 +394,26 @@ class IMemberIterator class ISection { public: - virtual QString kind() const = 0; + enum SectionKind { Invalid=0, + UserDefined, + PubTypes, PubFuncs, PubAttribs, PubSlots, + Signals, DCOPFuncs, Properties, + PubStatFuncs, PubStatAttribs, + ProTypes, ProFuncs, ProAttribs, ProSlots, + ProStatFuncs, ProStatAttribs, + PriTypes, PriFuncs, PriAttribs, PriSlots, + PriStatFuncs, PriStatAttribs, + Friend, Related, Defines, Prototypes, Typedefs, + Enums, Functions, Variables + }; + virtual QString kindString() const = 0; + virtual SectionKind kind() const = 0; virtual IMemberIterator *members() const = 0; + virtual bool isStatic() const = 0; + virtual bool isPublic() const = 0; + virtual bool isPrivate() const = 0; + virtual bool isProtected() const = 0; + virtual ~ISection() {} }; class ISectionIterator @@ -396,21 +430,42 @@ class ISectionIterator class ICompound { public: + enum CompoundKind { Invalid=0, + Class, Struct, Union, Interface, Exception, + Namespace, File, Group, Page, Package + }; virtual QString name() const = 0; virtual QString id() const = 0; - virtual QString kind() const = 0; + virtual CompoundKind kind() const = 0; + virtual QString kindString() const = 0; virtual ISectionIterator *sections() const = 0; virtual IDocRoot *briefDescription() const = 0; virtual IDocRoot *detailedDescription() const = 0; + + /*! Returns an interface to a member given its id. + * @param id The member id. + */ + virtual IMember *memberById(const QString &id) const = 0; + + /*! Returns a list of all members within the compound having a certain + * name. Overloading is the reason why there can be more than one member. + * @param name The name of the member. + */ + virtual IMemberIterator *memberByName(const QString &name) const = 0; + + /*! Decreases the reference counter for this compound. If it reaches + * zero, the memory for the compound will be released. + */ + virtual void release() = 0; }; class ICompoundIterator { public: - virtual ICompound *toFirst() = 0; - virtual ICompound *toLast() = 0; - virtual ICompound *toNext() = 0; - virtual ICompound *toPrev() = 0; + virtual void toFirst() = 0; + virtual void toLast() = 0; + virtual void toNext() = 0; + virtual void toPrev() = 0; virtual ICompound *current() const = 0; virtual void release() = 0; }; @@ -419,6 +474,7 @@ class ICompoundIterator class IDoxygen { public: + /*! Returns an iterator that can be used to iterate over the list * of compounds found in the project. */ @@ -435,28 +491,43 @@ class IDoxygen */ virtual ICompound *compoundByName(const QString &name) const = 0; - /*! Returns an interface to a member given its id. + /*! Returns an interface to a compound containing a member given it the + * member's id. Given the ICompound interface one can use the same id + * to obtain the IMember interface. * @param id The member id. */ - virtual IMember *memberById(const QString &id) const = 0; + virtual ICompound *memberById(const QString &id) const = 0; - /*! Returns a list of all members with a certain name. + /*! Returns a list of all compounds containing at least one members + * with a certain name. Each compound can be asked to return the + * list of members with that name. * @param name The name of the member. */ - virtual IMemberIterator *memberByName(const QString &name) const = 0; - + virtual ICompoundIterator *memberByName(const QString &name) const = 0; + /*! Releases the memory for the object hierarchy obtained by * createdObjecModelFromXML(). First release all iterators before calling * this function. */ virtual void release() = 0; + + /*! Sets the debug level. + * - 0 all debugging messages are disabled (the default). + * - 1 display important messages only + * - 2 display any messages. + */ + virtual void setDebugLevel(int level) = 0; + + /*! Reads an XML directory produced by doxygen and builds up a data + * structure representing the contents of the XML files in the directory. + */ + virtual bool readXMLDir(const char *xmlDirName) = 0; }; -/*! Factory method that creates an object model given an XML file generated - * by doxygen. - * @param xmlFileName The name of the XML to parse. - * @returns An iterface to the object model. +/*! Factory method that creates an empty object model for a doxygen generated XML file. + * Use the readXMLDir() method to build the model from an XML output + * directory containing doxygen output. */ -IDoxygen *createObjectModelFromXML(const char *xmlFileName); +IDoxygen *createObjectModel(); #endif diff --git a/addon/doxmlparser/src/doxmlparser.pro.in b/addon/doxmlparser/src/doxmlparser.pro.in index 7724b47..889f069 100644 --- a/addon/doxmlparser/src/doxmlparser.pro.in +++ b/addon/doxmlparser/src/doxmlparser.pro.in @@ -3,11 +3,13 @@ CONFIG = console staticlib warn_on $extraopts HEADERS = basehandler.h mainhandler.h \ compoundhandler.h sectionhandler.h \ memberhandler.h paramhandler.h \ - dochandler.h linkedtexthandler.h + dochandler.h linkedtexthandler.h \ + debug.h SOURCES = mainhandler.cpp \ compoundhandler.cpp sectionhandler.cpp \ memberhandler.cpp paramhandler.cpp \ - dochandler.cpp linkedtexthandler.cpp + dochandler.cpp linkedtexthandler.cpp \ + basehandler.cpp debug.cpp unix:LIBS += -L../../../lib -lqtools win32:INCLUDEPATH += . win32-mingw:LIBS += -L../../../lib -lqtools diff --git a/addon/doxmlparser/src/linkedtexthandler.cpp b/addon/doxmlparser/src/linkedtexthandler.cpp index fabd0c1..972e32e 100644 --- a/addon/doxmlparser/src/linkedtexthandler.cpp +++ b/addon/doxmlparser/src/linkedtexthandler.cpp @@ -3,7 +3,7 @@ * $Id$ * * - * Copyright (C) 1997-2001 by Dimitri van Heesch. + * Copyright (C) 1997-2002 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 @@ -13,6 +13,7 @@ * */ #include "linkedtexthandler.h" +#include "debug.h" #include class LT_Text : public ILT_Text @@ -46,9 +47,9 @@ class LT_Ref : public ILT_Ref virtual Kind kind() const { return Kind_Ref; } private: - QString m_refId; - QString m_extId; - QString m_text; + QString m_refId; + QString m_extId; + QString m_text; TargetKind m_targetKind; }; @@ -79,7 +80,7 @@ void LinkedTextHandler::end() if (!m_curString.isEmpty()) { m_children.append(new LT_Text(m_curString)); - printf("LinkedTextHandler: add text `%s'\n",m_curString.data()); + debug(2,"LinkedTextHandler: add text `%s'\n",m_curString.data()); m_curString=""; } m_parent->setDelegate(0); @@ -90,7 +91,7 @@ void LinkedTextHandler::startRef(const QXmlAttributes& attrib) if (!m_curString.isEmpty()) { m_children.append(new LT_Text(m_curString)); - printf("LinkedTextHandler: add text `%s'\n",m_curString.data()); + debug(2,"LinkedTextHandler: add text `%s'\n",m_curString.data()); m_curString=""; } ASSERT(m_ref==0); @@ -98,15 +99,34 @@ void LinkedTextHandler::startRef(const QXmlAttributes& attrib) m_ref->setRefId(attrib.value("refid")); m_ref->setExtId(attrib.value("external")); ASSERT(attrib.value("kindref")=="compound" || attrib.value("kindref")=="member"); - m_ref->setTargetKind(attrib.value("kindref")=="compound" ? Compound : Member); + m_ref->setTargetKind(attrib.value("kindref")=="compound" ? ILT_Ref::Compound : ILT_Ref::Member); } void LinkedTextHandler::endRef() { m_ref->setText(m_curString); m_children.append(m_ref); - printf("LinkedTextHandler: add ref `%s'\n",m_ref->text().data()); + debug(2,"LinkedTextHandler: add ref `%s'\n",m_ref->text().data()); m_ref=0; } +QString LinkedTextHandler::toString(const QList &list) +{ + QListIterator li(list); + QString result; + ILinkedText *lt; + for (li.toFirst();(lt=li.current());++li) + { + switch(lt->kind()) + { + case ILinkedText::Kind_Text: + result+=dynamic_cast(lt)->text(); + break; + case ILinkedText::Kind_Ref: + result+=dynamic_cast(lt)->text(); + break; + } + } + return result; +} diff --git a/addon/doxmlparser/src/linkedtexthandler.h b/addon/doxmlparser/src/linkedtexthandler.h index 0569b00..6055d29 100644 --- a/addon/doxmlparser/src/linkedtexthandler.h +++ b/addon/doxmlparser/src/linkedtexthandler.h @@ -3,7 +3,7 @@ * $Id$ * * - * Copyright (C) 1997-2001 by Dimitri van Heesch. + * Copyright (C) 1997-2002 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 @@ -36,6 +36,7 @@ class LinkedTextHandler : public BaseHandler virtual void end(); virtual void startRef(const QXmlAttributes& attrib); virtual void endRef(); + static QString toString(const QList &list); private: IBaseHandler *m_parent; diff --git a/addon/doxmlparser/src/mainhandler.cpp b/addon/doxmlparser/src/mainhandler.cpp index 7d0e682..99cb665 100644 --- a/addon/doxmlparser/src/mainhandler.cpp +++ b/addon/doxmlparser/src/mainhandler.cpp @@ -3,7 +3,7 @@ * $Id$ * * - * Copyright (C) 1997-2001 by Dimitri van Heesch. + * Copyright (C) 1997-2002 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 @@ -15,112 +15,261 @@ #include #include "mainhandler.h" +#include "compoundhandler.h" +#include "debug.h" -MainHandler::MainHandler() : m_compoundDict(10007), m_compoundNameDict(10007) +class ErrorHandler : public QXmlErrorHandler +{ + public: + virtual ~ErrorHandler() {} + bool warning( const QXmlParseException & ) + { + return FALSE; + } + bool error( const QXmlParseException & ) + { + return FALSE; + } + bool fatalError( const QXmlParseException &exception ) + { + debug(1,"Fatal error at line %d column %d: %s\n", + exception.lineNumber(),exception.columnNumber(), + exception.message().data()); + return FALSE; + } + QString errorString() { return ""; } + + private: + QString errorMsg; +}; + +//-------------------------------------------------------------------------- + +class CompoundEntryIterator : public ICompoundIterator, + public QListIterator +{ + public: + CompoundEntryIterator(const MainHandler *m,const QList &list) : + QListIterator(list), m_mainHandler(m) {} + virtual ~CompoundEntryIterator() {} + + virtual void toFirst() + { + QListIterator::toFirst(); + } + virtual void toLast() + { + QListIterator::toLast(); + } + virtual void toNext() + { + QListIterator::operator++(); + } + virtual void toPrev() + { + QListIterator::operator--(); + } + virtual ICompound *current() const + { + CompoundEntry *ch = QListIterator::current(); + return ch ? m_mainHandler->compoundById(ch->id) : 0; + } + virtual void release() + { delete this; } + + private: + const MainHandler *m_mainHandler; +}; + +//-------------------------------------------------------------------------- + +MainHandler::MainHandler() : m_compoundDict(2999), m_compoundNameDict(2999), + m_memberDict(12251), m_memberNameDict(12251), + m_compoundsLoaded(1009) { m_compounds.setAutoDelete(TRUE); + m_memberNameDict.setAutoDelete(TRUE); addStartHandler("doxygen"); - addStartHandler("compounddef",this,&MainHandler::startCompound); addEndHandler("doxygen"); - addEndHandler("compounddef"); + addStartHandler("compound",this,&MainHandler::startCompound); + addEndHandler("compound"); + addStartHandler("member",this,&MainHandler::startMember); + addEndHandler("member",this,&MainHandler::endMember); + addStartHandler("name",this,&MainHandler::startName); + addEndHandler("name",this,&MainHandler::endName); + m_curCompound = 0; } MainHandler::~MainHandler() { - printf("MainHandler::~MainHandler()\n"); + debug(2,"MainHandler::~MainHandler()\n"); } void MainHandler::startCompound(const QXmlAttributes& attrib) { - CompoundHandler *compHandler = new CompoundHandler(this); - compHandler->startCompound(attrib); - m_compounds.append(compHandler); + m_curCompound = new CompoundEntry(257); + m_curCompound->id = attrib.value("id"); + m_compounds.append(m_curCompound); + m_compoundDict.insert(m_curCompound->id,m_curCompound); } -void MainHandler::insertMemberById(const QString &id,IMember *h) +void MainHandler::startName(const QXmlAttributes& /*attrib*/) { - m_memberDict.insert(id,h); + m_curString = ""; } -void MainHandler::insertMemberByName(const QString &name,IMember *h) +void MainHandler::endName() { - QList *ml = m_memberNameDict[name]; - if (ml) + m_curCompound->name = m_curString; +} + +void MainHandler::startMember(const QXmlAttributes& attrib) +{ + m_curString = ""; + m_curMember = new MemberEntry; + m_curMember->id = attrib.value("id"); + m_curMember->compound = m_curCompound; + m_memberDict.insert(m_curMember->id,m_curMember); +} + +void MainHandler::endMember() +{ + m_curMember->name = m_curString; + m_curCompound->memberDict.insert(m_curString,m_curMember); + QList *cel=0; + if ((cel=m_memberNameDict.find(m_curString))==0) { - ml->append(h); + cel = new QList; + m_memberNameDict.insert(m_curString,cel); } - else + cel->append(m_curCompound); +} + +void MainHandler::setDebugLevel(int level) +{ + ::setDebugLevel(level); +} + +void MainHandler::dump() +{ + QListIterator cli(m_compounds); + CompoundEntry *ce; + for (cli.toFirst();(ce=cli.current());++cli) { - ml = new QList; - ml->append(h); - m_memberNameDict.insert(name,ml); + debug(2,"compound id=`%s' name=`%s'\n",ce->id.data(),ce->name.data()); + QDictIterator mdi(ce->memberDict); + MemberEntry *me; + for (mdi.toFirst();(me=mdi.current());++mdi) + { + debug(2," member id=`%s' name=`%s'\n",me->id.data(),me->name.data()); + } } } -void MainHandler::initialize() +bool MainHandler::readXMLDir(const char * xmlDirName) { - QListIterator mci(m_compounds); - CompoundHandler *compHandler; - for (;(compHandler=(CompoundHandler *)mci.current());++mci) + m_xmlDirName = xmlDirName; + QString xmlFileName=m_xmlDirName+"/index.xml"; + QFile xmlFile(xmlFileName); + //printf("Trying %s xmlFile.exists()=%d isReadable()=%d\n", + // xmlFileName.data(),xmlFile.exists(),xmlFile.isReadable()); + if (xmlFile.exists()) { - compHandler->initialize(this); - m_compoundNameDict.insert(compHandler->name(),compHandler); - m_compoundDict.insert(compHandler->id(),compHandler); + ErrorHandler errorHandler; + QXmlInputSource source( xmlFile ); + QXmlSimpleReader reader; + reader.setContentHandler( this ); + reader.setErrorHandler( &errorHandler ); + reader.parse( source ); + dump(); + return TRUE; } + return FALSE; +} + +ICompoundIterator *MainHandler::compounds() const +{ + return new CompoundEntryIterator(this,m_compounds); +} - // for each member - QDictIterator< QList > mndi(m_memberNameDict); - QList *ml; - for (;(ml=mndi.current());++mndi) +ICompound *MainHandler::compoundById(const QString &id) const +{ + if (id.isEmpty()) return 0; + CompoundHandler *ch = m_compoundsLoaded[id]; + if (ch) // compound already in memory { - QListIterator mli(*ml); - IMember *mem; - for (;(mem=mli.current());++mli) - { - ((MemberHandler*)mem)->initialize(this); - } + ch->addref(); // returning alias -> increase reference counter + return ch; + } + CompoundEntry *ce = m_compoundDict.find(id); + if (ce==0) return 0; // id not found + // create and load a new compound + ch = new CompoundHandler(m_xmlDirName); + if (!ch->parseXML(id)) + { + // compound could not be initialized. + delete ch; + return 0; } + // we disregard the constness here, because the object stays conceptually + // unchanged. + MainHandler *that = (MainHandler *)this; + ch->initialize(that); + that->m_compoundsLoaded.insert(id,ch); + return ch; } -class ErrorHandler : public QXmlErrorHandler +void MainHandler::unloadCompound(CompoundHandler *ch) { - public: - virtual ~ErrorHandler() {} - bool warning( const QXmlParseException & ) - { - return FALSE; - } - bool error( const QXmlParseException & ) - { - return FALSE; - } - bool fatalError( const QXmlParseException &exception ) - { - fprintf(stderr,"Fatal error at line %d column %d: %s\n", - exception.lineNumber(),exception.columnNumber(), - exception.message().data()); - return FALSE; - } - QString errorString() { return ""; } + m_compoundsLoaded.remove(ch->id()); +} - private: - QString errorMsg; -}; +ICompound *MainHandler::compoundByName(const QString &name) const +{ + if (name.isEmpty()) return 0; + CompoundEntry *ce = m_compoundNameDict[name]; + if (ce==0) return 0; // name not found + return compoundById(ce->id); +} -IDoxygen *createObjectModelFromXML(const char * xmlFileName) +ICompound *MainHandler::memberById(const QString &id) const { - QFile xmlFile(xmlFileName); - MainHandler * handler = new MainHandler; - ErrorHandler errorHandler; - QXmlInputSource source( xmlFile ); - QXmlSimpleReader reader; - reader.setContentHandler( handler ); - reader.setErrorHandler( &errorHandler ); - reader.parse( source ); - printf("<---------- initialize ----------->\n"); - handler->initialize(); - printf("<-------- end initialize --------->\n"); - return handler; + if (id.isEmpty()) return 0; + MemberEntry *me = m_memberDict[id]; + if (me==0) return 0; // id not found + return compoundById(me->id); +} + +ICompoundIterator *MainHandler::memberByName(const QString &name) const +{ + if (name.isEmpty()) return 0; + QList *cel = m_memberNameDict[name]; + if (cel==0) return 0; // name not found + return new CompoundEntryIterator(this,*cel); +} + +IDoxygen *createObjectModel() +{ + compoundhandler_init(); + sectionhandler_init(); + memberhandler_init(); + dochandler_init(); + return new MainHandler; +} + +void MainHandler::release() +{ + QDictIterator chi(m_compoundsLoaded); + CompoundHandler *ch; + for (chi.toFirst();(ch=chi.current());++chi) + { + debug(1,"Compound %s not released\n",ch->name().data()); + } + dochandler_exit(); + memberhandler_exit(); + sectionhandler_exit(); + compoundhandler_exit(); + delete this; } diff --git a/addon/doxmlparser/src/mainhandler.h b/addon/doxmlparser/src/mainhandler.h index e466b6f..da7fe75 100644 --- a/addon/doxmlparser/src/mainhandler.h +++ b/addon/doxmlparser/src/mainhandler.h @@ -3,7 +3,7 @@ * $Id$ * * - * Copyright (C) 1997-2001 by Dimitri van Heesch. + * Copyright (C) 1997-2002 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 @@ -22,47 +22,60 @@ #include #include "memberhandler.h" +struct CompoundEntry; + +struct IndexEntry +{ + QString id; + QString name; +}; + +struct MemberEntry : public IndexEntry +{ + CompoundEntry *compound; +}; + +struct CompoundEntry : public IndexEntry +{ + CompoundEntry(int size) : memberDict(size) + { memberDict.setAutoDelete(TRUE); } + QDict memberDict; +}; + class MainHandler : public IDoxygen, public BaseHandler { public: virtual void startCompound(const QXmlAttributes& attrib); + virtual void startMember(const QXmlAttributes& attrib); + virtual void endMember(); + virtual void startName(const QXmlAttributes& attrib); + virtual void endName(); MainHandler(); virtual ~MainHandler(); - ICompoundIterator *compounds() const - { - return new CompoundIterator(m_compounds); - } - ICompound *compoundById(const QString &id) const - { - return m_compoundDict[id]; - } - virtual ICompound *compoundByName(const QString &name) const - { - return name.isEmpty() ? 0 : m_compoundNameDict[name]; - } - virtual IMember *memberById(const QString &id) const - { - return m_memberDict[id]; - } - virtual IMemberIterator *memberByName(const QString &name) const - { - QList *ml = m_memberNameDict[name]; - if (ml==0) return 0; - return new MemberIterator(*ml); - } - virtual void release() { delete this; } - void insertMemberById(const QString &id,IMember *h); - void insertMemberByName(const QString &name,IMember *h); + // IDoxygen + ICompoundIterator *compounds() const; + ICompound *compoundById(const QString &id) const; + virtual ICompound *compoundByName(const QString &name) const; + virtual ICompound *memberById(const QString &id) const; + virtual ICompoundIterator *memberByName(const QString &name) const; - void initialize(); + virtual void release(); + void setDebugLevel(int level); + bool readXMLDir(const char *dirName); + void dump(); + void unloadCompound(CompoundHandler *ch); private: - QList m_compounds; - QDict m_compoundDict; - QDict m_compoundNameDict; - QDict m_memberDict; - QDict > m_memberNameDict; + CompoundEntry *m_curCompound; + MemberEntry *m_curMember; + QList m_compounds; + QDict m_compoundDict; + QDict m_compoundNameDict; + QDict m_memberDict; + QDict > m_memberNameDict; + QString m_xmlDirName; + QDict m_compoundsLoaded; }; #endif diff --git a/addon/doxmlparser/src/memberhandler.cpp b/addon/doxmlparser/src/memberhandler.cpp index f211f8e..d98035b 100644 --- a/addon/doxmlparser/src/memberhandler.cpp +++ b/addon/doxmlparser/src/memberhandler.cpp @@ -3,7 +3,7 @@ * $Id$ * * - * Copyright (C) 1997-2001 by Dimitri van Heesch. + * Copyright (C) 1997-2002 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 @@ -18,6 +18,53 @@ #include "dochandler.h" #include "mainhandler.h" #include "linkedtexthandler.h" +#include "debug.h" + +//------------------------------------------------------------------------------ + +class MemberTypeMap +{ + public: + MemberTypeMap() + { + m_map.setAutoDelete(TRUE); + m_map.insert("define",new int(IMember::Define)); + m_map.insert("property",new int(IMember::Property)); + m_map.insert("variable",new int(IMember::Variable)); + m_map.insert("typedef",new int(IMember::Typedef)); + m_map.insert("enum",new int(IMember::Enum)); + m_map.insert("function",new int(IMember::Function)); + m_map.insert("signal",new int(IMember::Signal)); + m_map.insert("prototype",new int(IMember::Prototype)); + m_map.insert("friend",new int(IMember::Friend)); + m_map.insert("dcop",new int(IMember::DCOP)); + m_map.insert("slot",new int(IMember::Slot)); + } + IMember::MemberKind map(const QString &s) + { + int *val = m_map.find(s); + if (val==0) + { + debug(1,"Warning: `%s' is an invalid member type\n",s.data()); + return IMember::Invalid; + } + else return (IMember::MemberKind)*val; + } + private: + QDict m_map; +}; + +static MemberTypeMap *s_typeMap; + +void memberhandler_init() +{ + s_typeMap = new MemberTypeMap; +} + +void memberhandler_exit() +{ + delete s_typeMap; +} //------------------------------------------------------------------------------ @@ -28,7 +75,8 @@ void MemberReference::initialize(MainHandler *mh) IMember *MemberReference::member() const { - return m_mainHandler->memberById(m_memId); + //return m_mainHandler->memberById(m_memId); + return 0; } //------------------------------------------------------------------------------ @@ -77,8 +125,9 @@ void EnumValueHandler::endInitializer() //------------------------------------------------------------------------------ MemberHandler::MemberHandler(IBaseHandler *parent) - : m_parent(parent), m_brief(0), m_detailed(0) + : m_parent(parent), m_compound(0), m_brief(0), m_detailed(0) { + //printf("MemberHandler::MemberHandler() %p\n",this); addEndHandler("memberdef",this,&MemberHandler::endMember); addStartHandler("type",this,&MemberHandler::startType); @@ -110,6 +159,9 @@ MemberHandler::MemberHandler(IBaseHandler *parent) addStartHandler("location",this,&MemberHandler::startLocation); addEndHandler("location"); + m_type.setAutoDelete(TRUE); + m_initializer.setAutoDelete(TRUE); + m_exception.setAutoDelete(TRUE); m_params.setAutoDelete(TRUE); m_references.setAutoDelete(TRUE); m_referencedBy.setAutoDelete(TRUE); @@ -124,22 +176,25 @@ MemberHandler::MemberHandler(IBaseHandler *parent) MemberHandler::~MemberHandler() { + debug(2,"MemberHandler::~MemberHandler() %p\n",this); delete m_brief; delete m_detailed; delete m_linkedTextHandler; + delete m_reimplements; } void MemberHandler::startMember(const QXmlAttributes& attrib) { m_parent->setDelegate(this); - m_kind = attrib.value("kind"); + m_kindString = attrib.value("kind"); + m_kind = s_typeMap->map(m_kindString); m_id = attrib.value("id"); m_virtualness = attrib.value("virt"); m_protection = attrib.value("prot"); m_isConst = attrib.value("const")=="yes"; m_isVolatile = attrib.value("volatile")=="yes"; - printf("member kind=`%s' id=`%s' prot=`%s' virt=`%s'\n", - m_kind.data(),m_id.data(),m_protection.data(),m_virtualness.data()); + debug(2,"member kind=`%s' id=`%s' prot=`%s' virt=`%s'\n", + m_kindString.data(),m_id.data(),m_protection.data(),m_virtualness.data()); } void MemberHandler::startBriefDesc(const QXmlAttributes& attrib) @@ -226,7 +281,7 @@ void MemberHandler::endMember() void MemberHandler::startType(const QXmlAttributes &) { - printf("startType!\n"); + debug(2,"startType!\n"); delete m_linkedTextHandler; m_linkedTextHandler = new LinkedTextHandler(this,m_type); m_linkedTextHandler->start("type"); @@ -234,7 +289,7 @@ void MemberHandler::startType(const QXmlAttributes &) void MemberHandler::startInitializer(const QXmlAttributes &) { - printf("startInitializer!\n"); + debug(2,"startInitializer!\n"); delete m_linkedTextHandler; m_linkedTextHandler = new LinkedTextHandler(this,m_initializer); m_linkedTextHandler->start("initializer"); @@ -242,7 +297,7 @@ void MemberHandler::startInitializer(const QXmlAttributes &) void MemberHandler::startException(const QXmlAttributes &) { - printf("startException!\n"); + debug(2,"startException!\n"); delete m_linkedTextHandler; m_linkedTextHandler = new LinkedTextHandler(this,m_exception); m_linkedTextHandler->start("exception"); @@ -251,7 +306,7 @@ void MemberHandler::startException(const QXmlAttributes &) void MemberHandler::endName() { m_name = m_curString.stripWhiteSpace(); - printf("member name=`%s'\n",m_name.data()); + debug(2,"member name=`%s'\n",m_name.data()); } void MemberHandler::startParam(const QXmlAttributes& attrib) @@ -297,3 +352,25 @@ void MemberHandler::initialize(MainHandler *mh) if (m_reimplements) m_reimplements->initialize(mh); } +void MemberHandler::setCompoundHandler(CompoundHandler *c) +{ + m_compound = c; +} + +ICompound *MemberHandler::compound() const +{ + m_compound->addref(); + return m_compound; +} + +void MemberHandler::setSectionHandler(SectionHandler *c) +{ + m_section = c; +} + +ISection *MemberHandler::section() const +{ + return m_section; +} + + diff --git a/addon/doxmlparser/src/memberhandler.h b/addon/doxmlparser/src/memberhandler.h index b599e2f..3232a4c 100644 --- a/addon/doxmlparser/src/memberhandler.h +++ b/addon/doxmlparser/src/memberhandler.h @@ -3,7 +3,7 @@ * $Id$ * * - * Copyright (C) 1997-2001 by Dimitri van Heesch. + * Copyright (C) 1997-2002 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 @@ -28,6 +28,8 @@ #include "dochandler.h" class MainHandler; +class CompoundHandler; +class SectionHandler; struct MemberReference : public IMemberReference { @@ -48,13 +50,6 @@ class MemberReferenceIterator : public BaseIterator(list) {} }; -class MemberIterator : public BaseIterator -{ - public: - MemberIterator(const QList &list) : - BaseIterator(list) {} -}; - class EnumValueHandler : public IEnumValue, public BaseHandler { public: @@ -116,8 +111,12 @@ class MemberHandler : public IMember, public BaseHandler virtual ~MemberHandler(); // IMember implementation - virtual QString kind() const + virtual ICompound *compound() const; + virtual ISection *section() const; + virtual MemberKind kind() const { return m_kind; } + virtual QString kindString() const + { return m_kindString; } virtual QString id() const { return m_id; } virtual QString protection() const @@ -132,6 +131,8 @@ class MemberHandler : public IMember, public BaseHandler { return m_isVolatile; } virtual ILinkedTextIterator *type() const { return new LinkedTextIterator(m_type); } + virtual QString typeString() const + { return LinkedTextHandler::toString(m_type); } virtual IParamIterator *params() const { return new ParamIterator(m_params); } virtual IMemberReferenceIterator *references() const @@ -162,10 +163,15 @@ class MemberHandler : public IMember, public BaseHandler { return m_detailed; } void initialize(MainHandler *m); + void setCompoundHandler(CompoundHandler *c); + void setSectionHandler(SectionHandler *s); private: IBaseHandler *m_parent; - QString m_kind; + CompoundHandler *m_compound; + SectionHandler *m_section; + MemberKind m_kind; + QString m_kindString; QString m_id; QString m_protection; QString m_virtualness; @@ -190,4 +196,14 @@ class MemberHandler : public IMember, public BaseHandler QList m_enumValues; }; +class MemberIterator : public BaseIterator +{ + public: + MemberIterator(const QList &list) : + BaseIterator(list) {} +}; + +void memberhandler_init(); +void memberhandler_exit(); + #endif diff --git a/addon/doxmlparser/src/paramhandler.cpp b/addon/doxmlparser/src/paramhandler.cpp index 0cf00e4..8647546 100644 --- a/addon/doxmlparser/src/paramhandler.cpp +++ b/addon/doxmlparser/src/paramhandler.cpp @@ -3,7 +3,7 @@ * $Id$ * * - * Copyright (C) 1997-2001 by Dimitri van Heesch. + * Copyright (C) 1997-2002 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 @@ -15,6 +15,7 @@ #include "paramhandler.h" #include "memberhandler.h" +#include "debug.h" ParamHandler::ParamHandler(IBaseHandler *parent) : m_parent(parent) { @@ -41,12 +42,13 @@ ParamHandler::ParamHandler(IBaseHandler *parent) : m_parent(parent) ParamHandler::~ParamHandler() { + delete m_linkedTextHandler; } void ParamHandler::startParam(const QXmlAttributes& /*attrib*/) { m_parent->setDelegate(this); - printf("param\n"); + debug(2,"param\n"); } void ParamHandler::endParam() @@ -59,39 +61,39 @@ void ParamHandler::startType(const QXmlAttributes& /*attrib*/) delete m_linkedTextHandler; m_linkedTextHandler = new LinkedTextHandler(this,m_type); m_linkedTextHandler->start("type"); - printf("param type\n"); + debug(2,"param type\n"); } void ParamHandler::endDeclName() { m_declName = m_curString.stripWhiteSpace(); - printf("member declName=`%s'\n",m_declName.data()); + debug(2,"member declName=`%s'\n",m_declName.data()); } void ParamHandler::endDefName() { m_defName = m_curString.stripWhiteSpace(); - printf("member defName=`%s'\n",m_defName.data()); + debug(2,"member defName=`%s'\n",m_defName.data()); } void ParamHandler::endAttrib() { m_attrib = m_curString.stripWhiteSpace(); - printf("member attrib=`%s'\n",m_attrib.data()); + debug(2,"member attrib=`%s'\n",m_attrib.data()); } void ParamHandler::endArray() { m_array = m_curString.stripWhiteSpace(); - printf("member array=`%s'\n",m_array.data()); + debug(2,"member array=`%s'\n",m_array.data()); } void ParamHandler::startDefVal(const QXmlAttributes& /*attrib*/) { delete m_linkedTextHandler; m_linkedTextHandler = new LinkedTextHandler(this,m_defVal); - m_linkedTextHandler->start("type"); - printf("member defVal\n"); + m_linkedTextHandler->start("defval"); + debug(2,"member defVal\n"); } diff --git a/addon/doxmlparser/src/paramhandler.h b/addon/doxmlparser/src/paramhandler.h index 6725a5e..ae02e96 100644 --- a/addon/doxmlparser/src/paramhandler.h +++ b/addon/doxmlparser/src/paramhandler.h @@ -3,7 +3,7 @@ * $Id$ * * - * Copyright (C) 1997-2001 by Dimitri van Heesch. + * Copyright (C) 1997-2002 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 diff --git a/addon/doxmlparser/src/sectionhandler.cpp b/addon/doxmlparser/src/sectionhandler.cpp index d1c7b1f..a1d9c44 100644 --- a/addon/doxmlparser/src/sectionhandler.cpp +++ b/addon/doxmlparser/src/sectionhandler.cpp @@ -3,7 +3,7 @@ * $Id$ * * - * Copyright (C) 1997-2001 by Dimitri van Heesch. + * Copyright (C) 1997-2002 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 @@ -16,9 +16,74 @@ #include "mainhandler.h" #include "compoundhandler.h" #include "sectionhandler.h" +#include "debug.h" + +class SectionTypeMap +{ + public: + SectionTypeMap() : m_map(37) + { + m_map.setAutoDelete(TRUE); + m_map.insert("user-defined",new int(ISection::UserDefined)); + m_map.insert("public-type",new int(ISection::PubTypes)); + m_map.insert("public-func",new int(ISection::PubFuncs)); + m_map.insert("public-attrib",new int(ISection::PubAttribs)); + m_map.insert("public-slot",new int(ISection::PubSlots)); + m_map.insert("signal",new int(ISection::Signals)); + m_map.insert("dcop-func",new int(ISection::DCOPFuncs)); + m_map.insert("property",new int(ISection::Properties)); + m_map.insert("public-static-func",new int(ISection::PubStatFuncs)); + m_map.insert("public-static-attrib",new int(ISection::PubStatAttribs)); + m_map.insert("protected-type",new int(ISection::ProTypes)); + m_map.insert("protected-func",new int(ISection::ProFuncs)); + m_map.insert("protected-attrib",new int(ISection::ProAttribs)); + m_map.insert("protected-slot",new int(ISection::ProSlots)); + m_map.insert("protected-static-func",new int(ISection::ProStatFuncs)); + m_map.insert("protected-static-attrib",new int(ISection::ProStatAttribs)); + m_map.insert("private-type",new int(ISection::PriTypes)); + m_map.insert("private-func",new int(ISection::PriFuncs)); + m_map.insert("private-attrib",new int(ISection::PriAttribs)); + m_map.insert("private-slot",new int(ISection::PriSlots)); + m_map.insert("private-static-func",new int(ISection::PriStatFuncs)); + m_map.insert("private-static-attrib",new int(ISection::PriStatAttribs)); + m_map.insert("friend",new int(ISection::Friend)); + m_map.insert("related",new int(ISection::Related)); + m_map.insert("define",new int(ISection::Defines)); + m_map.insert("prototype",new int(ISection::Prototypes)); + m_map.insert("typedef",new int(ISection::Typedefs)); + m_map.insert("enum",new int(ISection::Enums)); + m_map.insert("func",new int(ISection::Functions)); + m_map.insert("var",new int(ISection::Variables)); + } + ISection::SectionKind map(const QString &s) + { + int *val = m_map.find(s); + if (val==0) + { + debug(1,"Warning: `%s' is an invalid section type\n",s.data()); + return ISection::Invalid; + } + else return (ISection::SectionKind)*val; + } + private: + QDict m_map; +}; + +static SectionTypeMap *s_typeMap; + +void sectionhandler_init() +{ + s_typeMap = new SectionTypeMap; +} + +void sectionhandler_exit() +{ + delete s_typeMap; +} SectionHandler::SectionHandler(IBaseHandler *parent) : m_parent(parent) { + //printf("SectionHandler::SectionHandler()\n"); m_members.setAutoDelete(TRUE); addEndHandler("sectiondef",this,&SectionHandler::endSection); addStartHandler("memberdef",this,&SectionHandler::startMember); @@ -26,13 +91,15 @@ SectionHandler::SectionHandler(IBaseHandler *parent) : m_parent(parent) SectionHandler::~SectionHandler() { + debug(2,"SectionHandler::~SectionHandler()\n"); } void SectionHandler::startSection(const QXmlAttributes& attrib) { m_parent->setDelegate(this); - m_kind = attrib.value("kind"); - printf("section kind=`%s'\n",m_kind.data()); + m_kindString = attrib.value("kind"); + m_kind = s_typeMap->map(m_kindString); + debug(2,"section kind=`%s'\n",m_kindString.data()); } void SectionHandler::endSection() @@ -47,14 +114,15 @@ void SectionHandler::startMember(const QXmlAttributes& attrib) m_members.append(memHandler); } -void SectionHandler::initialize(MainHandler *m) +void SectionHandler::initialize(CompoundHandler *ch) { - QListIterator mli(m_members); + QListIterator mli(m_members); MemberHandler *mh; - for (;(mh=(MemberHandler *)mli.current());++mli) + for (;(mh=mli.current());++mli) { - m->insertMemberById(mh->id(),mh); - m->insertMemberByName(mh->name(),mh); + mh->setCompoundHandler(ch); + ch->insertMember(mh); + mh->setSectionHandler(this); } } diff --git a/addon/doxmlparser/src/sectionhandler.h b/addon/doxmlparser/src/sectionhandler.h index 234cce1..1f4b03a 100644 --- a/addon/doxmlparser/src/sectionhandler.h +++ b/addon/doxmlparser/src/sectionhandler.h @@ -3,7 +3,7 @@ * $Id$ * * - * Copyright (C) 1997-2001 by Dimitri van Heesch. + * Copyright (C) 1997-2002 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 @@ -47,16 +47,43 @@ class SectionHandler : public ISection, public BaseHandler virtual ~SectionHandler(); // ISection - virtual QString kind() const { return m_kind; } + virtual QString kindString() const + { return m_kindString; } + virtual SectionKind kind() const + { return m_kind; } virtual IMemberIterator *members() const { return new MemberIterator(m_members); } + virtual bool isStatic() const + { + return m_kind==PubStatFuncs || m_kind==PubStatAttribs || + m_kind==ProStatFuncs || m_kind==ProStatAttribs || + m_kind==PriStatFuncs || m_kind==PriStatAttribs; + } + virtual bool isPublic() const + { + return !isProtected() && !isPrivate(); + } + virtual bool isProtected() const + { + return m_kind==ProTypes || m_kind==ProFuncs || m_kind==ProAttribs || + m_kind==ProSlots || m_kind==ProStatFuncs || m_kind==ProStatAttribs; + } + virtual bool isPrivate() const + { + return m_kind==PriTypes || m_kind==PriFuncs || m_kind==PriAttribs || + m_kind==PriSlots || m_kind==PriStatFuncs || m_kind==PriStatAttribs; + } - void initialize(MainHandler *m); + void initialize(CompoundHandler *c); private: IBaseHandler *m_parent; - QString m_kind; - QList m_members; + SectionKind m_kind; + QString m_kindString; + QList m_members; }; +void sectionhandler_init(); +void sectionhandler_exit(); + #endif diff --git a/addon/doxmlparser/test/main.cpp b/addon/doxmlparser/test/main.cpp index b94bc0a..092c025 100644 --- a/addon/doxmlparser/test/main.cpp +++ b/addon/doxmlparser/test/main.cpp @@ -3,7 +3,7 @@ * $Id$ * * - * Copyright (C) 1997-2001 by Dimitri van Heesch. + * Copyright (C) 1997-2002 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 @@ -312,11 +312,17 @@ int main(int argc,char **argv) { if (argc!=2) { - printf("Usage: %s file.xml\n",argv[0]); + printf("Usage: %s xmldir\n",argv[0]); exit(1); } - IDoxygen *dox = createObjectModelFromXML(argv[1]); + IDoxygen *dox = createObjectModel(); + + if (!dox->readXMLDir(argv[1])) + { + printf("Error reading %s/index.xml\n",argv[1]); + exit(1); + } ICompoundIterator *cli = dox->compounds(); ICompound *comp; @@ -324,12 +330,12 @@ int main(int argc,char **argv) for (cli->toFirst();(comp=cli->current());cli->toNext()) { printf("Compound name=%s id=%s kind=%s\n", - comp->name().data(),comp->id().data(),comp->kind().data()); + comp->name().data(),comp->id().data(),comp->kindString().data()); ISectionIterator *sli = comp->sections(); ISection *sec; for (sli->toFirst();(sec=sli->current());sli->toNext()) { - printf(" Section kind=%s\n",sec->kind().data()); + printf(" Section kind=%s\n",sec->kindString().data()); IMemberIterator *mli = sec->members(); IMember *mem; for (mli->toFirst();(mem=mli->current());mli->toNext()) @@ -412,6 +418,7 @@ int main(int argc,char **argv) printf("===== detailed description ==== \n"); DumpDoc(doc); } + comp->release(); } cli->release(); printf("---------------------------\n"); diff --git a/addon/doxywizard/Makefile.in b/addon/doxywizard/Makefile.in index 31ed5e3..c382681 100644 --- a/addon/doxywizard/Makefile.in +++ b/addon/doxywizard/Makefile.in @@ -1,7 +1,7 @@ # # # -# Copyright (C) 1997-2001 by Dimitri van Heesch. +# Copyright (C) 1997-2002 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 diff --git a/addon/doxywizard/Makefile.win_nmake.in b/addon/doxywizard/Makefile.win_nmake.in index 5cb4e1c..69d1dbd 100644 --- a/addon/doxywizard/Makefile.win_nmake.in +++ b/addon/doxywizard/Makefile.win_nmake.in @@ -1,7 +1,7 @@ # # # -# Copyright (C) 1997-2001 by Dimitri van Heesch. +# Copyright (C) 1997-2002 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 diff --git a/addon/doxywizard/doxywizard.cpp b/addon/doxywizard/doxywizard.cpp index 54b592e..5fbd5e4 100644 --- a/addon/doxywizard/doxywizard.cpp +++ b/addon/doxywizard/doxywizard.cpp @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2001 by Dimitri van Heesch. + * Copyright (C) 1997-2002 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 diff --git a/addon/doxywizard/doxywizard.h b/addon/doxywizard/doxywizard.h index be99539..17b54d1 100644 --- a/addon/doxywizard/doxywizard.h +++ b/addon/doxywizard/doxywizard.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2001 by Dimitri van Heesch. + * Copyright (C) 1997-2002 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 diff --git a/addon/doxywizard/doxywizard.pro.in b/addon/doxywizard/doxywizard.pro.in index d36db53..d0748f7 100644 --- a/addon/doxywizard/doxywizard.pro.in +++ b/addon/doxywizard/doxywizard.pro.in @@ -1,7 +1,7 @@ # # # -# Copyright (C) 1997-2001 by Dimitri van Heesch. +# Copyright (C) 1997-2002 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 diff --git a/addon/doxywizard/inputbool.cpp b/addon/doxywizard/inputbool.cpp index c77578e..43d994d 100644 --- a/addon/doxywizard/inputbool.cpp +++ b/addon/doxywizard/inputbool.cpp @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2001 by Dimitri van Heesch. + * Copyright (C) 1997-2002 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 diff --git a/addon/doxywizard/inputbool.h b/addon/doxywizard/inputbool.h index 2b4d869..ab9728f 100644 --- a/addon/doxywizard/inputbool.h +++ b/addon/doxywizard/inputbool.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2001 by Dimitri van Heesch. + * Copyright (C) 1997-2002 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 diff --git a/addon/doxywizard/inputint.cpp b/addon/doxywizard/inputint.cpp index 702988c..038f0d4 100644 --- a/addon/doxywizard/inputint.cpp +++ b/addon/doxywizard/inputint.cpp @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2001 by Dimitri van Heesch. + * Copyright (C) 1997-2002 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 diff --git a/addon/doxywizard/inputint.h b/addon/doxywizard/inputint.h index 47fbf13..f9e28a1 100644 --- a/addon/doxywizard/inputint.h +++ b/addon/doxywizard/inputint.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2001 by Dimitri van Heesch. + * Copyright (C) 1997-2002 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 diff --git a/addon/doxywizard/inputstring.cpp b/addon/doxywizard/inputstring.cpp index a20ba68..0ca9d15 100644 --- a/addon/doxywizard/inputstring.cpp +++ b/addon/doxywizard/inputstring.cpp @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2001 by Dimitri van Heesch. + * Copyright (C) 1997-2002 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 diff --git a/addon/doxywizard/inputstring.h b/addon/doxywizard/inputstring.h index 1c4554d..a1d443c 100644 --- a/addon/doxywizard/inputstring.h +++ b/addon/doxywizard/inputstring.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2001 by Dimitri van Heesch. + * Copyright (C) 1997-2002 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 diff --git a/addon/doxywizard/inputstrlist.cpp b/addon/doxywizard/inputstrlist.cpp index 9ab9a5b..8b96dc7 100644 --- a/addon/doxywizard/inputstrlist.cpp +++ b/addon/doxywizard/inputstrlist.cpp @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2001 by Dimitri van Heesch. + * Copyright (C) 1997-2002 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 diff --git a/addon/doxywizard/inputstrlist.h b/addon/doxywizard/inputstrlist.h index 115bad2..9595ff9 100644 --- a/addon/doxywizard/inputstrlist.h +++ b/addon/doxywizard/inputstrlist.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2001 by Dimitri van Heesch. + * Copyright (C) 1997-2002 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 diff --git a/addon/doxywizard/pagewidget.cpp b/addon/doxywizard/pagewidget.cpp index 7e6920b..39ba7c9 100644 --- a/addon/doxywizard/pagewidget.cpp +++ b/addon/doxywizard/pagewidget.cpp @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2001 by Dimitri van Heesch. + * Copyright (C) 1997-2002 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 diff --git a/addon/doxywizard/pagewidget.h b/addon/doxywizard/pagewidget.h index 6d238df..14ac6d9 100644 --- a/addon/doxywizard/pagewidget.h +++ b/addon/doxywizard/pagewidget.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2001 by Dimitri van Heesch. + * Copyright (C) 1997-2002 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 diff --git a/addon/doxywizard/pixmaps.cpp b/addon/doxywizard/pixmaps.cpp index 5f2497b..b547b64 100644 --- a/addon/doxywizard/pixmaps.cpp +++ b/addon/doxywizard/pixmaps.cpp @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2001 by Dimitri van Heesch. + * Copyright (C) 1997-2002 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 diff --git a/addon/doxywizard/pixmaps.h b/addon/doxywizard/pixmaps.h index 7ec854e..75d74e6 100644 --- a/addon/doxywizard/pixmaps.h +++ b/addon/doxywizard/pixmaps.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2001 by Dimitri van Heesch. + * Copyright (C) 1997-2002 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 diff --git a/addon/doxywizard/qtbc.h b/addon/doxywizard/qtbc.h index 51f62dd..0f23e42 100644 --- a/addon/doxywizard/qtbc.h +++ b/addon/doxywizard/qtbc.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2001 by Dimitri van Heesch. + * Copyright (C) 1997-2002 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 diff --git a/configure b/configure index d48cf16..c240afb 100755 --- a/configure +++ b/configure @@ -415,7 +415,7 @@ TMAKE_CXXFLAGS += -DENGLISH_ONLY EOF 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" +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" for i in $f_inmakefiles ; do SRC=$i @@ -447,7 +447,7 @@ EOF echo " Created $DST from $SRC..." done -f_inprofiles="qtools/qtools.pro.in src/libdoxygen.pro.in src/libdoxycfg.pro.in src/doxygen.pro.in src/doxytag.pro.in src/doxysearch.pro.in addon/doxywizard/doxywizard.pro.in addon/doxmlparser/src/doxmlparser.pro.in addon/doxmlparser/test/xmlparse.pro.in" +f_inprofiles="qtools/qtools.pro.in src/libdoxygen.pro.in src/libdoxycfg.pro.in src/doxygen.pro.in src/doxytag.pro.in src/doxysearch.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" for i in $f_inprofiles ; do SRC=$i diff --git a/doc/Makefile.win_make.in b/doc/Makefile.win_make.in index 7951ed8..3161b31 100644 --- a/doc/Makefile.win_make.in +++ b/doc/Makefile.win_make.in @@ -13,7 +13,7 @@ # input used in their production; they are not affected by this license. all: language FORCE - @xcopy /y /s /q /i ..\examples ..\html\examples + @xcopy /s /q /i ..\examples ..\html\examples set DOXYGEN_DOCDIR=. & \ set VERSION=$(VERSION) & \ $(DOXYGEN)\bin\doxygen diff --git a/doc/Makefile.win_nmake.in b/doc/Makefile.win_nmake.in index bef074a..05820b0 100644 --- a/doc/Makefile.win_nmake.in +++ b/doc/Makefile.win_nmake.in @@ -13,7 +13,7 @@ # input used in their production; they are not affected by this license. all: language FORCE - @xcopy /y /s /q /i ..\examples ..\html\examples + @xcopy /s /q /i ..\examples ..\html\examples set DOXYGEN_DOCDIR=. set VERSION=$(VERSION) $(DOXYGEN)\bin\doxygen diff --git a/doc/config.doc b/doc/config.doc index 44c51b7..64facc2 100644 --- a/doc/config.doc +++ b/doc/config.doc @@ -93,9 +93,11 @@ followed by the descriptions of the tags grouped by category.
  • \refitem cfg_example_recursive EXAMPLE_RECURSIVE
  • \refitem cfg_exclude EXCLUDE
  • \refitem cfg_exclude_patterns EXCLUDE_PATTERNS +
  • \refitem cfg_exclude_symlinks EXCLUDE_SYMLINKS
  • \refitem cfg_expand_as_defined EXPAND_AS_DEFINED
  • \refitem cfg_expand_only_predef EXPAND_ONLY_PREDEF
  • \refitem cfg_ext_doc_paths EXT_DOC_PATHS +
  • \refitem cfg_external_groups EXTERNAL_GROUPS
  • \refitem cfg_extra_packages EXTRA_PACKAGES
  • \refitem cfg_extract_all EXTRACT_ALL
  • \refitem cfg_extract_local_classes EXTRACT_LOCAL_CLASSES @@ -567,8 +569,11 @@ followed by the descriptions of the tags grouped by category. If the value of the \c INPUT tag contains directories, you can use the \c FILE_PATTERNS tag to specify one or more wildcard patterns (like \c *.cpp and \c *.h ) to filter out the source-files - in the directories. If left blank all files are included - (i.e. wildcard *). + in the directories. If left blank the following patterns are tested: + + *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx *.hpp + *.h++ *.idl *.odl + \anchor cfg_recursive
    \c RECURSIVE
    @@ -584,6 +589,12 @@ followed by the descriptions of the tags grouped by category. excluded from the \c INPUT source files. This way you can easily exclude a subdirectory from a directory tree whose root is specified with the \c INPUT tag. +\anchor cfg_exclude_symlinks +
    \c EXCLUDE_SYMLINKS
    + \addindex EXCLUDE_SYMLINKS + The \c EXCLUDE_SYMLINKS tag can be used select whether or not files or directories + that are symbolic links (a Unix filesystem feature) are excluded from the input. + \anchor cfg_exclude_patterns
    \c EXCLUDE_PATTERNS
    \addindex EXCLUDE_PATTERNS @@ -1168,6 +1179,13 @@ TAGFILES = file1=loc1 "file2 = loc2" ... in the class index. If set to \c NO only the inherited external classes will be listed. +\anchor cfg_external_groups +
    \c EXTERNAL_GROUPS
    + \addindex EXTERNAL_GROUPS + If the \c EXTERNAL_GROUPS tag is set to \c YES all external groups will be listed + in the modules index. If set to \c NO, only the current project's groups will + be listed. + \anchor cfg_perl_path
    \c PERL_PATH
    \addindex PERL_PATH diff --git a/doc/install.doc b/doc/install.doc index f565ab1..49b3d9c 100644 --- a/doc/install.doc +++ b/doc/install.doc @@ -66,6 +66,9 @@ tools should be installed. \latexonly(see {\tt http://www.research.att.com/sw/tools/graphviz/})\endlatexonly. Needed for the include dependency graphs, the graphical inheritance graphs, and the collaboration graphs. + \note If you compile graphviz yourself, make sure you do include + freetype support (which requires the freetype library and header files), + otherwise dot will produce a warning that it cannot find doxfont!
  • The ghostscript interpreter. diff --git a/doc/language.doc b/doc/language.doc index 0815eea..2e9f518 100644 --- a/doc/language.doc +++ b/doc/language.doc @@ -60,7 +60,7 @@ when the translator was updated. Chinese Wei Liu
    Wang Weihan liuwei@NOSPAM.asiainfo.com
    wangweihan@NOSPAM.capinfo.com.cn - 1.2.11 + up-to-date Croatian @@ -213,7 +213,7 @@ when the translator was updated. \hline Brazilian & Fabio "FJTC" Jun Takada Chino & {\tt chino@icmc.sc.usp.br} & up-to-date \\ \hline - Chinese & Wei Liu & {\tt liuwei@asiainfo.com} & 1.2.11 \\ + Chinese & Wei Liu & {\tt liuwei@asiainfo.com} & up-to-date \\ & Wang Weihan & {\tt wangweihan@capinfo.com.cn} & \\ \hline Croatian & Boris Bralo & {\tt boris.bralo@zg.tel.hr} & up-to-date \\ @@ -527,10 +527,24 @@ translator adapter, that is used as your base class. When there is not such a method in your translator adapter base class, you probably can change the translator adapter base to the newer one. -Do not blindly implement all methods that are implemented by your -translator adapter base class. The reason is that the adapter +Probably the easiest approach of the gradual update is to look at +the translator report to the part where the list of the implemented +translator adapters is shown. Then: + - Look how many required methods each adapter implements and guess + how many methods you are willing to update (to spend the time + with). + - Choose the related oldest translator adapters to be removed (i.e. + not used by your translator). + - Change the base class of your translator class to the translator + adapter that you want to use. + - Implement the methods that were implemented by the older translator + adapters. + +Notice: Do not blindly implement all methods that are implemented by +your translator adapter base class. The reason is that the adapter classes implement also obsolete methods. Another reason is that -some of the methods could become obsolete from some newer adapter on. +some of the methods could become obsolete from some newer adapter +on. Focus on the methods listed as \e required. The really obsolete language translators may lead to too much complicated adapters. Because of that, doxygen developers may decide diff --git a/doc/language.tpl b/doc/language.tpl index d000bb6..bc14fd5 100644 --- a/doc/language.tpl +++ b/doc/language.tpl @@ -291,10 +291,24 @@ translator adapter, that is used as your base class. When there is not such a method in your translator adapter base class, you probably can change the translator adapter base to the newer one. -Do not blindly implement all methods that are implemented by your -translator adapter base class. The reason is that the adapter +Probably the easiest approach of the gradual update is to look at +the translator report to the part where the list of the implemented +translator adapters is shown. Then: + - Look how many required methods each adapter implements and guess + how many methods you are willing to update (to spend the time + with). + - Choose the related oldest translator adapters to be removed (i.e. + not used by your translator). + - Change the base class of your translator class to the translator + adapter that you want to use. + - Implement the methods that were implemented by the older translator + adapters. + +Notice: Do not blindly implement all methods that are implemented by +your translator adapter base class. The reason is that the adapter classes implement also obsolete methods. Another reason is that -some of the methods could become obsolete from some newer adapter on. +some of the methods could become obsolete from some newer adapter +on. Focus on the methods listed as \e required. The really obsolete language translators may lead to too much complicated adapters. Because of that, doxygen developers may decide diff --git a/doc/translator.pl b/doc/translator.pl index 1bba346..5efecc0 100644 --- a/doc/translator.pl +++ b/doc/translator.pl @@ -95,6 +95,21 @@ # as "obsolete" in the status (i.e. no guessing when it was last updated). # The translator report include the notice about that situation. # +# 2002/01/03 +# - Minor correction of regexp to obtain the list of translator_xx.h files. +# - Translator report ASCII file now lists the implemented translator +# adapter classes; so you can check how many steps behind the up-to-date +# status your translator is. +# +# 2002/01/07 +# - The list of the implemented translator-adapter classes now shows +# how many and what required methods the translator adapter implements. +# +# 2002/01/08 +# - The mistake in comments inside the translator report corrected. +# The older translator adapters are derived from newer ones. +# The mistaken comment said the opposite. +# ################################################################ use 5.005; @@ -193,7 +208,7 @@ sub GetPureVirtualFrom ##{{{ ################################################################ # StripArgIdentifiers takes a method prototype (one line string), # removes the argument identifiers, and returns only the necessary -# form of the prototype. +# form of the prototype as the function result. # sub StripArgIdentifiers ##{{{ { @@ -234,7 +249,7 @@ sub StripArgIdentifiers ##{{{ # Whitespaces are not only spaces. Moreover, the difference # may be in number of them in a sequence or in the type # of a whitespace. This is the reason to replace each sequence - # of whitespace by a single, real space. + # of whitespaces by a single, real space. # $arg =~ s{\s+}{ }g; @@ -346,6 +361,149 @@ sub GetInfoFrom ##{{{ ################################################################ +# GetAdapterClassesInfo returns the list of strings with information +# related to the adapter classes. Each one-line string contains the +# identifier of the adapter class and the number of required methods +# that are implemented by the adapter. +# +# The function takes one agument -- the reference to the hash with +# stripped prototypes of the required methods. +# +sub GetAdapterClassesInfo ##{{{ +{ + # Get the reference to the hash with required prototypes. + # + my $reqref = shift; + + # Let's open the file with the translator adapter classes. + # + my $fin = "$srcdir/translator_adapter.h"; + open(FIN, "< $fin") or die "\nError when open < $fin: $!"; + my @content = ; + close FIN; + my $cont = join("", @content); + + # Prepare the list that will be returned as result. + # + my @result = (); + + # Remove the preprocessor directives. + # + $cont =~ s{^\s*#\w+.+$}{}mg; + + # Remove comments and empty lines. + # + $cont =~ s{\s*//.*$}{}mg; # remove one-line comments + $cont =~ s{/\*.+?\*/}{}sg; # remove C comments + $cont =~ s{\n\s*\n}{\n}sg; # remove empty lines + + # Place delimiters to separate the classes, and remove + # the TranslatorAdapterBase class. + # + $cont =~ s{\};\s*class\s+}{}sg; + $cont =~ s{class\s+TranslatorAdapterBase\s+.+?}{}s; + $cont =~ s{\};}{}sg; + + # Remove the base classes and the beginning of the the class + # definitions. + # + $cont =~ s{(TranslatorAdapter[_0-9]+)\s*:.+?\{\s*(public\s*:)?}{$1}sg; + + # Remove all bodies of methods; + # + while ($cont =~ s/{[^{}]+?}//sg) {} + + # Remove the "virtual" keywords. + # + $cont =~ s{^\s*virtual\s+}{}mg; + + # Remove the empty lines. + # + $cont =~ s{\n\s*\n}{\n}sg; + + # Split the string into the lines again. + # + @content = split(/\n/, $cont); + + # Now the list contains only two kinds of lines. The first + # kind of lines starts with the tag and contains the + # identifier of the class. The following lines list the + # non-stripped prototypes of implemented methods without the + # "virtual" keyword. + # + # Now we will produce the result by looping through all the + # lines and counting the prototypes of the required methods + # that are implemented by the adapter class. + # + my $info = ''; + my $cnt = 0; + my $methods = ''; + + foreach my $line (@content) + { + if ($line =~ m{^(\w+)\s*$}i ) + { + # Another adapter class found. + # + my $adapter_class = $1; + + # If the $info is not empty then it contains partial + # information about the previously processed adapter. + # + if ($info ne '') + { + # Complete the $info and push it into the @result. + # + $info .= sprintf("\timplements %2d required method%s...\n", + $cnt, (($cnt != 1) ? 's' : '')); + $methods .= "\n"; + push(@result, "$info$methods"); + } + + # Initialize the counter and store the adapter class identifier + # in the $info. + # + $info = $adapter_class; + $cnt = 0; + $methods = ''; + } + else + { + # The line contains the prototype of the implemented method. + # If it is the required method, count it, and add it to the + # string of methods. + # + my $stripped_prototype = StripArgIdentifiers($line); + + if (defined $$reqref{$stripped_prototype}) + { + ++$cnt; + $methods .= " $line\n"; + } + } + } + + # If the $info is not empty then it contains partial + # information about the last processed adapter. + # + if ($info ne '') + { + # Complete the $info and push it into the @result. + # + $info .= sprintf("\timplements %2d required method%s...\n", + $cnt, (($cnt != 1) ? 's' : '')); + $methods .= "\n"; + push(@result, "$info$methods"); + } + + # Return the result list. + # + # push @result, $cont; # ??? + return @result; +} +##}}} + +################################################################ # GenerateLanguageDoc takes document templates and code sources # generates the content as expected in the $flangdoc file (the # part of the Doxygen documentation), and returns the result as a @@ -684,6 +842,7 @@ xxxTABLE_FOOTxxx } ##}}} + ################################################################ # CopyTemplateToLanguageDoc takes the $flangtpl template and # generates $flangdoc without using information from other @@ -816,7 +975,8 @@ print STDERR "\n\n"; closedir DIR; # ignore names with dot at the beginning my @files = sort - grep { -f "$srcdir/$_" && m{^translator_..\.h$}i } + grep { ! m{^translator_adapter\.h$}i } + grep { -f "$srcdir/$_" && m{^translator_\w+\.h$}i } @entries; ##}}} @@ -832,13 +992,15 @@ print STDERR "\n\n"; # my $output = ''; my %details = (); + + # Initialize the list of the required methods. + # + my %required = (); # Remove the argument identifiers from the method prototypes # to get only the required form of the prototype. Fill the # hash with them. #{{{ # - my %required = (); - foreach (@expected) { my $prototype = StripArgIdentifiers($_); $required{$prototype} = 1; @@ -1110,17 +1272,34 @@ print STDERR "\n\n"; } ##}}} + # List all the translator adapter classes to show for which versions + # the adapters had to be created. Show, how many and what new methods + # are implemented by the adapters. #{{{ + # + print FOUT "\n" .'-' x 70 . "\n"; + print FOUT <<'xxxENDxxx'; +The following translator adapter classes are implemented -- the older (with +lower number) are always derived from the newer. They implement the +listed required methods. Notice that some versions of doxygen did not +introduce any changes related to the language translators. From here you may +guess how much work should be done to update your translator: + +xxxENDxxx + + my @adapter_info = GetAdapterClassesInfo(\%required); + + foreach (@adapter_info) { print FOUT " $_"; } + + ##}}} # List the methods that are expected to be implemented. #{{{ # - print FOUT "\n\n" .'-' x 70 . "\n"; + print FOUT "\n" .'-' x 70 . "\n"; print FOUT "Localized translators are expected to implement " . "the following methods\n" . "(prototypes sorted aplhabetically):\n\n"; - foreach (sort @expected) { - print FOUT "$_\n"; - } + foreach (sort @expected) { print FOUT "$_\n"; } ##}}} # If there are some details for the translators, show them. #{{{ diff --git a/packages/rpm/doxygen.spec b/packages/rpm/doxygen.spec index 4b067aa..7363fd8 100644 --- a/packages/rpm/doxygen.spec +++ b/packages/rpm/doxygen.spec @@ -1,79 +1,154 @@ +Summary: A documentation system for C/C++. Name: doxygen -Version: 1.2.13.1 -Summary: documentation system for C, C++ and IDL -Release: 4 -Source: doxygen-%{version}.src.tar.gz +Version: 1.2.13_20020121 +Release: 1 +Epoch: 1 +Source0: ftp://ftp.stack.nl/pub/users/dimitri/%{name}-%{version}.src.tar.gz +Patch: doxygen-1.2.7-redhat.patch +Patch1: doxygen-1.2.12-qt2.patch +Group: Development/Tools +License: GPL +Url: http://www.stack.nl/~dimitri/doxygen/index.html +Prefix: %{_prefix} +BuildPrereq: libstdc++-devel >= 2.96, /usr/bin/perl +BuildRoot: %{_tmppath}/%{name}-%{version}-root -Copyright: GPL -Group: unsorted -URL: http://www.stack.nl/~dimitri/doxygen -Packager: Matthias Andree -BuildRoot: /var/tmp/doxygen-%{version}.root +%description +Doxygen can generate an online class browser (in HTML) and/or a +reference manual (in LaTeX) from a set of documented source files. The +documentation is extracted directly from the sources. Doxygen can +also be configured to extract the code structure from undocumented +source files. -# requires Perl for tmake (Troll's make) -BuildPrereq: perl tetex +%package doxywizard +Summary: A GUI for creating and editing configuration files. +Group: User Interface/X +Requires: %{name} = %{version} +BuildPrereq: qt-devel => 2.3.0 +Requires: qt >= 2.3.0 -%description -Doxygen is a documentation system for C and C++. It can generate an -on-line class browser (in HTML) and/or an off-line reference manual -(in LaTeX) from a set of documented source files. The documentation is -extracted directly from the sources. Doxygen is developed on a Linux -platform, but it runs on most other UNIX flavors as well. An -executable for Windows 95/NT is also available. - -Author: --------- - Dimitri van Heesch - -%description -l de -Doxygen ist ein Dokumentationssystem für C und C++. Es kann eine -Klassenübersicht (in HTML) und/oder eine Referenz (in LaTeX) aus -dokumentierten Quelldateien erzeugen. Die Dokumentation wird direkt aus -den Quellen extrahiert. Doxygen wird auf einer Linux-Plattform -entwickelt, funktioniert aber genauso auf den meisten andern Unix -Dialekten. Das Programm ist auch für Windows 95/NT erhältlich. - -Autor: --------- - Dimitri van Heesch +%description doxywizard +Doxywizard is a GUI for creating and editing configuration files that +are used by doxygen. %prep -%setup -n doxygen-%{version} +%setup -q +%patch -p1 -b .redhat +%patch1 -p1 -b .qt2 %build -CFLAGS="$RPM_OPT_FLAGS" ./configure --with-doxywizard -# the next path is Suse specific -QTDIR=/usr/lib/qt2 -PATH=${QTDIR}/bin:$PATH -export QTDIR PATH -make +QTDIR="" && . /etc/profile.d/qt.sh +export OLD_PO_FILE_INPUT=yes + +./configure --prefix %{_prefix} --shared --release --with-doxywizard +make all docs %install -rm -rf $RPM_BUILD_ROOT -make install install_docs INSTALL=$RPM_BUILD_ROOT/usr \ - DOCDIR=$RPM_BUILD_ROOT%{_docdir}/doxygen -install -m 644 LICENSE LANGUAGE.HOWTO PLATFORMS README VERSION \ - $RPM_BUILD_ROOT%{_docdir}/doxygen +rm -rf ${RPM_BUILD_ROOT} + +export OLD_PO_FILE_INPUT=yes +make install INSTALL=$RPM_BUILD_ROOT%{_prefix} -find $RPM_BUILD_ROOT -name CVS -type d -depth -exec rm -r {} \; +%clean +rm -rf ${RPM_BUILD_ROOT} %files %defattr(-,root,root) -%attr(755,root,root) /usr/bin/* -%doc %{_docdir}/doxygen +%doc LANGUAGE.HOWTO README examples html +%{_bindir}/doxygen +%{_bindir}/doxysearch +%{_bindir}/doxytag -%clean -rm -rf $RPM_BUILD_ROOT +%files doxywizard +%defattr(-,root,root) +%{_bindir}/doxywizard %changelog -* Sun Jun 10 2001 Matthias Andree - - update to 1.2.8.1 -* Tue Jun 5 2001 Matthias Andree - - update to 1.2.8 - - enable XML-Generator -* Mon Apr 16 2001 Jens Seidel - - new decription (english, german) - - use of %{_docdir} - - added README, LICENSE, ... to install section -* Mon Mar 13 2000 Matthias Andree - - inital version build with rpmify +* Sun Jan 06 2002 Than Ngo 1.2.13.1-1 +- update to 1.2.13.1 + +* Sun Dec 30 2001 Jeff Johnson 1.2.13-1 +- update to 1.2.13 + +* Sun Nov 18 2001 Than Ngo 1.2.12-1 +- update to 1.2.12 +- s/Copyright/License + +* Wed Sep 12 2001 Tim Powers +- rebuild with new gcc and binutils + +* Wed Jun 13 2001 Than Ngo +- update tp 1.2.8.1 +- make doxywizard as separat package +- fix to use install as default + +* Tue Jun 05 2001 Than Ngo +- update to 1.2.8 + +* Tue May 01 2001 Than Ngo +- update to 1.2.7 +- clean up specfile +- patch to use RPM_OPT_FLAG + +* Wed Mar 14 2001 Jeff Johnson +- update to 1.2.6 + +* Wed Feb 28 2001 Trond Eivind Glomsrød +- rebuild + +* Tue Dec 26 2000 Than Ngo +- update to 1.2.4 +- remove excludearch ia64 +- bzip2 sources + +* Mon Dec 11 2000 Than Ngo +- rebuild with the fixed fileutils + +* Mon Oct 30 2000 Jeff Johnson +- update to 1.2.3. + +* Sun Oct 8 2000 Jeff Johnson +- update to 1.2.2. +- enable doxywizard. + +* Sat Aug 19 2000 Preston Brown +- 1.2.1 is latest stable, so we upgrade before Winston is released. + +* Wed Jul 12 2000 Prospector +- automatic rebuild + +* Tue Jul 4 2000 Jakub Jelinek +- Rebuild with new C++ + +* Fri Jun 30 2000 Florian La Roche +- fix QTDIR detection + +* Fri Jun 09 2000 Preston Brown +- compile on x86 w/o optimization, revert when compiler fixed!! + +* Wed Jun 07 2000 Preston Brown +- use newer RPM macros + +* Tue Jun 6 2000 Jeff Johnson +- add to distro. + +* Tue May 9 2000 Tim Powers +- rebuilt for 7.0 + +* Wed Feb 2 2000 Bernhard Rosenkraenzer +- recompile with current Qt (2.1.0/1.45) + +* Wed Jan 5 2000 Jeff Johnson +- update to 1.0.0. +- recompile with qt-2.0.1 if available. +- relocatable package. + +* Mon Nov 8 1999 Tim Powers +-updated to 0.49-991106 + +* Tue Jul 13 1999 Tim Powers +- updated source +- cleaned up some stuff in the spec file + +* Thu Apr 22 1999 Jeff Johnson +- Create Power Tools 6.0 package. diff --git a/src/Makefile.in b/src/Makefile.in index 9ce2734..e791c61 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -2,7 +2,7 @@ # # # -# Copyright (C) 1997-2001 by Dimitri van Heesch. +# Copyright (C) 1997-2002 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 diff --git a/src/bufstr.h b/src/bufstr.h index b771c03..9281d3e 100644 --- a/src/bufstr.h +++ b/src/bufstr.h @@ -3,7 +3,7 @@ * * * - * Copyright (C) 1997-2001 by Dimitri van Heesch. + * Copyright (C) 1997-2002 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 diff --git a/src/classdef.cpp b/src/classdef.cpp index 762f8aa..5ea540f 100644 --- a/src/classdef.cpp +++ b/src/classdef.cpp @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2001 by Dimitri van Heesch. + * Copyright (C) 1997-2002 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 @@ -179,6 +179,18 @@ void ClassDef::addMembersToMemberGroup() ::addMembersToMemberGroup(&friends,memberGroupSDict,this); ::addMembersToMemberGroup(&related,memberGroupSDict,this); ::addMembersToMemberGroup(&properties,memberGroupSDict,this); + + // add members inside sections to their groups + MemberGroupSDict::Iterator mgli(*memberGroupSDict); + MemberGroup *mg; + for (;(mg=mgli.current());++mgli) + { + if (mg->allMembersInSameSection() && m_subGrouping) + { + //printf("addToDeclarationSection(%s)\n",mg->header().data()); + mg->addToDeclarationSection(); + } + } } // adds new member definition to the class @@ -722,7 +734,7 @@ void ClassDef::writeDocumentation(OutputList &ol) } ol.writeSynopsis(); - if (m_incInfo) + if (m_incInfo && Config_getBool("SHOW_INCLUDE_FILES")) { QCString nm=m_incInfo->includeName.isEmpty() ? (m_incInfo->fileDef ? @@ -992,7 +1004,7 @@ void ClassDef::writeDocumentation(OutputList &ol) else // add this group to the corresponding member section { //printf("addToDeclarationSection(%s)\n",mg->header().data()); - mg->addToDeclarationSection(); + //mg->addToDeclarationSection(); } } @@ -1299,8 +1311,10 @@ void ClassDef::writeMemberList(OutputList &ol) ol.writeString(""); memberWritten=TRUE; } - else if (!Config_getBool("HIDE_UNDOC_MEMBERS")) // no documentation, - // generate link to the class instead. + else if (!Config_getBool("HIDE_UNDOC_MEMBERS") && + (md->protection()!=Private || Config_getBool("EXTRACT_PRIVATE") || md->isFriend()) + ) // no documentation, + // generate link to the class instead. { //ol.writeListItem(); ol.writeString(" "); diff --git a/src/classdef.h b/src/classdef.h index 507a915..360b98d 100644 --- a/src/classdef.h +++ b/src/classdef.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2001 by Dimitri van Heesch. + * Copyright (C) 1997-2002 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 diff --git a/src/classlist.cpp b/src/classlist.cpp index c78a3f5..f28281c 100644 --- a/src/classlist.cpp +++ b/src/classlist.cpp @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2001 by Dimitri van Heesch. + * Copyright (C) 1997-2002 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 diff --git a/src/classlist.h b/src/classlist.h index 23c247e..877fa03 100644 --- a/src/classlist.h +++ b/src/classlist.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2001 by Dimitri van Heesch. + * Copyright (C) 1997-2002 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 diff --git a/src/code.h b/src/code.h index 3458389..1023d00 100644 --- a/src/code.h +++ b/src/code.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2001 by Dimitri van Heesch. + * Copyright (C) 1997-2002 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 diff --git a/src/code.l b/src/code.l index 23762ff..b207f9d 100644 --- a/src/code.l +++ b/src/code.l @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2001 by Dimitri van Heesch. + * Copyright (C) 1997-2002 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 @@ -646,11 +646,15 @@ static void generateClassOrGlobalLink(OutputDocInterface &ol,char *clName,int *c writeMultiLineCodeLink(ol,d->getReference(),d->getOutputFileBase(),md->getBodyAnchor(),clName); if (g_currentMemberDef) { - if (Config_getBool("REFERENCED_BY_RELATION") && g_currentMemberDef->isFunction()) + if (Config_getBool("REFERENCED_BY_RELATION") && + (g_currentMemberDef->isFunction() || g_currentMemberDef->isSlot()) + ) { md->addSourceReferencedBy(g_currentMemberDef); } - if (Config_getBool("REFERENCES_RELATION") && g_currentMemberDef->isFunction()) + if (Config_getBool("REFERENCES_RELATION") && + (g_currentMemberDef->isFunction() || g_currentMemberDef->isSlot()) + ) { g_currentMemberDef->addSourceReferences(md); } @@ -710,11 +714,15 @@ static bool getLink(const char *className, if (g_currentDefinition && g_currentMemberDef && md!=g_currentMemberDef && g_insideBody) { - if (Config_getBool("REFERENCED_BY_RELATION") && g_currentMemberDef->isFunction()) + if (Config_getBool("REFERENCED_BY_RELATION") && + (g_currentMemberDef->isFunction() || g_currentMemberDef->isSlot()) + ) { md->addSourceReferencedBy(g_currentMemberDef); } - if (Config_getBool("REFERENCES_RELATION") && g_currentMemberDef->isFunction()) + if (Config_getBool("REFERENCES_RELATION") && + (g_currentMemberDef->isFunction() || g_currentMemberDef->isSlot()) + ) { g_currentMemberDef->addSourceReferences(md); } diff --git a/src/config.l b/src/config.l index 466f1d1..cce57b9 100644 --- a/src/config.l +++ b/src/config.l @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2001 by Dimitri van Heesch. + * Copyright (C) 1997-2002 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 @@ -31,7 +31,6 @@ #include #include "config.h" -#include "lang_cfg.h" #include "version.h" #undef Config_getString @@ -1045,6 +1044,7 @@ void Config::check() filePatternList.append("*.hpp"); filePatternList.append("*.h++"); filePatternList.append("*.idl"); + filePatternList.append("*.odl"); } // add default pattern if needed @@ -1602,8 +1602,8 @@ void Config::create() "FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp \n" "and *.h) to filter out the source-files in the directories. If left \n" "blank the following patterns are tested: \n" - "*.c *.cc *.cxx *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx *.hpp \n" - "*.h++ *.idl \n" + "*.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx *.hpp \n" + "*.h++ *.idl *.odl\n" ); cb = addBool( "RECURSIVE", @@ -1618,6 +1618,12 @@ void Config::create() "excluded from the INPUT source files. This way you can easily exclude a \n" "subdirectory from a directory tree whose root is specified with the INPUT tag. \n" ); + cb = addBool( + "EXCLUDE_SYMLINKS", + "The EXCLUDE_SYMLINKS tag can be used select whether or not files or directories \n" + "that are symbolic links (a Unix filesystem feature) are excluded from the input. \n", + FALSE + ); cl->setWidgetType(ConfigList::FileAndDir); cl = addList( "EXCLUDE_PATTERNS", @@ -2134,6 +2140,13 @@ void Config::create() "will be listed. \n", FALSE ); + cb = addBool( + "EXTERNAL_GROUPS", + "If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed \n" + "in the modules index. If set to NO, only the current project's groups will \n" + "be listed. \n", + TRUE + ); cs = addString( "PERL_PATH", "The PERL_PATH should be the absolute path and name of the perl script \n" diff --git a/src/constexp.h b/src/constexp.h index 6f230f9..818dbaf 100644 --- a/src/constexp.h +++ b/src/constexp.h @@ -3,7 +3,7 @@ * * * - * Copyright (C) 1997-2001 by Dimitri van Heesch. + * Copyright (C) 1997-2002 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 diff --git a/src/constexp.l b/src/constexp.l index a1bf69e..0135e3a 100644 --- a/src/constexp.l +++ b/src/constexp.l @@ -3,7 +3,7 @@ * * * - * Copyright (C) 1997-2001 by Dimitri van Heesch. + * Copyright (C) 1997-2002 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 diff --git a/src/cppvalue.cpp b/src/cppvalue.cpp index 55373a8..642ae2d 100644 --- a/src/cppvalue.cpp +++ b/src/cppvalue.cpp @@ -3,7 +3,7 @@ * * * - * Copyright (C) 1997-2001 by Dimitri van Heesch. + * Copyright (C) 1997-2002 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 diff --git a/src/cppvalue.h b/src/cppvalue.h index def31c9..e216bda 100644 --- a/src/cppvalue.h +++ b/src/cppvalue.h @@ -3,7 +3,7 @@ * * * - * Copyright (C) 1997-2001 by Dimitri van Heesch. + * Copyright (C) 1997-2002 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 diff --git a/src/debug.cpp b/src/debug.cpp index 6ec6d7c..4afbfb1 100644 --- a/src/debug.cpp +++ b/src/debug.cpp @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2001 by Dimitri van Heesch. + * Copyright (C) 1997-2002 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 diff --git a/src/debug.h b/src/debug.h index 9fbced0..b78b98f 100644 --- a/src/debug.h +++ b/src/debug.h @@ -3,7 +3,7 @@ * * * - * Copyright (C) 1997-2001 by Dimitri van Heesch. + * Copyright (C) 1997-2002 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 diff --git a/src/declinfo.h b/src/declinfo.h index 0b183d7..f6fa2c5 100644 --- a/src/declinfo.h +++ b/src/declinfo.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2001 by Dimitri van Heesch. + * Copyright (C) 1997-2002 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 diff --git a/src/declinfo.l b/src/declinfo.l index d06f824..ddcde3c 100644 --- a/src/declinfo.l +++ b/src/declinfo.l @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2001 by Dimitri van Heesch. + * Copyright (C) 1997-2002 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 diff --git a/src/defargs.h b/src/defargs.h index 7bfae61..d1452cb 100644 --- a/src/defargs.h +++ b/src/defargs.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2001 by Dimitri van Heesch. + * Copyright (C) 1997-2002 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 diff --git a/src/defargs.l b/src/defargs.l index c238123..d736369 100644 --- a/src/defargs.l +++ b/src/defargs.l @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2001 by Dimitri van Heesch. + * Copyright (C) 1997-2002 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 diff --git a/src/defgen.cpp b/src/defgen.cpp index 5620d9c..c0cfa23 100644 --- a/src/defgen.cpp +++ b/src/defgen.cpp @@ -3,7 +3,7 @@ * * * - * Copyright (C) 1997-2001 by Dimitri van Heesch. + * Copyright (C) 1997-2002 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 diff --git a/src/defgen.h b/src/defgen.h index 7fd7641..2348342 100644 --- a/src/defgen.h +++ b/src/defgen.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2001 by Dimitri van Heesch. + * Copyright (C) 1997-2002 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 diff --git a/src/define.cpp b/src/define.cpp index f010a9b..f3148b0 100644 --- a/src/define.cpp +++ b/src/define.cpp @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2001 by Dimitri van Heesch. + * Copyright (C) 1997-2002 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 diff --git a/src/define.h b/src/define.h index 2715450..5f2a413 100644 --- a/src/define.h +++ b/src/define.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2001 by Dimitri van Heesch. + * Copyright (C) 1997-2002 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 diff --git a/src/definition.cpp b/src/definition.cpp index 1125569..3942edf 100644 --- a/src/definition.cpp +++ b/src/definition.cpp @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2001 by Dimitri van Heesch. + * Copyright (C) 1997-2002 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 @@ -416,7 +416,7 @@ void Definition::writeSourceRefList(OutputList &ol,const char *scopeName, { ol.docify(name); } - if (md->isFunction()) ol.docify("()"); + if (md->isFunction() && md->isSlot()) ol.docify("()"); } index=newIndex+matchLen; } diff --git a/src/definition.h b/src/definition.h index fed4c52..6f384e9 100644 --- a/src/definition.h +++ b/src/definition.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2001 by Dimitri van Heesch. + * Copyright (C) 1997-2002 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 diff --git a/src/diagram.cpp b/src/diagram.cpp index 9b82bd4..e04719c 100644 --- a/src/diagram.cpp +++ b/src/diagram.cpp @@ -3,7 +3,7 @@ * * * - * Copyright (C) 1997-2001 by Dimitri van Heesch. + * Copyright (C) 1997-2002 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 diff --git a/src/diagram.h b/src/diagram.h index 7b8182e..1dddd96 100644 --- a/src/diagram.h +++ b/src/diagram.h @@ -3,7 +3,7 @@ * * * - * Copyright (C) 1997-2001 by Dimitri van Heesch. + * Copyright (C) 1997-2002 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 diff --git a/src/doc.h b/src/doc.h index 91b16fa..17d9999 100644 --- a/src/doc.h +++ b/src/doc.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2001 by Dimitri van Heesch. + * Copyright (C) 1997-2002 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 diff --git a/src/doc.l b/src/doc.l index 62283f5..9029364 100644 --- a/src/doc.l +++ b/src/doc.l @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2001 by Dimitri van Heesch. + * Copyright (C) 1997-2002 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 diff --git a/src/dot.cpp b/src/dot.cpp index 5f1b080..7cefcda 100644 --- a/src/dot.cpp +++ b/src/dot.cpp @@ -3,7 +3,7 @@ * * * - * Copyright (C) 1997-2001 by Dimitri van Heesch. + * Copyright (C) 1997-2002 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 diff --git a/src/dot.h b/src/dot.h index 2b82b33..59d5caa 100644 --- a/src/dot.h +++ b/src/dot.h @@ -3,7 +3,7 @@ * * * - * Copyright (C) 1997-2001 by Dimitri van Heesch. + * Copyright (C) 1997-2002 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 diff --git a/src/doxygen.cpp b/src/doxygen.cpp index 11c43b7..a4ff869 100644 --- a/src/doxygen.cpp +++ b/src/doxygen.cpp @@ -3,7 +3,7 @@ * * * - * Copyright (C) 1997-2001 by Dimitri van Heesch. + * Copyright (C) 1997-2002 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 @@ -5221,6 +5221,7 @@ static void buildPageList(Entry *root) { if (root->section == Entry::PAGEDOC_SEC) { + //printf("buildPageList %s\n",root->name.data()); if (!root->name.isEmpty()) { addRelatedPage(root); @@ -6038,6 +6039,7 @@ static int readDir(QFileInfo *fi, err("Error: source %s is not a readable file or directory... skipping.\n",cfi->absFilePath().data()); } else if (cfi->isFile() && + (!Config_getBool("EXCLUDE_SYMLINKS") || !cfi->isSymLink()) && (patList==0 || patternMatch(cfi,patList)) && !patternMatch(cfi,exclPatList)) { @@ -6069,6 +6071,7 @@ static int readDir(QFileInfo *fi, if (resultDict) resultDict->insert(cfi->absFilePath(),rs); } else if (recursive && + (!Config_getBool("EXCLUDE_SYMLINKS") || !cfi->isSymLink()) && cfi->isDir() && cfi->fileName()!="." && cfi->fileName()!="..") { @@ -6150,40 +6153,45 @@ static int readFileOrDirectory(const char *s, { err("Error: source %s is not a readable file or directory... skipping.\n",s); } - else if (fi.isFile()) + else if (!Config_getBool("EXCLUDE_SYMLINKS") || !fi.isSymLink()) { - totalSize+=fi.size()+fi.absFilePath().length()+4; //readFile(&fi,fiList,input); - //fiList->inSort(new FileInfo(fi)); - QCString name=convertToQCString(fi.fileName()); - //printf("New file %s\n",name.data()); - if (fnDict) + if (fi.isFile()) { - FileDef *fd=new FileDef(fi.dirPath(TRUE)+"/",name); - FileName *fn=0; - if (!name.isEmpty() && (fn=(*fnDict)[name])) + totalSize+=fi.size()+fi.absFilePath().length()+4; //readFile(&fi,fiList,input); + //fiList->inSort(new FileInfo(fi)); + QCString name=convertToQCString(fi.fileName()); + //printf("New file %s\n",name.data()); + if (fnDict) { - fn->append(fd); + FileDef *fd=new FileDef(fi.dirPath(TRUE)+"/",name); + FileName *fn=0; + if (!name.isEmpty() && (fn=(*fnDict)[name])) + { + fn->append(fd); + } + else + { + fn = new FileName(fi.absFilePath(),name); + fn->append(fd); + if (fnList) fnList->inSort(fn); + fnDict->insert(name,fn); + } } - else + QCString *rs=0; + if (resultList || resultDict) { - fn = new FileName(fi.absFilePath(),name); - fn->append(fd); - if (fnList) fnList->inSort(fn); - fnDict->insert(name,fn); + rs=new QCString(fi.absFilePath()); } + if (resultList) resultList->append(rs); + if (resultDict) resultDict->insert(fi.absFilePath(),rs); } - QCString *rs=0; - if (resultList || resultDict) + else if (fi.isDir()) // readable dir { - rs=new QCString(fi.absFilePath()); + totalSize+=readDir(&fi,fnList,fnDict,exclDict,patList, + exclPatList,resultList,resultDict,errorIfNotExist, + recursive); } - if (resultList) resultList->append(rs); - if (resultDict) resultDict->insert(fi.absFilePath(),rs); } - else if (fi.isDir()) // readable dir - totalSize+=readDir(&fi,fnList,fnDict,exclDict,patList, - exclPatList,resultList,resultDict,errorIfNotExist, - recursive); } } return totalSize; @@ -6226,7 +6234,7 @@ static void readFormulaRepository() static void usage(const char *name) { - msg("Doxygen version %s\nCopyright Dimitri van Heesch 1997-2001\n\n",versionString); + msg("Doxygen version %s\nCopyright Dimitri van Heesch 1997-2002\n\n",versionString); msg("You can use doxygen in a number of ways:\n\n"); msg("1) Use doxygen to generate a template configuration file:\n"); msg(" %s [-s] -g [configName]\n\n",name); diff --git a/src/doxygen.h b/src/doxygen.h index af3d208..3357c7d 100644 --- a/src/doxygen.h +++ b/src/doxygen.h @@ -3,7 +3,7 @@ * * * - * Copyright (C) 1997-2001 by Dimitri van Heesch. + * Copyright (C) 1997-2002 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 diff --git a/src/doxygen.pro.in b/src/doxygen.pro.in index 30e8ace..0e63924 100644 --- a/src/doxygen.pro.in +++ b/src/doxygen.pro.in @@ -1,7 +1,7 @@ # # # -# Copyright (C) 1997-2001 by Dimitri van Heesch. +# Copyright (C) 1997-2002 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 diff --git a/src/doxysearch.cpp b/src/doxysearch.cpp index 90ac247..4ec3ae7 100644 --- a/src/doxysearch.cpp +++ b/src/doxysearch.cpp @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2001 by Dimitri van Heesch. + * Copyright (C) 1997-2002 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 diff --git a/src/doxytag.l b/src/doxytag.l index 1afe949..288c945 100644 --- a/src/doxytag.l +++ b/src/doxytag.l @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2001 by Dimitri van Heesch. + * Copyright (C) 1997-2002 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 @@ -505,7 +505,7 @@ void parseFileOrDir(const char *fileName) void usage(const char *name) { - fprintf(stderr,"Doxytag version %s\nCopyright Dimitri van Heesch 1997-2001\n\n", + fprintf(stderr,"Doxytag version %s\nCopyright Dimitri van Heesch 1997-2002\n\n", versionString); fprintf(stderr," Generates a tag file and/or a search index for a set of HTML files\n\n"); fprintf(stderr,"Usage: %s [-t tag_file] [-s index_file] [ html_file [html_file...] ]\n",name); diff --git a/src/entry.cpp b/src/entry.cpp index 26113aa..848ece9 100644 --- a/src/entry.cpp +++ b/src/entry.cpp @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2001 by Dimitri van Heesch. + * Copyright (C) 1997-2002 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 diff --git a/src/entry.h b/src/entry.h index 08ed956..3e52b82 100644 --- a/src/entry.h +++ b/src/entry.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2001 by Dimitri van Heesch. + * Copyright (C) 1997-2002 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 diff --git a/src/example.h b/src/example.h index 4c0ab15..81a1b21 100644 --- a/src/example.h +++ b/src/example.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2001 by Dimitri van Heesch. + * Copyright (C) 1997-2002 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 diff --git a/src/filedef.cpp b/src/filedef.cpp index 144f8c6..d2a2a84 100644 --- a/src/filedef.cpp +++ b/src/filedef.cpp @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2001 by Dimitri van Heesch. + * Copyright (C) 1997-2002 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 diff --git a/src/filedef.h b/src/filedef.h index fc0bdb7..52be3f6 100644 --- a/src/filedef.h +++ b/src/filedef.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2001 by Dimitri van Heesch. + * Copyright (C) 1997-2002 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 diff --git a/src/filename.cpp b/src/filename.cpp index 7a8cdf8..9b7e5b2 100644 --- a/src/filename.cpp +++ b/src/filename.cpp @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2001 by Dimitri van Heesch. + * Copyright (C) 1997-2002 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 diff --git a/src/filename.h b/src/filename.h index 15d5334..0a0a7a5 100644 --- a/src/filename.h +++ b/src/filename.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2001 by Dimitri van Heesch. + * Copyright (C) 1997-2002 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 diff --git a/src/formula.cpp b/src/formula.cpp index 96d2137..32e16ba 100644 --- a/src/formula.cpp +++ b/src/formula.cpp @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2001 by Dimitri van Heesch. + * Copyright (C) 1997-2002 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 diff --git a/src/formula.h b/src/formula.h index 2c2fd51..f703ee9 100644 --- a/src/formula.h +++ b/src/formula.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2001 by Dimitri van Heesch. + * Copyright (C) 1997-2002 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 diff --git a/src/gifenc.cpp b/src/gifenc.cpp index cdc1481..6a06465 100644 --- a/src/gifenc.cpp +++ b/src/gifenc.cpp @@ -3,7 +3,7 @@ * * * - * Copyright (C) 1997-2001 by Dimitri van Heesch. + * Copyright (C) 1997-2002 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 diff --git a/src/gifenc.h b/src/gifenc.h index 2ec1d7b..cfeacae 100644 --- a/src/gifenc.h +++ b/src/gifenc.h @@ -3,7 +3,7 @@ * * * - * Copyright (C) 1997-2001 by Dimitri van Heesch. + * Copyright (C) 1997-2002 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 diff --git a/src/groupdef.cpp b/src/groupdef.cpp index 2886f73..67408a3 100644 --- a/src/groupdef.cpp +++ b/src/groupdef.cpp @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2001 by Dimitri van Heesch. + * Copyright (C) 1997-2002 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 diff --git a/src/groupdef.h b/src/groupdef.h index a9402b0..a7d81d5 100644 --- a/src/groupdef.h +++ b/src/groupdef.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2001 by Dimitri van Heesch. + * Copyright (C) 1997-2002 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 diff --git a/src/htmlgen.cpp b/src/htmlgen.cpp index 97752a2..6d7982a 100644 --- a/src/htmlgen.cpp +++ b/src/htmlgen.cpp @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2001 by Dimitri van Heesch. + * Copyright (C) 1997-2002 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 @@ -31,36 +31,68 @@ #include "language.h" #include "htmlhelp.h" -#define GROUP_COLOR "#ff8080" +// #define GROUP_COLOR "#ff8080" //#define DBG_HTML(x) x; #define DBG_HTML(x) + +/* + changed default stylesheet, startIndexKey(), startIndexValue() + 02 jan 2002, jh +*/ + static const char *defaultStyleSheet = - "H1 { text-align: center; }\n" - "CAPTION { font-weight: bold }\n" - "A.qindex {}\n" - "A.qindexRef {}\n" - "A.el { text-decoration: none; font-weight: bold }\n" - "A.elRef { font-weight: bold }\n" - "A.code { text-decoration: none; font-weight: normal; color: #4444ee }\n" - "A.codeRef { font-weight: normal; color: #4444ee }\n" - "A:hover { text-decoration: none; background-color: #f2f2ff }\n" - "DL.el { margin-left: -1cm }\n" - "DIV.fragment { width: 100%; border: none; background-color: #eeeeee }\n" - "DIV.ah { background-color: black; font-weight: bold; color: #ffffff; margin-bottom: 3px; margin-top: 3px }\n" - "TD.md { background-color: #f2f2ff; font-weight: bold; }\n" - "TD.mdname1 { background-color: #f2f2ff; font-weight: bold; color: #602020; }\n" - "TD.mdname { background-color: #f2f2ff; font-weight: bold; color: #602020; width: 600px; }\n" - "DIV.groupHeader { margin-left: 16px; margin-top: 12px; margin-bottom: 6px; font-weight: bold }\n" - "DIV.groupText { margin-left: 16px; font-style: italic; font-size: smaller }\n" - "FONT.keyword { color: #008000 }\n" - "FONT.keywordtype { color: #604020 }\n" - "FONT.keywordflow { color: #e08000 }\n" - "FONT.comment { color: #800000 }\n" - "FONT.preprocessor { color: #806020 }\n" - "FONT.stringliteral { color: #002080 }\n" - "FONT.charliteral { color: #008080 }\n"; +"H1 { text-align: center; }\n" +"CAPTION { font-weight: bold }\n" +"A.qindex {}\n" +"A.qindexRef {}\n" +"A.el { text-decoration: none; font-weight: bold }\n" +"A.elRef { font-weight: bold }\n" +"A.code { text-decoration: none; font-weight: normal; color: #4444ee }\n" +"A.codeRef { font-weight: normal; color: #4444ee }\n" +"A:hover { text-decoration: none; background-color: #f2f2ff }\n" +"DL.el { margin-left: -1cm }\n" +"DIV.fragment { width: 100%; border: none; background-color: #eeeeee }\n" +"DIV.ah { background-color: black; font-weight: bold; color: #ffffff; margin-bottom: 3px; margin-top: 3px }\n" +"TD.md { background-color: #f2f2ff; font-weight: bold; }\n" +"TD.mdname1 { background-color: #f2f2ff; font-weight: bold; color: #602020; }\n" +"TD.mdname { background-color: #f2f2ff; font-weight: bold; color: #602020; width: 600px; }\n" +"DIV.groupHeader { margin-left: 16px; margin-top: 12px; margin-bottom: 6px; font-weight: bold }\n" +"DIV.groupText { margin-left: 16px; font-style: italic; font-size: smaller }\n" +"BODY { background: white }\n" +"TD.indexkey { \n" +" background-color: #eeeeff; \n" +" font-weight: bold; \n" +" padding-right : 10px; \n" +" padding-top : 2px; \n" +" padding-left : 10px; \n" +" padding-bottom : 2px; \n" +" margin-left : 0px; \n" +" margin-right : 0px; \n" +" margin-top : 2px; \n" +" margin-bottom : 2px \n" +"}\n" +"TD.indexvalue { \n" +" background-color: #eeeeff; \n" +" font-style: italic; \n" +" padding-right : 10px; \n" +" padding-top : 2px; \n" +" padding-left : 10px; \n" +" padding-bottom : 2px; \n" +" margin-left : 0px; \n" +" margin-right : 0px; \n" +" margin-top : 2px; \n" +" margin-bottom : 2px \n" +"}\n" +"FONT.keyword { color: #008000 }\n" +"FONT.keywordtype { color: #604020 }\n" +"FONT.keywordflow { color: #e08000 }\n" +"FONT.comment { color: #800000 }\n" +"FONT.preprocessor { color: #806020 }\n" +"FONT.stringliteral { color: #002080 }\n" +"FONT.charliteral { color: #008080 }\n"; + static QCString g_header; static QCString g_footer; @@ -131,7 +163,7 @@ static void writeDefaultHeaderFile(QTextStream &t,const char *title, t << cssfi.fileName(); } t << "\" rel=\"stylesheet\" type=\"text/css\">\n" - "\n"; + "\n"; } @@ -154,7 +186,7 @@ void HtmlGenerator::writeFooterFile(QFile &file) << "align=\"middle\" border=0 width=110 height=53>\n" << " $doxygenversion " << theTranslator->trWrittenBy() << " Dimitri van Heesch,\n" - << " © 1997-2001\n" + << " © 1997-2002\n" << "\n" << "\n"; } @@ -247,7 +279,7 @@ void HtmlGenerator::writeFooter(int part,bool external) default: if (g_footer.isEmpty()) t << " Dimitri van Heesch,\n © " - "1997-2001\n\n\n"; + "1997-2002\n\n\n"; break; } @@ -614,7 +646,7 @@ void HtmlGenerator::startClassDiagram() void HtmlGenerator::endClassDiagram(ClassDiagram &d, const char *fileName,const char *name) { - t << ":\n

    " << endl << "" << endl; @@ -812,7 +844,8 @@ void HtmlGenerator::endIndexList() void HtmlGenerator::startIndexKey() { - t << " "; + // inserted 'class = ...', 02 jan 2002, jh + t << " "; } void HtmlGenerator::endIndexKey() @@ -822,7 +855,8 @@ void HtmlGenerator::endIndexKey() void HtmlGenerator::startIndexValue(bool) { - t << ""; + // inserted 'class = ...', 02 jan 2002, jh + t << ""; } void HtmlGenerator::endIndexValue(const char *,bool) diff --git a/src/htmlgen.h b/src/htmlgen.h index 33ff992..9f9d216 100644 --- a/src/htmlgen.h +++ b/src/htmlgen.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2001 by Dimitri van Heesch. + * Copyright (C) 1997-2002 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 diff --git a/src/htmlhelp.cpp b/src/htmlhelp.cpp index ee2863c..fce5ec8 100644 --- a/src/htmlhelp.cpp +++ b/src/htmlhelp.cpp @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2001 by Dimitri van Heesch. + * Copyright (C) 1997-2002 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 diff --git a/src/htmlhelp.h b/src/htmlhelp.h index 319e25d..3e85494 100644 --- a/src/htmlhelp.h +++ b/src/htmlhelp.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2001 by Dimitri van Heesch. + * Copyright (C) 1997-2002 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 diff --git a/src/image.cpp b/src/image.cpp index bbbcfc8..ba66438 100644 --- a/src/image.cpp +++ b/src/image.cpp @@ -3,7 +3,7 @@ * * * - * Copyright (C) 1997-2001 by Dimitri van Heesch. + * Copyright (C) 1997-2002 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 diff --git a/src/image.h b/src/image.h index 8cd1e65..f5efe91 100644 --- a/src/image.h +++ b/src/image.h @@ -3,7 +3,7 @@ * * * - * Copyright (C) 1997-2001 by Dimitri van Heesch. + * Copyright (C) 1997-2002 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 diff --git a/src/index.cpp b/src/index.cpp index 02c8f92..aab89db 100644 --- a/src/index.cpp +++ b/src/index.cpp @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2001 by Dimitri van Heesch. + * Copyright (C) 1997-2002 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 diff --git a/src/index.h b/src/index.h index 412dffe..383b5dd 100644 --- a/src/index.h +++ b/src/index.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2001 by Dimitri van Heesch. + * Copyright (C) 1997-2002 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 diff --git a/src/instdox.cpp b/src/instdox.cpp index 56ab915..3e480dc 100644 --- a/src/instdox.cpp +++ b/src/instdox.cpp @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2001 by Dimitri van Heesch. + * Copyright (C) 1997-2002 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 diff --git a/src/instdox.h b/src/instdox.h index 179b1db..a6b2a73 100644 --- a/src/instdox.h +++ b/src/instdox.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2001 by Dimitri van Heesch. + * Copyright (C) 1997-2002 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 diff --git a/src/language.cpp b/src/language.cpp index 5f27716..06c3d11 100644 --- a/src/language.cpp +++ b/src/language.cpp @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2001 by Dimitri van Heesch. + * Copyright (C) 1997-2002 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 diff --git a/src/language.h b/src/language.h index 11840cb..9c5ffc9 100644 --- a/src/language.h +++ b/src/language.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2001 by Dimitri van Heesch. + * Copyright (C) 1997-2002 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 diff --git a/src/latexgen.cpp b/src/latexgen.cpp index 49469de..85a9bdf 100644 --- a/src/latexgen.cpp +++ b/src/latexgen.cpp @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2001 by Dimitri van Heesch. + * Copyright (C) 1997-2002 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 @@ -408,11 +408,11 @@ void LatexGenerator::writeStyleSheetFile(QFile &f) t << theTranslator->trGeneratedAt( dateToString(TRUE), projectName ); t << " doxygen " << theTranslator->trWrittenBy() << " "; - t << "Dimitri van Heesch \\copyright~1997-2001"; + t << "Dimitri van Heesch \\copyright~1997-2002"; writeDefaultStyleSheetPart2(t); t << theTranslator->trGeneratedAt( dateToString(TRUE), projectName ); t << " doxygen " << theTranslator->trWrittenBy() << " "; - t << "Dimitri van Heesch \\copyright~1997-2001"; + t << "Dimitri van Heesch \\copyright~1997-2002"; writeDefaultStyleSheetPart3(t); } @@ -824,14 +824,14 @@ void LatexGenerator::writeStyleInfo(int part) break; case 2: { - t << " Dimitri van Heesch \\copyright~1997-2001"; + t << " Dimitri van Heesch \\copyright~1997-2002"; t << "}]{}\n"; writeDefaultStyleSheetPart2(t); } break; case 4: { - t << " Dimitri van Heesch \\copyright~1997-2001"; + t << " Dimitri van Heesch \\copyright~1997-2002"; writeDefaultStyleSheetPart3(t); endPlainFile(); } @@ -1176,7 +1176,7 @@ void LatexGenerator::addIndexItem(const char *s1,const char *s2) t << "}"; if (s2) { - t << "!" << s2 << "@{"; + t << "!" << escapeLabelName(s2) << "@{"; docify(s2); t << "}"; } diff --git a/src/latexgen.h b/src/latexgen.h index ac6a68b..679f81e 100644 --- a/src/latexgen.h +++ b/src/latexgen.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2001 by Dimitri van Heesch. + * Copyright (C) 1997-2002 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 diff --git a/src/libdoxycfg.pro.in b/src/libdoxycfg.pro.in index 33e3acc..98ea518 100644 --- a/src/libdoxycfg.pro.in +++ b/src/libdoxycfg.pro.in @@ -1,7 +1,7 @@ # # # -# Copyright (C) 1997-2001 by Dimitri van Heesch. +# Copyright (C) 1997-2002 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 diff --git a/src/libdoxycfg.t b/src/libdoxycfg.t index 7219648..568fdbc 100644 --- a/src/libdoxycfg.t +++ b/src/libdoxycfg.t @@ -1,7 +1,7 @@ # # # -# Copyright (C) 1997-2001 by Dimitri van Heesch. +# Copyright (C) 1997-2002 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 diff --git a/src/libdoxygen.pro.in b/src/libdoxygen.pro.in index 14914f9..430f865 100644 --- a/src/libdoxygen.pro.in +++ b/src/libdoxygen.pro.in @@ -1,7 +1,7 @@ # # # -# Copyright (C) 1997-2001 by Dimitri van Heesch. +# Copyright (C) 1997-2002 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 diff --git a/src/libdoxygen.t b/src/libdoxygen.t index 82fea0e..ac3bc82 100644 --- a/src/libdoxygen.t +++ b/src/libdoxygen.t @@ -1,7 +1,7 @@ # # # -# Copyright (C) 1997-2001 by Dimitri van Heesch. +# Copyright (C) 1997-2002 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 diff --git a/src/logos.cpp b/src/logos.cpp index 43d7b46..293f1bd 100644 --- a/src/logos.cpp +++ b/src/logos.cpp @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2001 by Dimitri van Heesch. + * Copyright (C) 1997-2002 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 diff --git a/src/logos.h b/src/logos.h index 71019f8..33732cf 100644 --- a/src/logos.h +++ b/src/logos.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2001 by Dimitri van Heesch. + * Copyright (C) 1997-2002 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 diff --git a/src/main.cpp b/src/main.cpp index 1c33296..082c0d7 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -3,7 +3,7 @@ * * * - * Copyright (C) 1997-2001 by Dimitri van Heesch. + * Copyright (C) 1997-2002 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 diff --git a/src/mangen.cpp b/src/mangen.cpp index 3864ee7..c6d7b9f 100644 --- a/src/mangen.cpp +++ b/src/mangen.cpp @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2001 by Dimitri van Heesch. + * Copyright (C) 1997-2002 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 diff --git a/src/mangen.h b/src/mangen.h index f3d2a2b..3abc90c 100644 --- a/src/mangen.h +++ b/src/mangen.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2001 by Dimitri van Heesch. + * Copyright (C) 1997-2002 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 diff --git a/src/memberdef.cpp b/src/memberdef.cpp index a72add2..2d84e97 100644 --- a/src/memberdef.cpp +++ b/src/memberdef.cpp @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2001 by Dimitri van Heesch. + * Copyright (C) 1997-2002 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 @@ -1305,7 +1305,15 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol, { ol.newParagraph(); - QCString reimplFromLine = theTranslator->trReimplementedFromList(1); + QCString reimplFromLine; + if (bmd->virtualness()!=Pure && bcd->compoundType()!=ClassDef::Interface) + { + reimplFromLine = theTranslator->trReimplementedFromList(1); + } + else + { + reimplFromLine = theTranslator->trImplementedFromList(1); + } int markerPos = reimplFromLine.find("@0"); if (markerPos!=-1) // should always pass this. { @@ -1359,7 +1367,10 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol, { // count the members that directly inherit from md and for // which the member and class are visible in the docs. - if ( bmd->isLinkable() && bcd->isLinkable() ) count++; + if ( bmd->isLinkable() && bcd->isLinkable() ) + { + count++; + } } if (count>0) { @@ -1367,8 +1378,15 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol, // write the list of classes that overwrite this member ol.newParagraph(); - QCString reimplInLine = - theTranslator->trReimplementedInList(count); + QCString reimplInLine; + if (virt==Pure || (classDef && classDef->compoundType()==ClassDef::Interface)) + { + reimplInLine = theTranslator->trImplementedInList(count); + } + else + { + reimplInLine = theTranslator->trReimplementedInList(count); + } static QRegExp marker("@[0-9]+"); int index=0,newIndex,matchLen; // now replace all markers in reimplInLine with links to the classes diff --git a/src/memberdef.h b/src/memberdef.h index 362a82d..008de3f 100644 --- a/src/memberdef.h +++ b/src/memberdef.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2001 by Dimitri van Heesch. + * Copyright (C) 1997-2002 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 diff --git a/src/membergroup.cpp b/src/membergroup.cpp index 086a9f8..e053b2a 100644 --- a/src/membergroup.cpp +++ b/src/membergroup.cpp @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2001 by Dimitri van Heesch. + * Copyright (C) 1997-2002 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 diff --git a/src/membergroup.h b/src/membergroup.h index 6eba22b..ee15dea 100644 --- a/src/membergroup.h +++ b/src/membergroup.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2001 by Dimitri van Heesch. + * Copyright (C) 1997-2002 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 diff --git a/src/memberlist.cpp b/src/memberlist.cpp index fdffc33..0e3ab0f 100644 --- a/src/memberlist.cpp +++ b/src/memberlist.cpp @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2001 by Dimitri van Heesch. + * Copyright (C) 1997-2002 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 diff --git a/src/memberlist.h b/src/memberlist.h index c0b6b17..dc93cc7 100644 --- a/src/memberlist.h +++ b/src/memberlist.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2001 by Dimitri van Heesch. + * Copyright (C) 1997-2002 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 diff --git a/src/membername.cpp b/src/membername.cpp index a250988..156e52c 100644 --- a/src/membername.cpp +++ b/src/membername.cpp @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2001 by Dimitri van Heesch. + * Copyright (C) 1997-2002 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 diff --git a/src/membername.h b/src/membername.h index 3eabfe8..a5700fd 100644 --- a/src/membername.h +++ b/src/membername.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2001 by Dimitri van Heesch. + * Copyright (C) 1997-2002 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 diff --git a/src/message.cpp b/src/message.cpp index 285f1c3..1f04dea 100644 --- a/src/message.cpp +++ b/src/message.cpp @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2001 by Dimitri van Heesch. + * Copyright (C) 1997-2002 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 diff --git a/src/message.h b/src/message.h index ed47fa2..0822f23 100644 --- a/src/message.h +++ b/src/message.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2001 by Dimitri van Heesch. + * Copyright (C) 1997-2002 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 diff --git a/src/namespacedef.cpp b/src/namespacedef.cpp index 89584ba..323bb85 100644 --- a/src/namespacedef.cpp +++ b/src/namespacedef.cpp @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2001 by Dimitri van Heesch. + * Copyright (C) 1997-2002 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 diff --git a/src/namespacedef.h b/src/namespacedef.h index 0e3b510..5ee62ed 100644 --- a/src/namespacedef.h +++ b/src/namespacedef.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2001 by Dimitri van Heesch. + * Copyright (C) 1997-2002 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 diff --git a/src/outputgen.cpp b/src/outputgen.cpp index c8a9393..1b5dcea 100644 --- a/src/outputgen.cpp +++ b/src/outputgen.cpp @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2001 by Dimitri van Heesch. + * Copyright (C) 1997-2002 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 diff --git a/src/outputgen.h b/src/outputgen.h index 1b060e8..cd5c237 100644 --- a/src/outputgen.h +++ b/src/outputgen.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2001 by Dimitri van Heesch. + * Copyright (C) 1997-2002 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 diff --git a/src/outputlist.cpp b/src/outputlist.cpp index 7611b6a..df9751f 100644 --- a/src/outputlist.cpp +++ b/src/outputlist.cpp @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2001 by Dimitri van Heesch. + * Copyright (C) 1997-2002 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 diff --git a/src/outputlist.h b/src/outputlist.h index d96feb7..22f0e46 100644 --- a/src/outputlist.h +++ b/src/outputlist.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2001 by Dimitri van Heesch. + * Copyright (C) 1997-2002 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 diff --git a/src/packagedef.cpp b/src/packagedef.cpp index 7fd00eb..afd8709 100644 --- a/src/packagedef.cpp +++ b/src/packagedef.cpp @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2001 by Dimitri van Heesch. + * Copyright (C) 1997-2002 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 diff --git a/src/packagedef.h b/src/packagedef.h index 945b229..0f1ba81 100644 --- a/src/packagedef.h +++ b/src/packagedef.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2001 by Dimitri van Heesch. + * Copyright (C) 1997-2002 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 diff --git a/src/page.h b/src/page.h index f082700..632f0d6 100644 --- a/src/page.h +++ b/src/page.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2001 by Dimitri van Heesch. + * Copyright (C) 1997-2002 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 diff --git a/src/pre.h b/src/pre.h index f545c2f..b3705a1 100644 --- a/src/pre.h +++ b/src/pre.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2001 by Dimitri van Heesch. + * Copyright (C) 1997-2002 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 diff --git a/src/pre.l b/src/pre.l index fdce24b..23f1c7c 100644 --- a/src/pre.l +++ b/src/pre.l @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2001 by Dimitri van Heesch. + * Copyright (C) 1997-2002 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 @@ -1569,6 +1569,10 @@ BN [ \t\r\n] g_argDict->insert(argName,new int(g_defArgs)); g_defArgs++; } +"/**"|"/*!" { + g_defText+=yytext; + g_defLitText+=yytext; + } "/*" { outputChar('/');outputChar('*'); g_defText+=' '; diff --git a/src/qtbc.h b/src/qtbc.h index 51f62dd..0f23e42 100644 --- a/src/qtbc.h +++ b/src/qtbc.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2001 by Dimitri van Heesch. + * Copyright (C) 1997-2002 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 diff --git a/src/reflist.cpp b/src/reflist.cpp index 377ae41..b927969 100644 --- a/src/reflist.cpp +++ b/src/reflist.cpp @@ -3,7 +3,7 @@ * * * - * Copyright (C) 1997-2001 by Dimitri van Heesch. + * Copyright (C) 1997-2002 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 diff --git a/src/reflist.h b/src/reflist.h index 837cb0a..692e108 100644 --- a/src/reflist.h +++ b/src/reflist.h @@ -3,7 +3,7 @@ * * * - * Copyright (C) 1997-2001 by Dimitri van Heesch. + * Copyright (C) 1997-2002 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 diff --git a/src/rtfgen.cpp b/src/rtfgen.cpp index 1d992a4..85cc771 100644 --- a/src/rtfgen.cpp +++ b/src/rtfgen.cpp @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2001 by Parker Waechter & Dimitri van Heesch. + * Copyright (C) 1997-2002 by Parker Waechter & Dimitri van Heesch. * * Style sheet additions by Alexander Bartolich * diff --git a/src/rtfgen.h b/src/rtfgen.h index 81633a6..396653c 100644 --- a/src/rtfgen.h +++ b/src/rtfgen.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2001 by Parker Waechter & Dimitri van Heesch. + * Copyright (C) 1997-2002 by Parker Waechter & 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 diff --git a/src/scanner.h b/src/scanner.h index 007dc5b..80efb9a 100644 --- a/src/scanner.h +++ b/src/scanner.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2001 by Dimitri van Heesch. + * Copyright (C) 1997-2002 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 diff --git a/src/scanner.l b/src/scanner.l index e70d3da..1e6acd2 100644 --- a/src/scanner.l +++ b/src/scanner.l @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2001 by Dimitri van Heesch. + * Copyright (C) 1997-2002 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 @@ -1926,7 +1926,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'")) . { current->type += *yytext; } -"("/{BN}*{ID}{BN}*"*" { // for catching typedef void (__stdcall *f)() like definitions +"("/{BN}*{ID}{BN}*"*"{BN}*{ID}*")(" { // for catching typedef void (__stdcall *f)() like definitions if (current->type.left(7)=="typedef" && current->bodyLine==-1) // the bodyLine check is to prevent this guard to be true more than once { @@ -2813,8 +2813,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'")) current->doc+=yytext; BEGIN( tmpDocType ); } -"<"({TABLE}|{UL}|{OL}|{DL}){ATTR}|{P}">" { // end brief upon encountering any of these - //current->doc+=yytext; +"<"({TABLE}|{UL}|{OL}|{DL}|{P}){ATTR}">" { // end brief upon encountering any of these int i; for (i=yyleng-1;i>=0;i--) { @@ -4045,7 +4044,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'")) current->brief+=yytext; } } -"/*" { current->doc += yytext; } +"/*"|"//" { current->doc += yytext; } .*/\n { BEGIN( lastCContext ) ; } diff --git a/src/searchindex.cpp b/src/searchindex.cpp index 5567f4e..fa3600d 100644 --- a/src/searchindex.cpp +++ b/src/searchindex.cpp @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2001 by Dimitri van Heesch. + * Copyright (C) 1997-2002 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 diff --git a/src/searchindex.h b/src/searchindex.h index 214de6e..e93709f 100644 --- a/src/searchindex.h +++ b/src/searchindex.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2001 by Dimitri van Heesch. + * Copyright (C) 1997-2002 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 diff --git a/src/section.h b/src/section.h index 90ac2d4..ce7683d 100644 --- a/src/section.h +++ b/src/section.h @@ -3,7 +3,7 @@ * * * - * Copyright (C) 1997-2001 by Dimitri van Heesch. + * Copyright (C) 1997-2002 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 diff --git a/src/sortdict.h b/src/sortdict.h index 7675724..be4652c 100644 --- a/src/sortdict.h +++ b/src/sortdict.h @@ -3,7 +3,7 @@ * * * - * Copyright (C) 1997-2001 by Dimitri van Heesch. + * Copyright (C) 1997-2002 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 diff --git a/src/suffixtree.cpp b/src/suffixtree.cpp index 242fa9c..d247f4d 100644 --- a/src/suffixtree.cpp +++ b/src/suffixtree.cpp @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2001 by Dimitri van Heesch. + * Copyright (C) 1997-2002 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 diff --git a/src/suffixtree.h b/src/suffixtree.h index 7aa8dc9..4d0f6a3 100644 --- a/src/suffixtree.h +++ b/src/suffixtree.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2001 by Dimitri van Heesch. + * Copyright (C) 1997-2002 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 diff --git a/src/tagreader.cpp b/src/tagreader.cpp index 5f35a6d..d3c85ba 100644 --- a/src/tagreader.cpp +++ b/src/tagreader.cpp @@ -3,7 +3,7 @@ * * * - * Copyright (C) 1997-2001 by Dimitri van Heesch. + * Copyright (C) 1997-2002 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 @@ -1072,23 +1072,26 @@ void TagFileParser::buildLists(Entry *root) tpgi = m_tagFilePackages.next(); } - // build group list - TagGroupInfo *tgi = m_tagFileGroups.first(); - while (tgi) + // build group list, but only if config file says to include it + if (Config_getBool("EXTERNAL_GROUPS")) { - Entry *ge = new Entry; - ge->section = Entry::GROUPDOC_SEC; - ge->name = tgi->name; - ge->type = tgi->title; - addDocAnchors(ge,tgi->docAnchors); - TagInfo *ti = new TagInfo; - ti->tagName = m_tagName; - ti->fileName = tgi->filename; - ge->tagInfo = ti; - - buildMemberList(ge,tgi->members); - root->addSubEntry(ge); - tgi = m_tagFileGroups.next(); + TagGroupInfo *tgi = m_tagFileGroups.first(); + while (tgi) + { + Entry *ge = new Entry; + ge->section = Entry::GROUPDOC_SEC; + ge->name = tgi->name; + ge->type = tgi->title; + addDocAnchors(ge,tgi->docAnchors); + TagInfo *ti = new TagInfo; + ti->tagName = m_tagName; + ti->fileName = tgi->filename; + ge->tagInfo = ti; + + buildMemberList(ge,tgi->members); + root->addSubEntry(ge); + tgi = m_tagFileGroups.next(); + } } // build page list diff --git a/src/tagreader.h b/src/tagreader.h index a9c7afd..8a62504 100644 --- a/src/tagreader.h +++ b/src/tagreader.h @@ -3,7 +3,7 @@ * * * - * Copyright (C) 1997-2001 by Dimitri van Heesch. + * Copyright (C) 1997-2002 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 diff --git a/src/translator.cpp b/src/translator.cpp index 00b15b8..2ecbad9 100644 --- a/src/translator.cpp +++ b/src/translator.cpp @@ -266,6 +266,6 @@ QCString Translator::JapaneseEucToSjis( const QCString & sInput ) } } - return result.local8Bit(); + return result.latin1(); } diff --git a/src/translator.h b/src/translator.h index 725c288..6398ca4 100644 --- a/src/translator.h +++ b/src/translator.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2001 by Dimitri van Heesch. + * Copyright (C) 1997-2002 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 @@ -364,6 +364,13 @@ class Translator virtual QCString trReferences() = 0; +////////////////////////////////////////////////////////////////////////// +// new since 1.2.13 +////////////////////////////////////////////////////////////////////////// + + virtual QCString trImplementedFromList(int numEntries) = 0; + virtual QCString trImplementedInList(int numEntries) = 0; + }; #endif diff --git a/src/translator_adapter.h b/src/translator_adapter.h index a103405..932cfe3 100644 --- a/src/translator_adapter.h +++ b/src/translator_adapter.h @@ -37,16 +37,28 @@ class TranslatorAdapterBase : public Translator * \sa createUpdateNeededMessage() */ virtual QCString updateNeededMessage() = 0; + +}; + +class TranslatorAdapter_1_2_13 : public TranslatorAdapterBase +{ + public: + virtual QCString updateNeededMessage() + { return createUpdateNeededMessage(idLanguage(),"release 1.2.13"); } + + virtual QCString trImplementedFromList(int numEntries) + { return english.trImplementedFromList(numEntries); } + + virtual QCString trImplementedInList(int numEntries) + { return english.trImplementedInList(numEntries); } }; -class TranslatorAdapter_1_2_11 : public TranslatorAdapterBase +class TranslatorAdapter_1_2_11 : public TranslatorAdapter_1_2_13 { public: virtual QCString updateNeededMessage() { return createUpdateNeededMessage(idLanguage(),"release 1.2.11"); } - // Put new adapter methods below... - // virtual QCString trReferences() { return english.trReferences(); } diff --git a/src/translator_br.h b/src/translator_br.h index dca4523..d8e668f 100644 --- a/src/translator_br.h +++ b/src/translator_br.h @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright (C) 1997-2001 by Dimitri van Heesch. + * Copyright (C) 1997-2002 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 @@ -21,7 +21,7 @@ #ifndef TRANSLATOR_BR_H #define TRANSLATOR_BR_H -class TranslatorBrazilian: public Translator +class TranslatorBrazilian: public TranslatorAdapter_1_2_13 { public: diff --git a/src/translator_cn.h b/src/translator_cn.h index 7d9ebe0..eba9f12 100644 --- a/src/translator_cn.h +++ b/src/translator_cn.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2001 by Dimitri van Heesch. + * Copyright (C) 1997-2002 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 @@ -18,15 +18,13 @@ #ifndef TRANSLATOR_CN_H #define TRANSLATOR_CN_H -#include "translator_adapter.h" - /*! If you want insert a space whenever Chinese meets English charactors, set CN_SPC to " ", else null. */ #define CN_SPC -class TranslatorChinese : public TranslatorAdapter_1_2_11 +class TranslatorChinese : public TranslatorAdapter_1_2_13 { public: /*! Used for identification of the language. The identification @@ -54,17 +52,9 @@ class TranslatorChinese : public TranslatorAdapter_1_2_11 */ virtual QCString latexLanguageSupportCommand() { - QCString result(latexBabelPackage()); - if (!result.isEmpty()) - { - result = "\\usepackage{" + result; - result += "}\n"; - } - return result; + return ""; } - virtual QCString latexBabelPackage() - { return "CJK"; } /*! return the language charset. This will be used for the HTML output */ virtual QCString idLanguageCharset() @@ -158,9 +148,6 @@ class TranslatorChinese : public TranslatorAdapter_1_2_11 // quick reference sections - virtual QCString trVerbatimText(const char *f) - { return (QCString)"ÕâÊÇÍ·Îļþ"CN_SPC+f+CN_SPC"µÄÔ´´úÂë¡£"; } - /*! This is put above each page as a link to the list of all groups of * compounds or files (see the \\group command). */ @@ -384,8 +371,6 @@ class TranslatorChinese : public TranslatorAdapter_1_2_11 virtual QCString trEnumerationValues() { return "ö¾ÙÖµ"; } - virtual QCString trAuthor() - { return "×÷Õß"; } virtual QCString trDefineDocumentation() { return "ºê¶¨ÒåÎĵµ"; } @@ -416,9 +401,6 @@ class TranslatorChinese : public TranslatorAdapter_1_2_11 } } - virtual QCString trFiles() - { return "Îļþ"; } - virtual QCString trGeneratedAt(const char *date,const char *projName) { QCString result=(QCString)"Generated at "+date; @@ -456,9 +438,6 @@ class TranslatorChinese : public TranslatorAdapter_1_2_11 virtual QCString trDate() { return "ÈÕÆÚ"; } - virtual QCString trAuthors() - { return "×÷Õß"; } - virtual QCString trReturns() { return "·µ»Ø"; } @@ -1289,6 +1268,16 @@ class TranslatorChinese : public TranslatorAdapter_1_2_11 return "×÷Õß"; } +////////////////////////////////////////////////////////////////////////// +// new since 1.2.11 +////////////////////////////////////////////////////////////////////////// + + /*! This text is put before the list of members referenced by a member + */ + virtual QCString trReferences() + { + return "²Î¿¼"; + } }; #endif diff --git a/src/translator_cz.h b/src/translator_cz.h index 5972f42..987a8ed 100644 --- a/src/translator_cz.h +++ b/src/translator_cz.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2001 by Dimitri van Heesch. + * Copyright (C) 1997-2002 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 @@ -151,7 +151,7 @@ // probably slightly faster. -class TranslatorCzech : public Translator +class TranslatorCzech : public TranslatorAdapter_1_2_13 { private: /*! The decode() inline assumes the source written in the diff --git a/src/translator_de.h b/src/translator_de.h index 8df6c33..082ac9d 100644 --- a/src/translator_de.h +++ b/src/translator_de.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2001 by Dimitri van Heesch. + * Copyright (C) 1997-2002 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 @@ -66,7 +66,7 @@ #ifndef TRANSLATOR_DE_H #define TRANSLATOR_DE_H -class TranslatorGerman : public Translator +class TranslatorGerman : public TranslatorAdapter_1_2_13 { public: diff --git a/src/translator_dk.h b/src/translator_dk.h index 9eda890..5f5b447 100644 --- a/src/translator_dk.h +++ b/src/translator_dk.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2001 by Dimitri van Heesch. + * Copyright (C) 1997-2002 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 diff --git a/src/translator_en.h b/src/translator_en.h index e07b51f..9ad7221 100644 --- a/src/translator_en.h +++ b/src/translator_en.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2001 by Dimitri van Heesch. + * Copyright (C) 1997-2002 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 @@ -1372,6 +1372,26 @@ class TranslatorEnglish : public Translator return "References"; } +////////////////////////////////////////////////////////////////////////// +// new since 1.2.13 +////////////////////////////////////////////////////////////////////////// + + /*! used in member documentation blocks to produce a list of + * members that are implemented by this one. + */ + virtual QCString trImplementedFromList(int numEntries) + { + return "Implements "+trWriteList(numEntries)+"."; + } + + /*! used in member documentation blocks to produce a list of + * all members that implementation this member. + */ + virtual QCString trImplementedInList(int numEntries) + { + return "Implemented in "+trWriteList(numEntries)+"."; + } + }; #endif diff --git a/src/translator_es.h b/src/translator_es.h index 7da4ebe..f5cec24 100644 --- a/src/translator_es.h +++ b/src/translator_es.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2001 by Dimitri van Heesch. + * Copyright (C) 1997-2002 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 diff --git a/src/translator_fi.h b/src/translator_fi.h index ba836a0..635589b 100644 --- a/src/translator_fi.h +++ b/src/translator_fi.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2001 by Dimitri van Heesch. + * Copyright (C) 1997-2002 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 diff --git a/src/translator_fr.h b/src/translator_fr.h index 584995b..375afbc 100644 --- a/src/translator_fr.h +++ b/src/translator_fr.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2001 by Dimitri van Heesch. + * Copyright (C) 1997-2002 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 @@ -37,7 +37,7 @@ #ifndef TRANSLATOR_FR_H #define TRANSLATOR_FR_H -class TranslatorFrench : public Translator +class TranslatorFrench : public TranslatorAdapter_1_2_13 { public: QCString idLanguage() diff --git a/src/translator_gr.h b/src/translator_gr.h index ba07ac7..11befec 100644 --- a/src/translator_gr.h +++ b/src/translator_gr.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2001 by Dimitri van Heesch. + * Copyright (C) 1997-2002 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 diff --git a/src/translator_hr.h b/src/translator_hr.h index e985734..603d766 100644 --- a/src/translator_hr.h +++ b/src/translator_hr.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2001 by Dimitri van Heesch. + * Copyright (C) 1997-2002 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 @@ -48,7 +48,7 @@ #ifndef TRANSLATOR_HR_H #define TRANSLATOR_HR_H -class TranslatorCroatian : public Translator +class TranslatorCroatian : public TranslatorAdapter_1_2_13 { private: /*! to avoid macro redefinition from translator_cz.h */ diff --git a/src/translator_hu.h b/src/translator_hu.h index ee8d343..86895bd 100644 --- a/src/translator_hu.h +++ b/src/translator_hu.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2001 by Dimitri van Heesch. + * Copyright (C) 1997-2002 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 diff --git a/src/translator_it.h b/src/translator_it.h index a4933e9..9472dab 100644 --- a/src/translator_it.h +++ b/src/translator_it.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2001 by Dimitri van Heesch. + * Copyright (C) 1997-2002 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 @@ -61,7 +61,7 @@ #ifndef TRANSLATOR_IT_H #define TRANSLATOR_IT_H -class TranslatorItalian : public Translator +class TranslatorItalian : public TranslatorAdapter_1_2_13 { public: diff --git a/src/translator_jp.h b/src/translator_jp.h index 5c240f1..0dbfc90 100644 --- a/src/translator_jp.h +++ b/src/translator_jp.h @@ -29,7 +29,7 @@ #ifndef TRANSLATOR_JP_H #define TRANSLATOR_JP_H -class TranslatorJapanese : public Translator +class TranslatorJapanese : public TranslatorAdapter_1_2_13 { private: /*! The decode() can change euc into sjis */ @@ -52,7 +52,7 @@ class TranslatorJapanese : public Translator virtual QCString idLanguageCharset() { #ifdef _WIN32 - return "ShiftJIS"; + return "Shift_JIS"; #else return "euc-jp"; #endif @@ -101,15 +101,15 @@ class TranslatorJapanese : public Translator /*! put in the class documentation */ virtual QCString trListOfAllMembers() - { return decode("¤¹¤Ù¤Æ¤Î¥á¥ó¥Ð¥ê¥¹¥È"); } + { return decode("¤¹¤Ù¤Æ¤Î¥á¥ó¥Ð°ìÍ÷"); } /*! used as the title of the "list of all members" page of a class */ virtual QCString trMemberList() - { return decode("¥á¥ó¥Ð¥ê¥¹¥È"); } + { return decode("¥á¥ó¥Ð°ìÍ÷"); } /*! this is the first part of a sentence that is followed by a class name */ virtual QCString trThisIsTheListOfAllMembers() - { return decode("¤³¤ì¤ÏÁ´¥á¥ó¥Ð¥ê¥¹¥È¤Ç¤¹¡£"); } + { return decode("¤³¤ì¤ÏÁ´¥á¥ó¥Ð¤Î°ìÍ÷¤Ç¤¹¡£"); } /*! this is the remainder of the sentence after the class name */ virtual QCString trIncludingInheritedMembers() @@ -120,9 +120,9 @@ class TranslatorJapanese : public Translator */ virtual QCString trGeneratedAutomatically(const char *s) { QCString result; - if (s) result=(QCString)s+"¤Î"; - result+="¥½¡¼¥¹¥³¡¼¥É¤«¤é Doxygen ¤¬¼«Æ°Åª¤ËÀ¸À®¤·¤Þ¤·¤¿¡£"; - return decode(result); + if (s) result=(QCString)s+decode("¤Î"); + result+=decode("¥½¡¼¥¹¤«¤é Doxygen ¤¬À¸À®¤·¤Þ¤·¤¿¡£"); + return result; } /*! put after an enum name in the list of all members */ @@ -135,7 +135,7 @@ class TranslatorJapanese : public Translator /*! put after an undocumented member in the list of all members */ virtual QCString trDefinedIn() - { return decode("¼¡¤ÇÄêµÁ¤µ¤ì¤Þ¤·¤¿¡£"); } + { return decode("¼¡¤ÇÄêµÁ¤µ¤ì¤Æ¤¤¤Þ¤¹¡£"); } // quick reference sections @@ -164,7 +164,7 @@ class TranslatorJapanese : public Translator /*! This is put above each page as a link to the list of documented files */ virtual QCString trFileList() - { return decode("¥Õ¥¡¥¤¥ë¥ê¥¹¥È"); } + { return decode("¥Õ¥¡¥¤¥ë°ìÍ÷"); } /*! This is put above each page as a link to the list of all verbatim headers */ virtual QCString trHeaderFiles() @@ -209,17 +209,16 @@ class TranslatorJapanese : public Translator /*! This is an introduction to the class hierarchy. */ virtual QCString trClassHierarchyDescription() - { return decode("¤³¤Î·Ñ¾µ¥ê¥¹¥È¤Ï¤ª¤ª¤Þ¤«¤Ë¤Ï¥½¡¼¥È¤µ¤ì¤Æ¤¤¤Þ¤¹¤¬¡¢" - "¥¢¥ë¥Õ¥¡¥Ù¥Ã¥È½ç¤Ç´°Á´¤Ë¥½¡¼¥È¤µ¤ì¤Æ¤Ï¤¤¤Þ¤»¤ó¡£"); + { return decode("¤³¤Î·Ñ¾µ°ìÍ÷¤Ï¤ª¤ª¤Þ¤«¤Ë¤Ï¥½¡¼¥È¤µ¤ì¤Æ¤¤¤Þ¤¹¤¬¡¢" + "´°Á´¤Ë¥¢¥ë¥Õ¥¡¥Ù¥Ã¥È½ç¤Ç¥½¡¼¥È¤µ¤ì¤Æ¤Ï¤¤¤Þ¤»¤ó¡£"); } /*! This is an introduction to the list with all files. */ - virtual QCString trFileListDescription(bool extractAll) + virtual QCString trFileListDescription(bool /*extractAll*/) { - QCString result="¤³¤Î¥ê¥¹¥È¤Ï¡¢"; - if (!extractAll) result+="¥É¥­¥å¥á¥ó¥È²½¤µ¤ì¡¢"; - result+="´Ê°×ÀâÌÀ¤ò»ý¤Ä¥Õ¥¡¥¤¥ë¤¹¤Ù¤Æ¤Î¥ê¥¹¥È¤Ç¤¹¡£"; - return decode(result); + QCString result=decode("¤³¤ì¤Ï"); + result+=decode("¥Õ¥¡¥¤¥ë°ìÍ÷¤Ç¤¹¡£"); + return result; } /*! This is an introduction to the annotated compound list. */ @@ -227,49 +226,46 @@ class TranslatorJapanese : public Translator { if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) { - return decode("¥Ç¡¼¥¿¹½Â¤¤Î´Êñ¤ÊÀâÌÀ¤Ç¤¹¡£"); + return decode("¥Ç¡¼¥¿¹½Â¤¤Î²òÀâ¤Ç¤¹¡£"); } else { - return decode("¥¯¥é¥¹¡¢¹½Â¤ÂΡ¢¶¦ÍÑÂΡ¢¥¤¥ó¥¿¥Õ¥§¡¼¥¹¤Î´Êñ¤ÊÀâÌÀ¤Ç¤¹¡£"); + return decode("¥¯¥é¥¹¡¢¹½Â¤ÂΡ¢¶¦ÍÑÂΡ¢¥¤¥ó¥¿¥Õ¥§¡¼¥¹¤Î²òÀâ¤Ç¤¹¡£"); } } /*! This is an introduction to the page with all class members. */ virtual QCString trCompoundMembersDescription(bool extractAll) { - QCString result="¤³¤ì¤Ï"; - if (!extractAll) result+="¥É¥­¥å¥á¥ó¥È²½¤µ¤ì¤¿"; + QCString result=decode("¤³¤ì¤Ï"); if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) { - result+="¥Õ¥£¡¼¥ë¥É¤¹¤Ù¤Æ¤Î¥ê¥¹¥È¤Ç¡¢¤½¤ì¤¾¤ì"; - if (extractAll) result+="¤¬Â°¤·¤Æ¤¤¤ë¹½Â¤ÂÎ/¶¦ÍÑÂÎ"; + result+=decode("¥Õ¥£¡¼¥ë¥É¤Î°ìÍ÷¤Ç¤½¤ì¤¾¤ì"); + if (extractAll) result+=decode("¤¬Â°¤·¤Æ¤¤¤ë¹½Â¤ÂÎ/¶¦ÍÑÂÎ"); } else { - result+="¥¯¥é¥¹¥á¥ó¥Ð¤¹¤Ù¤Æ¤Î¥ê¥¹¥È¤Ç¡¢¤½¤ì¤¾¤ì"; - if (extractAll) result+="¤¬Â°¤·¤Æ¤¤¤ë¥¯¥é¥¹"; + result+=decode("¥¯¥é¥¹¥á¥ó¥Ð¤Î°ìÍ÷¤Ç¡¢¤½¤ì¤¾¤ì"); + if (extractAll) result+=decode("¤¬Â°¤·¤Æ¤¤¤ë¥¯¥é¥¹"); } - result+="¤Î²òÀâ¤Ø¤Î¥ê¥ó¥¯¤¬Ä¥¤é¤ì¤Æ¤¤¤Þ¤¹¡£"; - return decode(result); + result+=decode("¤Î²òÀâ¤Ø¥ê¥ó¥¯¤·¤Æ¤¤¤Þ¤¹¡£"); + return result; } /*! This is an introduction to the page with all file members. */ - virtual QCString trFileMembersDescription(bool extractAll) + virtual QCString trFileMembersDescription(bool /*extractAll*/) { - QCString result="¤³¤ì¤Ï"; - if (!extractAll) result+="¥É¥­¥å¥á¥ó¥È²½¤µ¤ì¤¿"; + QCString result=decode("¤³¤ì¤Ï"); if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) { - result+="´Ø¿ô¡¢ÊÑ¿ô¡¢¥Þ¥¯¥í¡¢Îóµó·¿¡¢·¿ÄêµÁ¤Î¥ê¥¹¥È¤Ç¡¢¤½¤ì¤¾¤ì"; + result+=decode("´Ø¿ô¡¢ÊÑ¿ô¡¢¥Þ¥¯¥í¡¢Îóµó·¿¡¢·¿ÄêµÁ¤Î"); } else { - result+="¥Õ¥¡¥¤¥ë¥á¥ó¥Ð¤¹¤Ù¤Æ¤Î¥ê¥¹¥È¤Ç¡¢¤½¤ì¤¾¤ì"; + result+=decode("¥Õ¥¡¥¤¥ë¥á¥ó¥Ð¤Î"); } - if (extractAll) result+="¤¬Â°¤·¤Æ¤¤¤ë¥Õ¥¡¥¤¥ë"; - result+="¤Î²òÀâ¤Ø¤Î¥ê¥ó¥¯¤¬Ä¥¤é¤ì¤Æ¤¤¤Þ¤¹¡£"; - return decode(result); + result+=decode("°ìÍ÷¤Ç¤¹¡£¤½¤ì¤¾¤ì¤¬Â°¤·¤Æ¤¤¤ë¥Õ¥¡¥¤¥ë¤Î²òÀâ¤Ø¥ê¥ó¥¯¤·¤Æ¤¤¤Þ¤¹¡£"); + return result; } /*! This is an introduction to the page with the list of all header files. */ @@ -278,15 +274,15 @@ class TranslatorJapanese : public Translator /*! This is an introduction to the page with the list of all examples */ virtual QCString trExamplesDescription() - { return decode("¤¹¤Ù¤Æ¤ÎÎã¤Î¥ê¥¹¥È¤Ç¤¹¡£"); } + { return decode("¤¹¤Ù¤Æ¤ÎÎã¤Î°ìÍ÷¤Ç¤¹¡£"); } /*! This is an introduction to the page with the list of related pages */ virtual QCString trRelatedPagesDescription() - { return decode("´ØÏ¢¤¹¤ë¥É¥­¥å¥á¥ó¥È¥Ú¡¼¥¸¤¹¤Ù¤Æ¤Î¥ê¥¹¥È¤Ç¤¹¡£"); } + { return decode("´ØÏ¢¥Ú¡¼¥¸¤Î°ìÍ÷¤Ç¤¹¡£"); } /*! This is an introduction to the page with the list of class/file groups */ virtual QCString trModulesDescription() - { return decode("¤¹¤Ù¤Æ¤Î¥â¥¸¥å¡¼¥ë¤Î¥ê¥¹¥È¤Ç¤¹¡£"); } + { return decode("¤¹¤Ù¤Æ¤Î¥â¥¸¥å¡¼¥ë¤Î°ìÍ÷¤Ç¤¹¡£"); } /*! This sentences is used in the annotated class/file lists if no brief * description is given. @@ -480,9 +476,9 @@ class TranslatorJapanese : public Translator virtual QCString trGeneratedAt(const char *date,const char *projName) { QCString result; - if (projName) result+=(QCString)projName+"¤ËÂФ·¤Æ"; - result+=(QCString)date+"¤ËÀ¸À®¤µ¤ì¤Þ¤·¤¿¡£"; - return decode(result); + if (projName) result+=(QCString)projName+decode("¤ËÂФ·¤Æ"); + result+=(QCString)date+decode("¤ËÀ¸À®¤µ¤ì¤Þ¤·¤¿¡£"); + return result; } /*! This is part of the sentence used in the standard footer of each page. */ @@ -494,7 +490,7 @@ class TranslatorJapanese : public Translator /*! this text is put before a class diagram */ virtual QCString trClassDiagram(const char *clName) { - return decode((QCString)clName+"¤ËÂФ¹¤ë·Ñ¾µ¥°¥é¥Õ"); + return (QCString)clName+decode("¤ËÂФ¹¤ë·Ñ¾µ¥°¥é¥Õ"); } /*! this text is generated when the \\internal command is used. */ @@ -552,15 +548,14 @@ class TranslatorJapanese : public Translator /*! used as the title of page containing all the index of all namespaces. */ virtual QCString trNamespaceList() - { return decode("̾Á°¶õ´Ö¥ê¥¹¥È"); } + { return decode("̾Á°¶õ´Ö°ìÍ÷"); } /*! used as an introduction to the namespace list */ - virtual QCString trNamespaceListDescription(bool extractAll) + virtual QCString trNamespaceListDescription(bool /*extractAll*/) { - QCString result="¤³¤Î¥ê¥¹¥È¤Ï¡¢´Ê°×ÀâÌÀ¤ò»ý¤Ä¤¹¤Ù¤Æ¤Î"; - if (!extractAll) result+="¥É¥­¥å¥á¥ó¥È²½¤µ¤ì¤¿"; - result+="̾Á°¶õ´Ö¤Î¥ê¥¹¥È¤Ç¤¹¡£"; - return decode(result); + QCString result=decode(""); + result+=decode("̾Á°¶õ´Ö¤Î°ìÍ÷¤Ç¤¹¡£"); + return result; } /*! used in the class documentation as a header before the list of all @@ -591,29 +586,29 @@ class TranslatorJapanese : public Translator QCString result=""; switch(compType) { - case ClassDef::Class: result+="¥¯¥é¥¹ "; break; - case ClassDef::Struct: result+="¹½Â¤ÂÎ "; break; - case ClassDef::Union: result+="¶¦ÍÑÂÎ "; break; - case ClassDef::Interface: result+="¥¤¥ó¥¿¥Õ¥§¡¼¥¹"; break; - case ClassDef::Exception: result+="Îã³°"; break; //TODO:fixme + case ClassDef::Class: result+=decode("¥¯¥é¥¹ "); break; + case ClassDef::Struct: result+=decode("¹½Â¤ÂÎ "); break; + case ClassDef::Union: result+=decode("¶¦ÍÑÂÎ "); break; + case ClassDef::Interface: result+=decode("¥¤¥ó¥¿¥Õ¥§¡¼¥¹"); break; + case ClassDef::Exception: result+=decode("Îã³°"); break; //TODO:fixme } - if (isTemplate) result+=" ¥Æ¥ó¥×¥ì¡¼¥È"; - result+=(QCString)clName+" ¤Î²òÀâ"; - return decode(result); + if (isTemplate) result+=decode(" ¥Æ¥ó¥×¥ì¡¼¥È"); + result+=(QCString)clName+decode(" ¤Î²òÀâ"); + return result; } /*! used as the title of the HTML page of a file */ virtual QCString trFileReference(const char *fileName) { - QCString result="¥Õ¥¡¥¤¥ë "+(QCString)fileName+" ¤Î²òÀâ"; - return decode(result); + QCString result=decode("")+(QCString)fileName+decode(" ¤Î²òÀâ"); + return result; } /*! used as the title of the HTML page of a namespace */ virtual QCString trNamespaceReference(const char *namespaceName) { - QCString result="̾Á°¶õ´Ö "+(QCString)namespaceName+" ¤Î²òÀâ"; - return decode(result); + QCString result=decode("̾Á°¶õ´Ö ")+(QCString)namespaceName+decode(" ¤Î²òÀâ"); + return result; } /* these are for the member sections of a class, struct or union */ @@ -655,12 +650,12 @@ class TranslatorJapanese : public Translator if (i!=numEntries-1) // not the last entry, so we need a separator { if (i=0 && subst.at(ip)=='*' || subst.at(ip)=='&' || subst.at(ip)==' ') ip--; subst=subst.left(ip+1); //printf(" getResolvedClass `%s'->`%s'\n",name.data(),subst.data()); diff --git a/src/util.h b/src/util.h index 1572cb5..668023d 100644 --- a/src/util.h +++ b/src/util.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2001 by Dimitri van Heesch. + * Copyright (C) 1997-2002 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 diff --git a/src/version.h b/src/version.h index fef5707..600735b 100644 --- a/src/version.h +++ b/src/version.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2001 by Dimitri van Heesch. + * Copyright (C) 1997-2002 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 diff --git a/src/xmlgen.cpp b/src/xmlgen.cpp index 049e3d5..86fb548 100644 --- a/src/xmlgen.cpp +++ b/src/xmlgen.cpp @@ -3,7 +3,7 @@ * * * - * Copyright (C) 1997-2001 by Dimitri van Heesch. + * Copyright (C) 1997-2002 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 @@ -32,6 +32,7 @@ #include "code.h" #include "page.h" #include "filename.h" +#include "version.h" #include #include @@ -997,7 +998,7 @@ static void writeMemberReference(QTextStream &t,Definition *def,MemberDef *rmd,c } } -static void generateXMLForMember(MemberDef *md,QTextStream &t,Definition *def) +static void generateXMLForMember(MemberDef *md,QTextStream &ti,QTextStream &t,Definition *def) { // + declaration/definition arg lists @@ -1015,6 +1016,9 @@ static void generateXMLForMember(MemberDef *md,QTextStream &t,Definition *def) if (md->memberType()==MemberDef::EnumValue) return; + ti << " getOutputFileBase() + << "_1" << md->anchor() << "\">" << md->name() << "" << endl; + QCString scopeName; if (md->getClassDef()) scopeName=md->getClassDef()->name(); @@ -1250,7 +1254,7 @@ static void generateXMLForMember(MemberDef *md,QTextStream &t,Definition *def) t << " " << endl; } -static void generateXMLSection(Definition *d,QTextStream &t, +static void generateXMLSection(Definition *d,QTextStream &ti,QTextStream &t, MemberList *ml,const char *kind,const char *header=0) { if (ml->count()==0) return; // empty list @@ -1264,13 +1268,12 @@ static void generateXMLSection(Definition *d,QTextStream &t, MemberDef *md; for (mli.toFirst();(md=mli.current());++mli) { - generateXMLForMember(md,t,d); + generateXMLForMember(md,ti,t,d); } t << " " << endl; } - -static void generateXMLForClass(ClassDef *cd,QTextStream &t) +static void generateXMLForClass(ClassDef *cd,QTextStream &ti) { // + brief description // + detailed description @@ -1292,6 +1295,21 @@ static void generateXMLForClass(ClassDef *cd,QTextStream &t) if (cd->name().find('@')!=-1) return; // skip anonymous compounds. if (cd->templateMaster()!=0) return; // skip generated template instances. + ti << " getOutputFileBase() + << "\">" << cd->name() << "" << endl; + + QCString outputDirectory = Config_getString("OUTPUT_DIRECTORY"); + QCString fileName=outputDirectory+"/xml/"+cd->getOutputFileBase()+".xml"; + QFile f(fileName); + if (!f.open(IO_WriteOnly)) + { + err("Cannot open file %s for writing!\n",fileName.data()); + return; + } + QTextStream t(&f); + + t << "" << endl; + t << "" << endl; t << " getOutputFileBase() << "\" kind=\"" << cd->compoundTypeString() << "\">" << endl; @@ -1364,32 +1382,32 @@ static void generateXMLForClass(ClassDef *cd,QTextStream &t) MemberGroup *mg; for (;(mg=mgli.current());++mgli) { - generateXMLSection(cd,t,mg->members(),"user-defined",mg->header()); + generateXMLSection(cd,ti,t,mg->members(),"user-defined",mg->header()); } - generateXMLSection(cd,t,&cd->pubTypes,"public-type"); - generateXMLSection(cd,t,&cd->pubMembers,"public-func"); - generateXMLSection(cd,t,&cd->pubAttribs,"public-attrib"); - generateXMLSection(cd,t,&cd->pubSlots,"public-slot"); - generateXMLSection(cd,t,&cd->signals,"signal"); - generateXMLSection(cd,t,&cd->dcopMethods,"dcop-func"); - generateXMLSection(cd,t,&cd->properties,"property"); - generateXMLSection(cd,t,&cd->pubStaticMembers,"public-static-func"); - generateXMLSection(cd,t,&cd->pubStaticAttribs,"public-static-attrib"); - generateXMLSection(cd,t,&cd->proTypes,"protected-type"); - generateXMLSection(cd,t,&cd->proMembers,"protected-func"); - generateXMLSection(cd,t,&cd->proAttribs,"protected-attrib"); - generateXMLSection(cd,t,&cd->proSlots,"protected-slot"); - generateXMLSection(cd,t,&cd->proStaticMembers,"protected-static-func"); - generateXMLSection(cd,t,&cd->proStaticAttribs,"protected-static-attrib"); - generateXMLSection(cd,t,&cd->priTypes,"private-type"); - generateXMLSection(cd,t,&cd->priMembers,"private-func"); - generateXMLSection(cd,t,&cd->priAttribs,"private-attrib"); - generateXMLSection(cd,t,&cd->priSlots,"private-slot"); - generateXMLSection(cd,t,&cd->priStaticMembers,"private-static-func"); - generateXMLSection(cd,t,&cd->priStaticAttribs,"private-static-attrib"); - generateXMLSection(cd,t,&cd->friends,"signal"); - generateXMLSection(cd,t,&cd->related,"related"); + generateXMLSection(cd,ti,t,&cd->pubTypes,"public-type"); + generateXMLSection(cd,ti,t,&cd->pubMembers,"public-func"); + generateXMLSection(cd,ti,t,&cd->pubAttribs,"public-attrib"); + generateXMLSection(cd,ti,t,&cd->pubSlots,"public-slot"); + generateXMLSection(cd,ti,t,&cd->signals,"signal"); + generateXMLSection(cd,ti,t,&cd->dcopMethods,"dcop-func"); + generateXMLSection(cd,ti,t,&cd->properties,"property"); + generateXMLSection(cd,ti,t,&cd->pubStaticMembers,"public-static-func"); + generateXMLSection(cd,ti,t,&cd->pubStaticAttribs,"public-static-attrib"); + generateXMLSection(cd,ti,t,&cd->proTypes,"protected-type"); + generateXMLSection(cd,ti,t,&cd->proMembers,"protected-func"); + generateXMLSection(cd,ti,t,&cd->proAttribs,"protected-attrib"); + generateXMLSection(cd,ti,t,&cd->proSlots,"protected-slot"); + generateXMLSection(cd,ti,t,&cd->proStaticMembers,"protected-static-func"); + generateXMLSection(cd,ti,t,&cd->proStaticAttribs,"protected-static-attrib"); + generateXMLSection(cd,ti,t,&cd->priTypes,"private-type"); + generateXMLSection(cd,ti,t,&cd->priMembers,"private-func"); + generateXMLSection(cd,ti,t,&cd->priAttribs,"private-attrib"); + generateXMLSection(cd,ti,t,&cd->priSlots,"private-slot"); + generateXMLSection(cd,ti,t,&cd->priStaticMembers,"private-static-func"); + generateXMLSection(cd,ti,t,&cd->priStaticAttribs,"private-static-attrib"); + generateXMLSection(cd,ti,t,&cd->friends,"friend"); + generateXMLSection(cd,ti,t,&cd->related,"related"); t << " " << endl; writeXMLDocBlock(t,cd->getDefFileName(),cd->getDefLine(),cd->name(),0,cd->briefDescription()); @@ -1421,9 +1439,12 @@ static void generateXMLForClass(ClassDef *cd,QTextStream &t) } t << "/>" << endl; t << " " << endl; + t << "" << endl; + + ti << " " << endl; } -static void generateXMLForNamespace(NamespaceDef *nd,QTextStream &t) +static void generateXMLForNamespace(NamespaceDef *nd,QTextStream &ti) { // + contained class definitions // + contained namespace definitions @@ -1435,6 +1456,22 @@ static void generateXMLForNamespace(NamespaceDef *nd,QTextStream &t) // - files containing (parts of) the namespace definition if (nd->isReference()) return; // skip external references + + ti << " getOutputFileBase() + << "\">" << nd->name() << "" << endl; + + QCString outputDirectory = Config_getString("OUTPUT_DIRECTORY"); + QCString fileName=outputDirectory+"/xml/"+nd->getOutputFileBase()+".xml"; + QFile f(fileName); + if (!f.open(IO_WriteOnly)) + { + err("Cannot open file %s for writing!\n",fileName.data()); + return; + } + QTextStream t(&f); + + t << "" << endl; + t << "" << endl; t << " getOutputFileBase() << "\" kind=\"namespace\">" << endl; t << " "; @@ -1467,15 +1504,15 @@ static void generateXMLForNamespace(NamespaceDef *nd,QTextStream &t) MemberGroup *mg; for (;(mg=mgli.current());++mgli) { - generateXMLSection(nd,t,mg->members(),"user-defined",mg->header()); + generateXMLSection(nd,ti,t,mg->members(),"user-defined",mg->header()); } - generateXMLSection(nd,t,&nd->decDefineMembers,"define"); - generateXMLSection(nd,t,&nd->decProtoMembers,"prototype"); - generateXMLSection(nd,t,&nd->decTypedefMembers,"typedef"); - generateXMLSection(nd,t,&nd->decEnumMembers,"enum"); - generateXMLSection(nd,t,&nd->decFuncMembers,"func"); - generateXMLSection(nd,t,&nd->decVarMembers,"var"); + generateXMLSection(nd,ti,t,&nd->decDefineMembers,"define"); + generateXMLSection(nd,ti,t,&nd->decProtoMembers,"prototype"); + generateXMLSection(nd,ti,t,&nd->decTypedefMembers,"typedef"); + generateXMLSection(nd,ti,t,&nd->decEnumMembers,"enum"); + generateXMLSection(nd,ti,t,&nd->decFuncMembers,"func"); + generateXMLSection(nd,ti,t,&nd->decVarMembers,"var"); t << " " << endl; writeXMLDocBlock(t,nd->getDefFileName(),nd->getDefLine(),0,0,nd->briefDescription()); @@ -1487,9 +1524,12 @@ static void generateXMLForNamespace(NamespaceDef *nd,QTextStream &t) << nd->getDefFileName() << "\" line=\"" << nd->getDefLine() << "\"/>" << endl; t << " " << endl; + t << "" << endl; + + ti << " " << endl; } -static void generateXMLForFile(FileDef *fd,QTextStream &t) +static void generateXMLForFile(FileDef *fd,QTextStream &ti) { // + includes files // + includedby files @@ -1507,6 +1547,21 @@ static void generateXMLForFile(FileDef *fd,QTextStream &t) if (fd->isReference()) return; // skip external references + ti << " getOutputFileBase() + << "\">" << fd->name() << "" << endl; + + QCString outputDirectory = Config_getString("OUTPUT_DIRECTORY"); + QCString fileName=outputDirectory+"/xml/"+fd->getOutputFileBase()+".xml"; + QFile f(fileName); + if (!f.open(IO_WriteOnly)) + { + err("Cannot open file %s for writing!\n",fileName.data()); + return; + } + QTextStream t(&f); + + t << "" << endl; + t << "" << endl; t << " getOutputFileBase() << "\" kind=\"file\">" << endl; t << " "; @@ -1583,15 +1638,15 @@ static void generateXMLForFile(FileDef *fd,QTextStream &t) MemberGroup *mg; for (;(mg=mgli.current());++mgli) { - generateXMLSection(fd,t,mg->members(),"user-defined",mg->header()); + generateXMLSection(fd,ti,t,mg->members(),"user-defined",mg->header()); } - generateXMLSection(fd,t,&fd->decDefineMembers,"define"); - generateXMLSection(fd,t,&fd->decProtoMembers,"prototype"); - generateXMLSection(fd,t,&fd->decTypedefMembers,"typedef"); - generateXMLSection(fd,t,&fd->decEnumMembers,"enum"); - generateXMLSection(fd,t,&fd->decFuncMembers,"func"); - generateXMLSection(fd,t,&fd->decVarMembers,"var"); + generateXMLSection(fd,ti,t,&fd->decDefineMembers,"define"); + generateXMLSection(fd,ti,t,&fd->decProtoMembers,"prototype"); + generateXMLSection(fd,ti,t,&fd->decTypedefMembers,"typedef"); + generateXMLSection(fd,ti,t,&fd->decEnumMembers,"enum"); + generateXMLSection(fd,ti,t,&fd->decFuncMembers,"func"); + generateXMLSection(fd,ti,t,&fd->decVarMembers,"var"); t << " " << endl; writeXMLDocBlock(t,fd->getDefFileName(),fd->getDefLine(),0,0,fd->briefDescription()); @@ -1604,9 +1659,12 @@ static void generateXMLForFile(FileDef *fd,QTextStream &t) t << " " << endl; t << " getDefFileName() << "\"/>" << endl; t << " " << endl; + t << "" << endl; + + ti << " " << endl; } -static void generateXMLForGroup(GroupDef *gd,QTextStream &t) +static void generateXMLForGroup(GroupDef *gd,QTextStream &ti) { // + members // + member groups @@ -1620,6 +1678,23 @@ static void generateXMLForGroup(GroupDef *gd,QTextStream &t) // + brief description // + detailed description + if (gd->isReference()) return; // skip external references + + ti << " getOutputFileBase() + << "\">" << gd->name() << "" << endl; + + QCString outputDirectory = Config_getString("OUTPUT_DIRECTORY"); + QCString fileName=outputDirectory+"/xml/"+gd->getOutputFileBase()+".xml"; + QFile f(fileName); + if (!f.open(IO_WriteOnly)) + { + err("Cannot open file %s for writing!\n",fileName.data()); + return; + } + + QTextStream t(&f); + t << "" << endl; + t << "" << endl; t << " getOutputFileBase() << "\" kind=\"group\">" << endl; t << " " << convertToXML(gd->name()) << "" << endl; @@ -1674,15 +1749,15 @@ static void generateXMLForGroup(GroupDef *gd,QTextStream &t) MemberGroup *mg; for (;(mg=mgli.current());++mgli) { - generateXMLSection(gd,t,mg->members(),"user-defined",mg->header()); + generateXMLSection(gd,ti,t,mg->members(),"user-defined",mg->header()); } - generateXMLSection(gd,t,&gd->decDefineMembers,"define"); - generateXMLSection(gd,t,&gd->decProtoMembers,"prototype"); - generateXMLSection(gd,t,&gd->decTypedefMembers,"typedef"); - generateXMLSection(gd,t,&gd->decEnumMembers,"enum"); - generateXMLSection(gd,t,&gd->decFuncMembers,"func"); - generateXMLSection(gd,t,&gd->decVarMembers,"var"); + generateXMLSection(gd,ti,t,&gd->decDefineMembers,"define"); + generateXMLSection(gd,ti,t,&gd->decProtoMembers,"prototype"); + generateXMLSection(gd,ti,t,&gd->decTypedefMembers,"typedef"); + generateXMLSection(gd,ti,t,&gd->decEnumMembers,"enum"); + generateXMLSection(gd,ti,t,&gd->decFuncMembers,"func"); + generateXMLSection(gd,ti,t,&gd->decVarMembers,"var"); t << " " << endl; writeXMLDocBlock(t,gd->getDefFileName(),gd->getDefLine(),0,0,gd->briefDescription()); @@ -1691,14 +1766,34 @@ static void generateXMLForGroup(GroupDef *gd,QTextStream &t) writeXMLDocBlock(t,gd->getDefFileName(),gd->getDefLine(),0,0,gd->documentation()); t << " " << endl; t << " " << endl; + t << "" << endl; + + ti << " " << endl; } -static void generateXMLForPage(PageInfo *pi,QTextStream &t) +static void generateXMLForPage(PageInfo *pi,QTextStream &ti) { // + name // + title // + documentation + if (pi->isReference()) return; + + ti << " getOutputFileBase() + << "\">" << pi->name << "" << endl; + + QCString outputDirectory = Config_getString("OUTPUT_DIRECTORY"); + QCString fileName=outputDirectory+"/xml/"+pi->getOutputFileBase()+".xml"; + QFile f(fileName); + if (!f.open(IO_WriteOnly)) + { + err("Cannot open file %s for writing!\n",fileName.data()); + return; + } + + QTextStream t(&f); + t << "" << endl; + t << "" << endl; t << " name; else t << pi->name.lower(); t << "\" kind=\"page\">" << endl; @@ -1712,6 +1807,9 @@ static void generateXMLForPage(PageInfo *pi,QTextStream &t) writeXMLDocBlock(t,pi->defFileName,pi->defLine,0,0,pi->doc); t << " " << endl; t << " " << endl; + t << "" << endl; + + ti << " " << endl; } void generateXML() @@ -1769,7 +1867,7 @@ void generateXML() return; } - QCString fileName=outputDirectory+"/xml/doxygen.xml"; + QCString fileName=outputDirectory+"/xml/index.xml"; QFile f(fileName); if (!f.open(IO_WriteOnly)) { @@ -1779,48 +1877,45 @@ void generateXML() QTextStream t(&f); t << "" << endl; //t << "" << endl; - t << "" << endl; - if (Doxygen::classSDict.count()+Doxygen::inputNameList.count()>0) + t << "" << endl; + //t << " " << endl; + ClassSDict::Iterator cli(Doxygen::classSDict); + ClassDef *cd; + for (cli.toFirst();(cd=cli.current());++cli) { - //t << " " << endl; - ClassSDict::Iterator cli(Doxygen::classSDict); - ClassDef *cd; - for (cli.toFirst();(cd=cli.current());++cli) - { - generateXMLForClass(cd,t); - } - NamespaceSDict::Iterator nli(Doxygen::namespaceSDict); - NamespaceDef *nd; - for (nli.toFirst();(nd=nli.current());++nli) - { - generateXMLForNamespace(nd,t); - } - FileNameListIterator fnli(Doxygen::inputNameList); - FileName *fn; - for (;(fn=fnli.current());++fnli) - { - FileNameIterator fni(*fn); - FileDef *fd; - for (;(fd=fni.current());++fni) - { - generateXMLForFile(fd,t); - } - } - GroupSDict::Iterator gli(Doxygen::groupSDict); - GroupDef *gd; - for (;(gd=gli.current());++gli) - { - generateXMLForGroup(gd,t); - } - PageSDict::Iterator pdi(*Doxygen::pageSDict); - PageInfo *pi=0; - for (pdi.toFirst();(pi=pdi.current());++pdi) + generateXMLForClass(cd,t); + } + NamespaceSDict::Iterator nli(Doxygen::namespaceSDict); + NamespaceDef *nd; + for (nli.toFirst();(nd=nli.current());++nli) + { + generateXMLForNamespace(nd,t); + } + FileNameListIterator fnli(Doxygen::inputNameList); + FileName *fn; + for (;(fn=fnli.current());++fnli) + { + FileNameIterator fni(*fn); + FileDef *fd; + for (;(fd=fni.current());++fni) { - generateXMLForPage(pi,t); + generateXMLForFile(fd,t); } - - //t << " " << endl; } + GroupSDict::Iterator gli(Doxygen::groupSDict); + GroupDef *gd; + for (;(gd=gli.current());++gli) + { + generateXMLForGroup(gd,t); + } + PageSDict::Iterator pdi(*Doxygen::pageSDict); + PageInfo *pi=0; + for (pdi.toFirst();(pi=pdi.current());++pdi) + { + generateXMLForPage(pi,t); + } + + //t << " " << endl; t << "" << endl; } diff --git a/src/xmlgen.h b/src/xmlgen.h index c762d29..3a76e0e 100644 --- a/src/xmlgen.h +++ b/src/xmlgen.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2001 by Dimitri van Heesch. + * Copyright (C) 1997-2002 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 -- cgit v0.12